Players¶
Players are the most frequently served piece of content. They comprise of both a player design and the video or channel it plays. Players can be requested as either a javascript, an iframe page or embed swf. The javascript version has two key advantages (JavaScript API, mobile support) and is much prefered; the iframe version has mobile support but no API; the SWF embed version has neither mobile nor API support and should be used as last resort.
Scheme¶
Players are requested with the key of a video or channel and the key of the player design.
http://content.bitsontherun.com/players/KEY-PLAYER.js
http://content.bitsontherun.com/players/KEY-PLAYER.html
http://content.bitsontherun.com/players/KEY-PLAYER.swf
Here’s an example player, in all three variations:
- http://content.bitsontherun.com/players/nPripu9l-ALJ3XQCI.js
- http://content.bitsontherun.com/players/nPripu9l-ALJ3XQCI.html
- http://content.bitsontherun.com/players/nPripu9l-ALJ3XQCI.swf
And here’s how to use these three cases in your HTML code. In the location of this tag, a BOTR player will appear:
<script type="text/javascript" src="http://content.bitsontherun.com/players/nPripu9l-ALJ3XQCI.js"></script>
<iframe src="http://content.bitsontherun.com/players/nPripu9l-ALJ3XQCI.html" width="480" height="294" frameborder="0" scrolling="auto"></iframe>
<embed src="http://content.bitsontherun.com/players/HxcXasC6-8toGQxMR.swf" width="480" height="294" allowfullscreen="true" allowscriptaccess="always">
Again, JavaScript players are much preferred for embedding. Fallback to the iframe (or SWF embed) if you cannot embed them in your site or CMS. JavaScript players have the following additional features:
- The JW Player API, an extensive JavaScript API for player-page interaction.
- A classname of .botrplayer on the main div element.
- Loading videos or playlists using just the asset KEY, with the javascript call botr_KEY_PLAYER.load(NEW_KEY).
- Adding configuration vars and plugins with the JavaScript call botr_KEY_PLAYER.addVariable(“name”,”value”).
Parameters¶
- KEY
An 8 character code (e.g. nPripu9l) that uniquely identifies the video or channel to play. You can request it through the /players/ API Class or copy/paste it from the video or channel details page in the Dashboard.
- PLAYER
An 8 character code (e.g. ALJ3XQCI) that uniquely identifies the player to use. It defines the skin, layout and behavior of the player that will be displayed on the page. Player keys can be requested through the /players/ API Class. You can also find them in the players details page in the Dashboard.
Compatibility¶
Bits on the Run players prefer the Adobe Flash Player for rendering the video. About 99% of all PC’s have this plugin installed. On mobile devices, the players use HTML5 to embed videos. If neither Flash nor HTML5 is supported, players render a thumbnail of the video that links to a simply download.
DNS Masking¶
The domain name used for requesting a player will be propagated in the return. This means the links to assets inside the player will contain that same domain name and not content.bitsontherun.com.