Editing a Player Using the Backlot REST API

You can edit the look and feel of a player at any time. Any changes are automatically made for all videos, channels, and channel sets that use the player.

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

To edit a player:

  1. Perform a get on the players route to view the current configuration. The following example creates a player that uses the default settings, but is set up for social sharing.
    [GET]/v2/players/b4251d1805b46

    Backlot returns a response similar to the following.

    {  
       "ooyala_branding":{  
          "show_info_screen_homepage_link":true,
          "show_share_button":true,
          "twitter_sharing":true,
          "show_ad_countdown":true,
          "show_info_screen_title":true,
          "url_sharing":true,
          "facebook_sharing":true,
          "show_info_button":true,
          "email_sharing":true,
          "digg_sharing":true,
          "show_embed_button":true,
          "show_info_screen_description":false,
          "show_bitrate_button":false,
          "show_channel_button":true,
          "show_end_screen_replay_button":true,
          "accent_color":"#ffbb00",
          "enable_error_screen":true,
          "show_volume_button":true
       },
       "name":"Social Player",
       "is_default":false,
       "provider_homepage_url":null,
       "related_videos":{  
          "click_behavior":"new_page",
          "order":"desc",
          "sort":"upload_time",
          "labels":[  
    
          ],
          "source":"shared_labels"
       },
       "scrubber":{  
          "always_show":false,
          "image_url":null
       },
       "playback":{  
          "buffer_on_pause":false
       },
       "id":"b4251d1805b46",
       "watermark":{  
          "image_url":null,
          "click_url":null,
          "alpha":1.0,
          "position":"bottom-right"
       },
       "default_closed_caption_language":""
    }
    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.

  2. Use PATCH with the players route to update the player. The following example disables Digg sharing and changes the accent color to pink.
    [PATCH]/v2/players/b4251d1805b46{  
       "ooyala_branding":{  
          "digg_sharing":false,
          "accent_color":"#FF1493"
       }
    }

    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":false,
          "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":"#ff1493",
          "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
       }
    }
    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 edited.

해당 내용이 도움 되었습니까?