PlayerClientMediaControlHandler
Implements
IMediaControlHandlerAsync
Constructors
new PlayerClientMediaControlHandler()
new PlayerClientMediaControlHandler(): PlayerClientMediaControlHandler
Returns
PlayerClientMediaControlHandler
Methods
clearSession()
clearSession(sessionId:
IPlayerSessionId):void
Clears session data when a session is unloaded.
Parameters
sessionId
IPlayerSessionId
destroy()
destroy():
void
handleCustomAction()
handleCustomAction(action:
Action, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "customAction" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
action
Action
sessionId?
any
Returns
Promise<void>
handleDisableTextTrack()
handleDisableTextTrack(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "disableTextTrack" for current mediaplayer instance. w3cmedia will handle this internally by initiating disableTextTrack command as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handleEnableShuffle()
handleEnableShuffle(enable:
boolean, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "shuffle" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
enable
boolean
sessionId?
any
Returns
Promise<void>
handleEnableTextTrack()
handleEnableTextTrack(textTrack:
ITrack, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "enableTextTrack" for current mediaplayer instance. w3cmedia will handle this internally by initiating enableTextTrack command as a default mode.
Parameters
textTrack
ITrack
sessionId?
any
Returns
Promise<void>
handleFastForward()
handleFastForward(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "fastforward" for current mediaplayer instance. w3cmedia will handle this internally by seek forward command to pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handleGetMetadataInfo()
handleGetMetadataInfo(id:
MediaId):Promise<IMediaMetadata>
Callback from KMC server to execute the media control command "getMetaInfo" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
id
MediaId
Returns
Promise<IMediaMetadata>
handleGetSessionState()
handleGetSessionState(sessionId?:
any):Promise<MediaSessionState[]>
Callback from KMC server to execute the media control command "getSessionState" for current mediaplayer instance. w3cmedia will handle this internally by updating the sessionstate as a default. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.
Parameters
sessionId?
any
Returns
Promise<MediaSessionState[]>
handleNext()
handleNext(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "next" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
sessionId?
any
Returns
Promise<void>
handlePause()
handlePause(sessionId?:
any, context?:any):Promise<void>
Callback from KMC server to execute the media control command "pause" for current mediaplayer instance. w3cmedia will handle this internally by initiating pause command to pipeline as a default mode.
Parameters
sessionId?
any
context?
any
Returns
Promise<void>
handlePlay()
handlePlay(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "play" for current mediaplayer instance. w3cmedia will handle this internally by initiating play command to pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handlePrevious()
handlePrevious():
Promise<void>
Callback from KMC server to execute the media control command "previous" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Returns
Promise<void>
handleRewind()
handleRewind(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "rewind" for current mediaplayer instance. w3cmedia will handle this internally by seek backward command to pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handleSeek()
handleSeek(position:
ITimeValue, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "seek" for current mediaplayer instance. w3cmedia will handle this internally by seek forward/backward command to pipeline as a default mode.
Parameters
position
ITimeValue
sessionId?
any
Returns
Promise<void>
handleSetAudioTrack()
handleSetAudioTrack(audioTrack:
ITrack, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "setAudioTrack" for current mediaplayer instance. w3cmedia will handle this internally by initiating setaudiotrack command as a default mode.
Parameters
audioTrack
ITrack
sessionId?
any
Returns
Promise<void>
handleSetAudioVolume()
handleSetAudioVolume(volume:
number, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "setVolume" for current mediaplayer instance. w3cmedia will handle this internally by initiating setvolume command as a default mode.
Parameters
volume
number
sessionId?
any
Returns
Promise<void>
handleSetPlaybackSpeed()
handleSetPlaybackSpeed(speed:
number, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "setplaybackspeed" for current mediaplayer instance. w3cmedia will handle this internally by configure the playbackspeed command to pipeline as a default mode.
Parameters
speed
number
sessionId?
any
Returns
Promise<void>
handleSetRating()
handleSetRating(id:
MediaId, rating:number, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "setRating" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
id
MediaId
rating
number
sessionId?
any
Returns
Promise<void>
handleSetRepeatMode()
handleSetRepeatMode(mode:
RepeatMode, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "previous" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature.
Parameters
mode
RepeatMode
sessionId?
any
Returns
Promise<void>
handleSkipBackward()
handleSkipBackward(delta:
ITimeValue, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "skipbackward" for current mediaplayer instance. w3cmedia will handle this internally by seek command with delta position to pipeline as a default mode.
Parameters
delta
ITimeValue
sessionId?
any
Returns
Promise<void>
handleSkipForward()
handleSkipForward(delta:
ITimeValue, sessionId?:any):Promise<void>
Callback from KMC server to execute the media control command "skipforward" for current mediaplayer instance. w3cmedia will handle this internally by seek command with delta position to pipeline as a default mode.
Parameters
delta
ITimeValue
sessionId?
any
Returns
Promise<void>
handleStartOver()
handleStartOver(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "startover" for current mediaplayer instance. w3cmedia will handle this internally by seek to start position and initiate the play command to pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handleStop()
handleStop(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "stop" for current mediaplayer instance. w3cmedia will handle this internally by initiating pause command to pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
handleTogglePlayPause()
handleTogglePlayPause(sessionId?:
any):Promise<void>
Callback from KMC server to execute the media control command "toggleplaypause" for current mediaplayer instance. w3cmedia will handle this internally by initiating play/pause based on current state of pipeline as a default mode.
Parameters
sessionId?
any
Returns
Promise<void>
setMediaControlServer()
setMediaControlServer(mediaControlServer:
IMediaControlServerAsync):void
Sets media control server for media control handling.
Parameters
mediaControlServer
IMediaControlServerAsync
setPlayerClient()
setPlayerClient(playerClient: IPlayerClient):
void
Sets player client instance for media control handling.
Parameters
playerClient
Last updated: Jul 31, 2026

