WavePlayer Integration Guide

WavePlayer is an awesome audio player plugin with a beautiful user interface and nice functions. In order to work properly with our plugin Protect WordPress Videos – S3 hosted files, we need to modify the WavePlayer code base.

1. Replace the modified waveplayer.min.js

Replace the waveplayer.min.js (https://pda-public-resources.s3-ap-southeast-1.amazonaws.com/waveplayer.min.js) in folder assets/js

2. Update context option

In function waveplayer_read_mp3_tags, at line 314, we need to replace $contextOptions variable by

$contextOptions = array(
                    "ssl" => array(
                        "verify_peer"      => false,
                        "verify_peer_name" => false
                    ),
                    'http' => array (
                        'method'=>"GET",
                        'header' => "Range: bytes=0-\r\n"
                    )
                );