Embed a player
See how to embed a single video or a playlist
Embed single video
In the below example you will find how to embed a single video using the JS embed code
Example:
<script type="text/javascript" src="//{user.services_domain}/player/build/{user.player_script}"></script>
<div id="DIV_ID" style="width:480;height:270;" > </div>
<script type="text/javascript">
$bp("DIV_ID",{"video":"VIDEO_ID","width":"480","height":"270","id":"PLAYER_ID"});
</script>| Parameter name | Description |
|---|---|
| DIV_ID | id of the div element in which the player will be loaded. This is required and needs to be present on the page |
| PLAYER_ID | id of the player which you want to use |
| VIDEO_ID | id of the video which you want to display |
Embed playlist
Below you will find an example on how to embed a playlist.
Example:
<script type="text/javascript" src="//{user.services_domain}/player/build/{user.player_script}"></script>
<div id="DIV_ID" style="width:480;height:270;" > </div>
<script type="text/javascript">
$bp("DIV_ID", {"id":"PLAYER_ID","width":"480","height":"270","playlist":"PLAYLIST_ID"});
</script>| Parameter name | Description |
|---|---|
| PLAYLIST_ID | id of the playlist which should be loaded |
TIPAlways make sure to first include a reference to the Targetvideo JS file. This file needs to be loaded before the embed code so the player can work properly.
Updated 4 days ago
