- An IBM Cloud Video Streaming Manager for Enterprise with Authentication API account (You can request a Trial account here)
- Install PHP 5.6+
- Set up channel authentication for your channel(s) on Channels/Authentication dashboard
- Secret Key: Some random string, this secret key is used for signing and validating authorization data
- URL for the entry point of the authentication flow: http://127.0.0.1:8000/auth.php This is the end point where you can authorize your users to the content and then generate the signed hash data.
- Set Secret Key in auth.php
...
$secret = 'TOPSECRET';
...
- Set a video id in index.html which will be used in this example. (This video needs to be on the same channel that was set up in Step 2.)
...
<iframe src="http://www.ustream.tv/embed/recorded/114661532?html5ui" style="border: 0 none transparent;" webkitallowfullscreen allowfullscreen frameborder="no" width="480" height="270"></iframe>
...
- Run demo on localhost
php -S 127.0.0.1:8000
- Open demo in your browser: http://127.0.0.1:8000/index.html (Recommended to use incognito mode)