OpenTV Browser Plugins to SDK Migration Guide

Video Agent


The OpenTV Player Browser SDK supports all the VideoAgent events present in the PPAPI/NPAPI plugins, these are now registered directly against the player instance using a listener e.g. player.on("event", () =>{}).

VideoAgent events support:

  • abort
  • canplay
  • canplaythrough
  • durationchange
  • emptied
  • ended
  • error
  • loadedmetadata
  • loadstart
  • pause
  • play
  • playing
  • progress
  • seeked
  • seeking
  • stalled
  • timeupdate
  • volumechange
  • waiting


All VideoAgent properties are now functions against the player instance object.

Property Function Notes
autoplay autoplay()
controls controls()
currentSrc currentSrc()
currentTime currentTime()
disableSeek Not implemented
duration duration()
ended ended()
error error()
maximumSeekBack seekable() Deprecated, see seekable()
muted muted()
networkState networkState()
paused paused()
readyState readyState()
seekable seekable() Returns a TimeRange object
seeking seeking()
src src()
videoHeight videoHeight()
videoWidth videoWidth()
volume volume()

Playback Agent

Track selection

The activateTrack and deactivateTrack methods do not have direct mappings in the Browser SDK. Track selection and deselection is now handled by iterating over a TextTrackList or AudioTrackList returned by the textTracks() and audioTracks() methods.

This is an example of selecting English subtitles:

let tracks = player.textTracks();

for (let i = 0; i < tracks.length; i++) {
  let track = tracks[i];

  // Show the English subtitle track, disable all others
  if (track.kind === "subtitles" && track.language === "en") {
    track.mode = "showing";
  } else {
    track.mode = "disabled";


Property Mapping Notes
audioTracks audioTracks() The track list returned is not compatible
subtitlingTracks textTracks() The track list returned is not compatible


Plugin event Browser event Notes
errorChanged Not implemented
ID3TagChanged Not implemented
tracksChanged addtrack / removetrack These events are implemented in TextTrackList and AudioTrackList

Network Agent

Support for the mappings below will be available in the forthcoming OpenTV Player SDK for Browser 1.3.0 release


Event Object Event
selectedBitrateChanged networkStatistics selectedBitrateChanged


    selectedBitrateChanged: () => {
        console.log("Selected bitrate changed");