API
This chapter lists information about the OvenPlayer API, which you can control with OvenPlayerInstance.
API Reference
getVersion()
playerInstance.getVersion()getConfig()
playerInstance.getConfig(){
autoStart: false
browser: {screen: "1440 x 900", browser: "Chrome", browserVersion: "73.0.3683.103", browserMajorVersion: 73, mobile: false, …}
controls: true
loop: false
mediaContainer: div.ovp-media-element-container
mute: false
playbackRate: 0.5
playbackRates: [0.25, 0.5, 1, 1.5, 2]
playlist: [{…}, {…}]
timecode: true
volume: 100
}load()
playerInstance.load(playlist)playlist = [
{
title : "01",
adTagUrl : "https://pubads.g.doubleclick.net/gampad/ads?...",
image : "https://path.to/your_video_thumbnail.jpeg",
duration : 7343,
sources: [ {
type : "mp4",
file : "https://path.to/your_video",
label : "360P"
}],
tracks: [{
kind : "captions",
file : "https://path.to/your_caption.vtt",
label : "KO vtt"
}]
},
{
title : "02",
adTagUrl : "https://pubads.g.doubleclick.net/gampad/ads?...",
image : "https://path.to/your_video_thumbnail2.jpeg",
duration : 8333,
sources: [ {
type : "mp4",
file : "https://path.to/your_video2",
label : "360P"
},
{
type : "mpd",
file : "https://path.to/your_video.mpd",
label: "360P DASH"
}
tracks: [{
kind : "captions",
file : "https://path.to/your_caption2.vtt",
label : "KO vtt"
}]
}
];
or
sources = [
{
type : "mp4",
file : "https://path.to/your_video",
framerate : 30,
label : "360P"
},
{
type : "mp4",
file : "https://path.to/your_video",
framerate : 30,
label: "480P"
},
{
type : "mp4",
file : "https://path.to/your_video",
framerate : 30,
label : "720p",
default : "true"
}
];getState()
getBrowser()
setTimecodeMode()
isTimecodeMode()
getFramerate()
seekFrame()
getDuration()
getPosition()
getVolume()
setVolume()
getMute()
setMute()
play()
pause()
seek()
getPlaybackRate()
setPlaybackRate()
getPlaylist()
getCurrentPlaylist()
setCurrentPlaylist()
getSources()
getCurrentSource()
setCurrentSource()
getQualityLevels()
getCurrentQuality()
setCurrentQuality()
isAutoQuality()
setAutoQuality()
getCaptionList()
getCurrentCaption()
setCurrentCaption()
addCaption()
removeCaption()
stop()
remove()
Architectures

Last updated
Was this helpful?