Creating a Player Using the Backlot REST API

You can create as many players as you like and assign them to videos, channels, or channel sets.

Note: For more information about REST API commands for the Ooyala player, see the Backlot API Reference.

Backlot displays the player associated with the piece of content that the viewer accesses. For example, if the viewer accesses a video directly, the video is displayed in the video's player. If the customer accesses the same video through a channel, the video is displayed in the channel's player.

To create a player:

Use the players route. The following example creates a player that uses the default settings, but is set up for social sharing.
Note: Player sharing settings with the Backlot API are only valid for Ooyala Player V3. Customize Player V4 sharing settings by modifying skin.json or the player CSS.
[POST]/v2/players{  
   "name":"Social Player",
   "ooyala_branding":{  
      "show_share_button":true,
      "twitter_sharing":true,
      "facebook_sharing":true,
      "digg_sharing":true,
      "url_sharing":true,
      "email_sharing":true
   }
}

Backlot returns a response similar to the following.

{  
   "ooyala_branding":{  
      "show_share_button":true,
      "twitter_sharing":true,
      "show_info_screen_homepage_link":true,
      "show_ad_countdown":true,
      "show_info_screen_title":true,
      "facebook_sharing":true,
      "show_info_button":true,
      "url_sharing":true,
      "email_sharing":true,
      "digg_sharing":true,
      "show_embed_button":true,
      "show_info_screen_description":false,
      "show_bitrate_button":false,
      "show_channel_button":true,
      "enable_error_screen":true,
      "show_end_screen_replay_button":true,
      "accent_color":"#ffbb00",
      "show_volume_button":true
   },
   "name":"Social Player",
   "provider_homepage_url":null,
   "related_videos":{  
      "click_behavior":"new_page",
      "order":"desc",
      "sort":"upload_time",
      "source":"shared_labels",
      "labels":[  

      ]
   },
   "is_default":false,
   "scrubber":{  
      "image_url":null,
      "always_show":false
   },
   "playback":{  
      "buffer_on_pause":false
   },
   "id":"b4251d1805b46",
   "default_closed_caption_language":"",
   "watermark":{  
      "image_url":null,
      "click_url":null,
      "alpha":1.0,
      "position":"bottom-right"
   }
}
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.

The player is successfully added.

Was this article helpful?