IVideoPlayer
- class player.IVideoPlayer()
An abstract interface of the video player.
Methods
- player.IVideoPlayer.addEventListener(event, handler)
Three events are supported: ‘pause’, ‘playing’, and ‘twitchextoncontext’.
- Arguments:
event – string
handler(event) –
- param event:
string
- returns:
void
- Returns:
void
- player.IVideoPlayer.getCurrentTime()
Get the current time.
- Returns:
number
- player.IVideoPlayer.getMuted()
Get the muted status.
- Returns:
boolean
- player.IVideoPlayer.getSyncTime(data)
Compute the time of composition (in seconds) based on the start ingest time (in milliseconds) and the pts. (Scale: 1kHz)
- Arguments:
data –
genvidClient.ISyncData()
- Returns:
number
- player.IVideoPlayer.getVolume()
Get the volume, an integer between 0 and 100.
- Returns:
number
- player.IVideoPlayer.getVolumeAsync()
Get the volume async, an integer between 0 and 100.
- Returns:
Promise
- player.IVideoPlayer.isPaused()
Get the paused status.
- Returns:
boolean
- player.IVideoPlayer.pause()
Pause the player.
- Returns:
void
- player.IVideoPlayer.play()
Play the video.
- Returns:
void
- player.IVideoPlayer.reloadVideoPlayer(channel, delayMS)
Reload video player.
- Arguments:
channel – string
delayMS – number
- Returns:
void
- player.IVideoPlayer.setMuted(muted)
Set muted.
- Arguments:
muted – boolean
- Returns:
void
- player.IVideoPlayer.setStreamInfo(newStreamInfo)
Optional method meant to update the NTP URL.
- Arguments:
newStreamInfo –
genvidClient.IStreamInfo()
- Returns:
void
- player.IVideoPlayer.setVolume(volume)
Set the volume. Accepts an integer between 0 and 100.
- Arguments:
volume – number
- Returns:
void