API
This chapter lists information about the OvenPlayer API, which you can control with OvenPlayerInstance.
API Reference
getVersion()
playerInstance.getVersion()getConfig()
playerInstance.getConfig()Type
Memo
{
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)Type
Memo
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"
}
];getMediaElement()
Type
Memo
getState()
Type
Memo
Type
Memo
getBrowser()
Type
Memo
Type
Memo
setTimecodeMode()
Type
Memo
Type
Memo
isTimecodeMode()
Type
Memo
Type
Memo
getFramerate()
Type
Memo
Type
Memo
seekFrame()
Type
Memo
Type
Memo
getDuration()
Type
Memo
Type
Memo
getPosition()
Type
Memo
Type
Memo
getVolume()
Type
Memo
Type
Memo
setVolume()
Type
Memo
Type
Memo
getMute()
Type
Memo
Type
Memo
setMute()
Type
Memo
Type
Memo
play()
Type
Memo
Type
Memo
pause()
Type
Memo
Type
Memo
seek()
Type
Memo
Type
Memo
getPlaybackRate()
Type
Memo
Type
Memo
setPlaybackRate()
Type
Memo
Type
Memo
getPlaylist()
Type
Memo
Type
Memo
getCurrentPlaylist()
Type
Memo
Type
Memo
setCurrentPlaylist()
Type
Memo
Type
Memo
getSources()
Type
Memo
Type
Memo
getCurrentSource()
Type
Memo
Type
Memo
setCurrentSource()
Type
Memo
Type
Memo
getQualityLevels()
Type
Memo
Type
Memo
getCurrentQuality()
Type
Memo
Type
Memo
setCurrentQuality()
Type
Memo
Type
Memo
isAutoQuality()
Type
Memo
Type
Memo
setAutoQuality()
Type
Memo
Type
Memo
getCaptionList()
Type
Memo
Type
Memo
getCurrentCaption()
Type
Memo
Type
Memo
setCurrentCaption()
Type
Memo
Type
Memo
addCaption()
Type
Memo
Type
Memo
removeCaption()
Type
Memo
Type
Memo
stop()
Type
Memo
Type
Memo
showControls()
Type
Memo
Type
Memo
remove()
Architectures

Last updated
Was this helpful?