YouTube Assets

A YouTube asset is a video hosted by YouTube and played through the Ooyala player.

Benefits of Playing YouTube-hosted Videos

  • Maintain a consistent look and feel across your site with the Ooyala player or your custom player.
  • Leverage the use of Ooyala's rich APIs for an integrated and customized experience.
  • Gain insight and maintain the benefits of Ooyala's leading analytics for all videos in your account.
  • Discover supplemental content for your site from Youtube, the Internet's largest video library.
  • Apply time, geographic, or domain-based rules to the content.
  • Leverage Ooyala's intuitive and comprehensive tools to manage, syndicate, customize, and analyze YouTube content along with your own content.

Videos are Hosted on YouTube, not Backlot

YouTube videos are sourced from YouTube. In Backlot, the video is represented as a YouTube asset with its YouTube URL, along with a title and description that you can edit. In Backlot, the asset type is "youtube", so in our documentation, we refer to these as YouTube assets.
Therefore:
  • Backlot does not ingest and transcode the Youtube video.
  • Youtube videos are not applied to your delivery or managed content allowances.
As a result, all videos will contain a YouTube watermark and will be delivered using the best quality YouTube can provide, based on the embed size of the player.

Considerations

  • Because Backlot does not transcode YouTube videos:
    • Backlot does not generate any preview images.
    • The content cannot be played back on iOS devices.
  • YouTube content might not always be available to the player. For example, videos might be removed, videos might be restricted based on YouTube publisher rules, or access to YouTube might be blocked by a viewer’s company or institution.

YouTube IDs Must Be Unique in Your Account

No two YouTube assets in your account can have the same YouTube ID.
If you attempt to add a YouTube video that has been previously added, you receive the following error message, where asset_id identifies the previously created asset:
"{"duplicate_youtube_id":["asset_id"]}"

Common Routes, Attributes, Properties and Query String Parameters

Get YouTube Settings

[GET]/v2/assets/asset_id/youtube                          

Set YouTube Syndication Settings

[PUT]/v2/assets/asset_id/youtube
   {  
   "youtube_id":"some_youtube_id",
   "youtube_syndication_settings":{  
      "private":true|false,
      "mobile":true|false,
      "embeddable":true|false,
      "keywords":comma-separated-list-of-keywords
   }
}

Examples

Note:

Try out the code samples using your account credentials in the Ooyala Scratchpad. For information about using the Scratchpad, see Practice Making Requests with the Scratchpad. To launch the scratchpad, go to Ooyala API Scratchpad.

Create a YouTube Asset

The following example creates a YouTube asset:
[POST]/v2/assets{  
   "name":"My YouTube Asset",
   "asset_type":"youtube",
   "youtube_id":"a1Y73sPHKxw"
}            
Backlot returns a response similar to the following example:
{  
   "asset_type":"youtube",
   "duration":5,
   "name":"My YouTube Asset",
   "preview_image_url":null,
   "created_at":"2011-08-25T21:01:49+00:00",
   "embed_code":"1saGRyMjoOgjkUSjod_1TQINs_HOQnoU",
   "time_restrictions":null,
   "updated_at":"2011-08-25T21:01:50+00:00",
   "youtube_id":"a1Y73sPHKxw",
   "external_id":null,
   "hosted_at":null,
   "original_file_name":null,
   "description":"The best 5 second clip on the Internet.",
   "status":"live"
}

Get YouTube Settings

The following example gets YouTube settings:
[GET]/v2/assets/1saGRyMjoOgjkUSjod_1TQINs_HOQnoU/youtube                           
Backlot returns a response similar to the following:
{  
   "author":"cregets",
   "youtube_id":"a1Y73sPHKxw",
   "youtube_syndication_settings":{  
      "private":null,
      "mobile":null,
      "embeddable":null,
      "keywords":null
   }
}            

Add Keywords to YouTube Syndication Settings

The following example adds keywords to the YouTube syndication settings and makes the player for this video embeddable:
[PATCH]/v2/assets/1saGRyMjoOgjkUSjod_1TQINs_HOQnoU/youtube{  
   "youtube_syndication_settings":{  
      "private":null,
      "mobile":null,
      "embeddable":true,
      "keywords":[  
         "old",
         "classic"
      ]
   }
}            
Backlot returns a response similar to the following:
{  
   "author":"cregets",
   "youtube_id":"a1Y73sPHKxw",
   "youtube_syndication_settings":{  
      "private":null,
      "mobile":null,
      "embeddable":true,
      "keywords":[  
         "old",
         "classic"
      ]
   }
}           

Was this article helpful?