Integrating YouTube Player with IQ Using the JS SDK
The Ooyala YouTube player adapter uses the Ooyala IQ JavaScript SDK to communicate YouTube player (iframe_api) events to Ooyala IQ. You can implement this adapter yourself, or Ooyala Professional Services can help you implement the adapter for a fee. Complete the following steps to integrate the YouTube player with Ooyala IQ.
Prior to using the YouTube player adapter, you need to make sure that your Ooyala
assets are playable on third-party players.
- Check that your account has the correct encoding profile to allow encodings that YouTube supports. You can ask your account manager for assistance checking your processing profile.
- If you had to enable new files to be encoded in your encoding profile, you will need to upload a new video file or re-encode the video file in order to get the newly generated file. Content replacement (replacing an asset) will not work for this step. You must upload a new file or open a support ticket with Ooyala Technical Support to reprocess the video without manually uploading it again to keep the same embed code.
See the example below:
<script type="text/javascript"> var player; function onYouTubeIframeAPIReady() { player = new YT.Player('player', { height: '390', width: '640', videoId: 'yourVideoID', events: { 'onReady': function() { var videoLogger = new Ooyala.Analytics.YouTubeReporter("yourOoyalaPcode", player); } } }); } </script>