as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
Ring
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
感谢您的访问。此页面目前仅提供英语版本。我们正在开发中文版本。谢谢您的理解。

KeplerMediaControlHandler

Extends

  • MediaControlHandler

Implements

  • IMediaControlHandlerAsync

Constructors

new KeplerMediaControlHandler()

new KeplerMediaControlHandler(): KeplerMediaControlHandler

Returns

KeplerMediaControlHandler

Methods

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly. Note: Currently this is NOP in default mode and handling will be available in future releases.

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly. Note: Currently this is NOP in default mode and handling will be available in future releases.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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, alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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, alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly. Note: Currently this is NOP in default mode and handling will be available in future releases.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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 "repeate" for current mediaplayer instance. This is NOP for w3cmedia playback handling as this is playlist management feature. App clients are requested to choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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. alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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, alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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, alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

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, alternatively App client can choose to override the callback function using OverrideMediaControlHandler and implement accordingly.

Parameters

sessionId?

any

Returns

Promise<void>


Last updated: Jul 22, 2026