Web Player

Embed a player

See how to embed a single video or a playlist

Embed a single video

The example below shows how to embed a single video with the JavaScript embed code.

Example:

<script type="text/javascript" src="https://player.target-video.com/player/build/targetvideo.min.js"></script> 

<div id="DIV_ID" style="width:480px;height:270px;" > </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 a playlist

The example below shows how to embed a playlist.

Example:

<script type="text/javascript" src="https://player.target-video.com/player/build/targetvideo.min.js"></script> 

<div id="DIV_ID" style="width:480px;height:270px;" > </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

❗ Important

Always make sure to first include a reference to the TargetVideo JavaScript file. This file needs to be loaded before the embed code so the player can work properly. If you load the script with async, use the asynchronous embed (_bp.push) instead, which works whichever loads first — see the JavaScript API reference.

Embed a player · TargetVideo Developer Docs