Integrating YouTube Player with IQ Using the JS SDK
- 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.
Reference analytics.js at https://analytics.ooyala.com/static/analytics.js in the page where your player is hosted. This
needs to be done for any page that has a player.
Warning: Do not host analytics.js on your own. If you do so, you will not receive bug fixes and updates. Please use the Ooyala-hosted version at https://analytics.ooyala.com/static/analytics.js.
Create a YouTube player.
- Embed a player using the instructions at https://developers.google.com/youtube/iframe_api_reference.
- Catch the onReady event and create YouTubeReporter inside onReady.
(Optional) Specify a media content type with the
MediaContentType parameter to show if the
mediaid specifies an Ooyala video asset or a
non-Ooyala video asset. You can set the media content type as one of the
two following values. If you do not specify a media content type, the
default value is EXTERNAL_CONTENT (non-Ooyala media
- OOYALA_CONTENT: Indicates that the media ID is an Ooyala embed code. Set the value of OOYALA_CONTENT to the Ooyala embed code. Use contentType: Ooyala.Analytics.MediaContentType.OOYALA_CONTENT.
- EXTERNAL_CONTENT: Indicates that the media ID is not an Ooyala embed code (and is customer-defined media ID from a non-Ooyala CMS). Use contentType: Ooyala.Analytics.MediaContentType.EXTERNAL_CONTENT.