Player configuration reference

Players configuration methods

Configure a player to run a single video

Following example will run single video hosted in Brid.tv

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" style="width:480;height:270;" > </div>
<script type="text/javascript"> $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","video":"VIDEO_ID"}); </script>

Configure a player to run with a playlist

Following example will run playlist hosted in Brid.tv

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" style="width:480;height:270;" > </div> 
<script type="text/javascript"> $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","playlist":"PLAYLIST_ID"}); </script>

Configure a player to run with latest videos playlist

Following example will run playlist of latest videos from your Brid.tv account

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" > </div> 
<script type="text/javascript"> $bp("Brid_16429838", {"id":"PLAYER_ID","width":"480","height":"270","playlist":{"id":"0","mode":"latest"},"video_type":"0"}); </script>

Configure a player to run latest videos by tag playlist

Following example will run latest videos by specific tag playlist

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" > </div> 
<script type="text/javascript"> $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","playlist":{"id":"VIDEO_TAG","mode":"tag"},"video_type":"0"}); </script>

Configure a player to run latest videos by channel

Following example will run latest videos by specific channel playlist

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" > </div> 
<script type="text/javascript"> $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","playlist":{"id":"CHANNEL_ID","mode":"channel"},"video_type":"0"}); </script>

Configure a player to run custom external video URL

Following example will use custom external video URL

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script>  
<div id="DIV_ID" class="<<player_class>>" style="width:480;height:270;" > </div> 
  <script type="text/javascript"> 
    $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","video":{
      "Video": [
        {
          "source": {
            "ld": "240p_mp4_video_url",
            "sd": "360p_mp4_video_url",
            "hsd": "480p_mp4_video_url",
            "hd": "720p_mp4_video_url"
          }
        }
]}      
        }); </script>

Set custom sticky position

If you want to configure the player to go into a custom sticky position/location you can do it by adding the following "slide_inposition": "#DIV_ID" parameter in the embed code. This field can accept any kind of CSS selector.

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script>
<div id="DIV_ID" class="<<player_class>>" style="width:480;height:270;"></div>
<script type="text/javascript"> $bp("DIV_ID",{"id":"PLAYER_ID","width":"16","height":"9","video":"VIDEO_ID","slide_inposition": "#STICKY_DIV_ID"}, function() {});</script>

Configure playback behavior based on traffic source

If you want to set the player to be autoplay or click to play based on the traffic source you can do that by adding the below parameters into the embed code. If source of the traffic is organic, user is coming from Google for example, you can set the player to be click to play and if coming from social traffic, like Facebook, the player can be autoplay. You can even set for which specific sites the you want the player to be autoplay or CTP.

Example

$bp("DIV_ID", {
        "id":"PLAYER_ID","width":"640","height":"480","video":"VIDEO_ID",
        "alterPlaybackBehaviour":{
            "onOrganicTraffic":true,
            "onSocialTraffic":true
        },
        // "alterPlaybackBehaviour":{
        //     "onOrganicTraffic":{
        //         "behaviour":"clickToPlay",
        //         "forSites":['google']
        //     },
        //     "onSocialTraffic":{
        //         "behaviour":"autoPlay",
        //         "forSites":['facebook']
        //     }
        // }
    });

Turn off default player localization

By default, player will setup localization by reading the HTML lang attribute from the page. If you want to turn this off you can do that by adding the following parameter in players embed code: "turnOffLocalization": true

Example

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" style="width:640;height:360;" ></div>
<script type="text/javascript"> 
$bp("DIV_ID", {"id":"PLAYER_ID","width":"640","height":"360","video":"VIDEO_ID","turnOffLocalization": true}); </script>

Setup custom logo size in the player

Using the below piece of code you can customize the logo in the player easily.
This piece of code needs to be setup on the page where the player is embedded.

.brid-branding {
    width: 200px;
    height: 200px;
    max-width: 50%;
    max-height: 50%;
}

Setup custom snapshot image for the player

Using the below parameter in the embed code you can setup custom snapshot for the specific player embed:

<script type="text/javascript" src="//<<services_domain>>/player/build/<<player_script>>"></script> 
<div id="DIV_ID" class="<<player_class>>" style="width:480;height:270;" > </div>
<script type="text/javascript"> $bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","video":"VIDEO_ID", "poster": "URL_TO_THE_IMAGE"}); </script>