Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support

IPlayerClient

An interface that represents a PlayerClient.

Properties

load

load: (mediaInfo: IPlayerSessionMediaInfo, loadParams?: IPlayerSessionLoadParams, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to load the content using the given URL.


unload

unload: (sessionId?: IPlayerSessionId) => Promise<void>

Request the media session in PlayerServer to unload media content. To unload media content synchronously, for instance, in case when app state changes to background, call .


unloadSync

unloadSync: (timeoutMsec: number, sessionId?: IPlayerSessionId) => IUnloadSyncStatus

Request the media session in PlayerServer to unload media content synchronously. Use this API to release media resources when app state changes to background.

2.2.0


setVideoView

setVideoView: (viewHandle: IViewHandle, sessionId?: IPlayerSessionId) => Promise<void>

Request the media session in PlayerServer to set the KeplerVideoSurfaceView with the loaded content.

setVideoView should be called after the media content has been loaded by calling one of the load APIs.


clearVideoView

clearVideoView: (sessionId?: IPlayerSessionId) => Promise<void>

Request the media session in PlayerServer to clear the KeplerVideoSurfaceView rendering the video content.


setTextView

setTextView: (viewHandle: IViewHandle, sessionId?: IPlayerSessionId) => Promise<void>

Request the media session in PlayerServer to set the KeplerCaptionsView with the loaded content.

setTextView should be called after the media content has been loaded by calling one of the load APIs.


clearTextView

clearTextView: (sessionId?: IPlayerSessionId) => Promise<void>

Request the media session in PlayerServer to clear the KeplerCaptionsView rendering the captions content.


play

play: (sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to start or resume playback.

The media sesssion should update its to reflect the new playback status. The Kepler player server may reset playback speed back to normal.


pause

pause: (sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to pause playback.

The media sesssion should update its to reflect the new playback status.


seek

seek: (position: number, isRelative?: boolean, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to seek to a given playback position (in seconds).

The media sesssion should update its to reflect the new playback position.


setMute

setMute: (isMuted: boolean, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to mute or unmute playback.

The media sesssion should update its to reflect the new playback status.


setPlaybackRate

setPlaybackRate: (playbackRate: number, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to set playback rate of media playback.

The media sesssion should update its to reflect the new playback status.


setVolume

setVolume: (volume: number, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to set volume of media playback.

The media sesssion should update its to reflect the new playback status.


setActiveTrack

setActiveTrack: (trackType: ITrackType, trackId: string, sessionId?: IPlayerSessionId) => Promise<void>

Request the PlayerServer to set the active track of media playback.

The media sesssion should update its to reflect the new playback status.


setMediaControlFocus

setMediaControlFocus: (componentInstance: IComponentInstance, mediaControlHandler?: PlayerClientMediaControlHandler) => Promise<void>

Register PlayerClientMediaControlHandler instance

Available since version 2.1.0.


getCurrentPosition

getCurrentPosition: (sessionId?: IPlayerSessionId) => Promise<number>

Request the PlayerServer to get the current playback position of media playback (in seconds).

The media sesssion should update its to reflect the new playback status.


registerBufferedRangesListener

registerBufferedRangesListener: (listener: IPlayerSessionBufferedRangesListener, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to monitor changes in the buffered ranges.


registerStatusListener

registerStatusListener: (listener: IPlayerSessionStatusListener, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to monitor changes in the player session status.


registerPositionListener

registerPositionListener: (listener: IPlayerSessionPositionListener, interval: number, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to monitor updates in the playback position. This position will be in seconds.


registerTrackListener

registerTrackListener: (listener: IPlayerSessionTrackListener, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to monitor changes in the track information.


registerMessageListener

registerMessageListener: (listener: IPlayerSessionMessageListener, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to receive message from service component.


registerErrorListener

registerErrorListener: (listener: IPlayerSessionErrorListener, sessionId?: IPlayerSessionId) => Promise<ISubscription>

Subscribes a listener to receive error from service component.


sendMessage

sendMessage: (message: any, sessionId?: IPlayerSessionId) => Promise<void>

Provides a way for interactive component to send custom message to service component. Any JSON type can be sent as a message (except undefined).


destroy

destroy: () => void

Destroys the kepler player client instance and stop the Kepler Player Service. Clients are expected to call this API for cleanup of media resources when interactive components gets destroyed.


Last updated: Jul 22, 2026