Simple Player Embed (Deprecated)
You can use the following code sample to understand how embed a simple player on a web page.
To implement all of the features of this sample, you need to start with embed a player on your web page. This sample includes both the controller logic and view to embed a player on your web page. For information about how to do this, you can check our API Keys and Partner Code documentation and Advanced Layout: Embedding Multiple Players (HTML5 Player V3) (Deprecated) documentation.
Where to Find the Code
To explore this code sample view in GitHub, go to: https://github.com/ooyala/code-samples/blob/master/application/views/Secure_XDR_GoogleIMA/simple.php.
Simple Player View
The views folder and the controllers are the main points of interest for this example. You can review the associated controller code at: https://github.com/ooyala/code-samples/tree/master/application/controllers.
The simple.php file implements a basic player embed.In this Player Token sample, we use the following Player V3 API and parameter.
- OO.Player.create() - This function creates a new message bus, creates any registered modules, and connects registered modules to the message bus. In the sample, you should note that OO.Player.create is used with embedToken in the hash with the embed token url as part of the key value pair.