Web Player
Asynchronous embed code
See how to embed a single video or a playlist
Embed video using asynchronous embed code
To load the player without blocking your page, use the async embed code below.
You can also use the player’s JavaScript API with it — see onReady below.
Example:
<div id="DIV_ID" style="width:480px; height:270px;" > </div>
<script type="text/javascript">
var _bp = _bp||[];
_bp.push({"div": "DIV_ID", "obj": {"video":"VIDEO_ID","width":"480","height":"270","id":"PLAYER_ID"}});
</script>
<script type="text/javascript" async src="https://player.target-video.com/player/build/targetvideo.min.js"></script>Parameter name | Description |
|---|---|
| ID of the div element in which the player will be loaded. This is required and needs to be present on the page |
| ID of the player which you want to use |
| ID of the video which you want to display |
onReady | Optional. A function added to the object you push, next to |
💡 Tip
The player script can go before or after the embed code. When it loads, it starts every player already queued in
_bp, and players pushed after that start immediately. Keep theasyncattribute on the script tag so it doesn’t hold up the page.