
All LVP players are capable of delivering Flash and HTML5. When a player is loaded a javascript based embed code will automatically detect the viewing device and adjust the player to accommodate. We deliver Flash for normal desk-top viewers and HTML5 for mobile viewers (e.g. iPhone, iPad). Our javascript API is universal, supported in both Flash and HTML5. This provides the convenience of using both a single player and a single set of supported APIs. There is no need for additional coding to specifically handle mobile viewers.
var id = "YOUR_SWF_DOM_ID";
if (eventName == 'onPlayerLoad' && (DelvePlayer.getPlayers() == null || DelvePlayer.getPlayers().length == 0))
{
DelvePlayer.registerPlayer(id);
}
| Function | Description | Parameters |
|---|---|---|
| doGetCurrentIndex() | Returns the index of the current video in the channel | n/a |
| doSkipToIndex(newIndex) | Skips to a new video in the channel |
|
| doGetCurrentMedia() | Returns an object that contains the metadata of the currently loaded media. The object properties are:
|
n/a |
| doGetCurrentChannel() | Returns an object that contains the metadata of the currently loaded channel. The object properties are:
|
n/a |
| doGetCurrentChannelList() | Returns an object (called channelList) that contains the list of channels in the currently loaded channel group. The properties of each channel in the object are:
|
n/a |
| doGetCurrentPlayState() | Returns an object that returns the state of the player. The object properties are:
|
n/a |
| doNext() | Skips to the next video in the channel | n/a |
| doPrevious() | Skips to the previous video in the channel | n/a |
| doPlay() | Plays the currently loaded video | n/a |
| doPause() | Pauses the currently loaded video | n/a |
| doSeekToRatio(ratio) | Seeks to a new location for playback |
|
| doSeekToSecond(second) | Seeks to a specific location in the video |
|
| doShare(social_site) | Invokes 'social sharing' capabilites by sharing the page link of the currently loaded content to the specified social site. |
|
| doGetVolume() | Returns the value of the current volume setting (where 0 represents mute and 1 represents full volume) | n/a |
| doSetVolume(volume) | Sets the volume of the player |
|
| doGetQualityDetails() | Returns an object containing the bitrate and height of the currently selected quality (selected) and the currently playing quality (actual) |
|
| doSetQuality(bitrate) | Sets the video quality in the player; the player will switch to the encoding that is closest to the specified bit rate, downward |
|
| doGetPlayheadPositionInMilliseconds() | Returns the current play position in milliseconds | n/a |
| doGetCustomEvents() | Returns an object that contains a listing of all custom events for the currently loaded media. The object properties are:
|
n/a |
| doLoadMedia(newMediaId, autoPlay) | Loads a new media in the player, optionally starting playback |
|
| doLoadChannel(newChannelId, autoPlay) | Loads a new channel in the player, optionally starting playback |
|
| doLoadChannelList(newChannelListId, channelId, mediaId, autoPlay) | Loads a new channel group in the player, optionally starting playback on a particular channel and/or a particular media |
|
| doSetMedia(newMediaId, autoPlay, positionInMilliSeconds) | Skips to a specific media if it exists in the currently loaded channel, optionally starting playback at a specific point |
|
| doSetChannel(newChannelId, newMediaId, autoPlay, positionInMilliSeconds) | Skips to a specific channel and/or media if it exists in the currently loaded channel group, optionally starting playback at a specific point |
|
| doLoadChannelAndSetMedia (newChannelId, newMediaId, autoPlay, positionInMilliSeconds) |
Loads a channel and skips to a specific media within that channel, optionally starting playback at a specific point |
|
| doLoadPlaylistByTags(tags, organizationId, sortOrder) | Loads a dynamic channel based on metadata |
|
| doLoadMediaWithAdConfigurationChannel (mediaId, playImmediately, positionInMillieSeconds, adConfigurationChannelId) |
This function can be used in conjunction with the Limelight Video Platform Ad Server. An advertising channel can be specified. If set, a player will play the advertisement(s) corresponding to the channel variable in either preroll or postroll, depending on the settings on the channel in the account. Note: The channel ID parameter is NOT the ID of the channel that contains the advertisement(s). The parameter should correspond to the main channel, the one on which advertising (pre-roll or post-roll) has been set. |
|
function delvePlayerCallback (playerId, eventName, data)
{
var id = "YOUR_SWF_DOM_ID";
if (eventName == 'onPlayerLoad' && (DelvePlayer.getPlayers() == null || DelvePlayer.getPlayers().length == 0))
{
DelvePlayer.registerPlayer(id);
}
switch(eventName)
{
case 'onPlayerLoad':
document.getElementById('player_status').innerHTML
= "Played Loaded";
break;
case 'onMediaLoad':
document.getElementById('player_status').innerHTML
= "Loaded media '" + data.title + "'";
break;
}
}
| Event | Description | Data Parameter |
|---|---|---|
| onPlayerLoad | Fired when the player is loaded and ready for interaction | n/a |
| onChannelLoad | Fired when a channel is loaded | An object containing the metadata of the channel, with the following properties:
|
| onMediaLoad | Fired when a new media is loaded | An object containing the metadata of the media, with the following properties:
|
| onAdLoad | Fired when an ad is loaded | An object containing the following property: type |
| onChannelComplete | Fired when the last piece of media in a channel finishes playback | An object containing the metadata of the channel, with the following properties:
|
| onMediaComplete | Fired when the current piece of media finishes playback | An object containing the metadata of the media, with the following properties:
|
| onAdComplete | Fired when an ad completes | An object containing the following property: type |
| onPlayheadUpdate | Fired nearly continually (~300ms) as playback progresses. This event reveals the duration and the current play position of the video. | An object containing the following properties
|
| onAdPlayheadUpdate | Fired nearly continually (~300ms) as playback progresses. This event reveals the duration and the current play position of an ad video. This is useful for creating ad countdown messages. | An object containing the following properties
|
| onPlayStateChanged | Fired when the play state (Play/Pause) changes or when the player is busy (buffering) | An object containing the following property:
|
| onQualityChanged | Fired when the delivered quality of the video changes, either through automatic adaptive streaming or through manual selection by the viewer | An object containing the following properties
|
| onFullScreenChanged | Fired when the player enters or exits fullscreen | An object containing the following property:
|
| onCustomEvent | Fired when a custom event occurs during playback | An object containing the following details of the custom event:
|
| onError | Fired when the player encounters an error or invalid or unpublished content is loaded into the player | An object containing the following properties
|
| errorID | classType | message |
|---|---|---|
| 0 | 0 (indicates a 'General' error) | "Error" - Indicates a general playback error has occurred |
| 1 | 0 (indicates a 'General' error) | "Argument Error" - Indicates an invalid argument or parameter has been passed to the player |
| 131072 | 2 (indicates a 'Content' error) | "This media is no longer available" - Indicates that the media is any of the following: not published; not yet scheduled for availability; deleted; or never existed |
| 131073 | 2 (indicates a 'Content' error) | "This channel is no longer available" - Indicates that the channel is any of the following: not published; deleted; or never existed |
| 131074 | 2 (indicates a 'Content' error) | "This channel group is no longer available" - Indicates that the channel group is any of the following: not published; deleted; or never existed |
| 131075 | 2 (indicates a 'Content' error) | "This channel contains no videos" - Indicates that the channel is empty or the media in the channel is not yet scheduled for availability |
| 131078 | 2 (indicates a 'Content' error) | "This content is not authorized for viewing on this domain" - Indicates that current viewing restriction rules prevent the viewing of the channel on this domain |
| 131079 | 2 (indicates a 'Content' error) | "This content is not authorized for viewing in your location" - Indicates that current viewing restriction rules prevent the viewing of the channel in this geographic location |
<span class="LimelightEmbeddedPlayer">
<script src="http://assets.delvenetworks.com/player/embed.js"></script>
<object type="application/x-shockwave-flash" id="limelight_player_95243" name="limelight_player_95243" class="LimelightEmbeddedPlayerFlash" width="608" height="395" data="http://assets.delvenetworks.com/player/loader.swf">
<param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/>
<param name="wmode" value="window"/>
<param name="allowScriptAccess" value="always"/>
<param name="allowFullScreen" value="true"/>
<param name="flashVars" value="playerForm=2b84c3101f624f1d9f5857abfc109d52&channelId=ee258eb20ceb4a1caf59b4c1c7f1212c&deepLink=true&autoplay=true"/>
</object>
<script>LimelightPlayerUtil.initEmbed('limelight_player_95243');</script>
</span>
<object width="608" height="395" id="limelight_player_149251o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> <param name="movie" value="http://assets.delvenetworks.com/player/loader.swf"/> <param name="wmode" value="window"/> <param name="allowScriptAccess" value="always"/> <param name="allowFullScreen" value="true"/> <param name="flashvars" value="deepLink=true&channelId=ee258eb20ceb4a1caf59b4c1c7f1212c&playerForm=2b84c3101f624f1d9f5857abfc109d52"/> <embed src="http://assets.delvenetworks.com/player/loader.swf" name="limelight_player_149251e" wmode="window" width="608" height="395" allowScriptAccess="always" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="deepLink=true&channelId=ee258eb20ceb4a1caf59b4c1c7f1212c&playerForm=2b84c3101f624f1d9f5857abfc109d52"> </embed> </object>
http://link.delvenetworks.com/media/?channelId=ee258eb20ceb4a1caf59b4c1c7f1212c&width=608&height=395&playerForm=2b84c3101f624f1d9f5857abfc109d52&deepLink=true
| FlashVar | Description |
|---|---|
| channelListId | Identifies the channel group to load, to be used along with the tabbed player Accepted Values: Any valid channel group id Example: channelListId=39b8c5564aa8403693fddc86ac0f3b48 |
| channelId | Identifies the channel to load. In addition to the channel, this variable instructs the player to load all settings applied to the channel (e.g. advertising settings, publish settings, or bandwidth limitation) Accepted Values: Any valid channel Id Example: channelId=c6241574220b40c384d41a45dee6b521 |
| mediaId | Identifies the media to load. If a 'channelId' is also specified, and the media identified by 'mediaId' exists in that channel, all settings applied to the channel (e.g. advertising settings, publish settings, or bandwidth limitations) will also be loaded with the media Accepted Values: Any valid media Id Example: mediaId=c272f72de7974ee09b600e397bcd3cef |
| share | Forces different sharing options to be enabled Accepted Values: Comma delineated list of any of the following sharing options: 'email', 'embed', 'link', 'social' Example: share=email,link,social |
| deepLink | Forces the player to start playback on a specific channel group, channel, and/or media combination by interpreting page URL query strings. Also forces the player to append query strings to URLs that are shared from the player. Accepted Values: 'true' or 'false' Example: deepLink=true |
| startPositionInMilliseconds | Indicates the position at which playback will begin Accepted Values: Any positive integer Example: startPositionInMilliseconds=1000 |
| autoplay | Overrides any setting specified in the console application to begin playback upon loading Accepted Values: 'true' or 'false' Example: autoplay=true |
| autoplayNextClip | Instructs the player to auto play the next clip in a channel upon completion of the previous clip. If set to false, the player will move to the next clip but pause. Accepted Values: 'true' (default) or 'false' Example: autoplayNextClip=true |
| autoSkipNextClip | Instructs the player to move or not move to the next clip in a channel. If set to false, the player will pause at the end of the clip, without moving on to the next clip. Accepted Values: 'true' (default) or 'false' Example: autoSkipNextClip=true |
| shareCurrent | By default, when a user selects to get the embed code through sharing the player shares the embed code for the channel that was loaded. This variable instructs the player to generate embed codes for the currently playing content only. If you want to share the media only, you can add 'shareCurrent=media'. If you want to share the channel only, you can add 'shareCurrent=channel'. If you want to share the channel and jump directly to the current media, you can specify 'shareCurrent=channel,media' . Accepted Values: 'media', 'channel', 'channel, media' Example: shareCurrent=channel,media |
| loadPlaylistByTags | Instructs the player to load a dynamic playlist of media that meets specific meta data tag criteria Accepted Values: The value of this variable is a colon-delineated string containing the following: organization id, comma-delineated list of tags, sort order. Values for the sort order can be 'id', 'title', or 'createdDate' Example: loadPlaylistByTags=ac0aabfb1f71441b841bfe638734b24s:food,drink:title |
| disableBitrateSelection | By default, a viewer can right click and manually select a bitrate. This can be disabled by setting this variable to 'true' Accepted Values: 'true' or 'false' Example: disableBitrateSelection=true |
| adConfigurationChannelId | An advertising channel can be specified using this variable. If set, a player will play the advertisements corresponding to the channel variable in either preroll or postroll, depending on the settings on the channel in the account. Accepted Values: Any valid channel id Example: adConfigurationChannelId=c6241574220b40c384d41a45dee6b521 |
| defaultQuality | By default, the player will deliver a quality that is most compatible with the viewers internet connectivity and CPU usage. To override this feature and force a particular quality for the entire duration of playback, set this variable. NOTE: Your value does not need to be exact. If no bit rate exists with your value the player will choose the closest bit rate downward. Accepted Values: Any numerical bit rate (in kbps) Example: defaultQuality=1200 |
| startQuality | The player by default will optimize load for all viewers by initially loading the bit rate close to 450 kbps. The player will then adjust based on the viewer's internet connectivity and CPU usage to the highest quality possible. To override the default and force the player to initialize in a different quality, set this variable. NOTE: Your value does not need to be exact. If no bit rate exists with your value the player will choose the closest bit rate downward. Accepted Values: Any numerical bit rate (in kbps) Example: startQuality=600 |
| showInlinePlaylistDuringPause | This FlashVar only applies to players with inline playlists (those playlists that appear in the video player rather than adjacent to the player). If set to 'true', the player will show the inline playlist whenever the user pauses playback. If set to 'false', the player will only show the playlist when the user selects the 'show playlist' control Accepted Values: 'true' or 'false' Example: showInlinePlaylistDuringPause=true |
| showInlinePlaylistOnLoad | This FlashVar only applies to players with inline playlists (those playlists that appear in the video player rather than adjacent to the player). If set to 'true', the player will default to showing the inline playlist when the player is loaded on a page. If set to 'false', the player will display the first video in the playlist when the player is loaded Accepted Values: 'true' or 'false' Example: showInlinePlaylistOnLoad=true |