Implements
Constructors
new MediaControlServer()
new MediaControlServer():MediaControlServer
Returns
MediaControlServer
Methods
setHandlerForComponent()
setHandlerForComponent(handler, componentInstance): void
Assigns a handler to process requests for media control actions for a given
component.
Parameters
handler
IMediaControlHandlerAsync
componentInstance
IComponentInstance
Returns
void
Remarks
Assigning a handler is essential for processing media control requests and implementing custom media control logic. There is only one active handler at a time. The active handler is the one set by the most recent invocation of setHandler.Implementation of
IMediaControlServerAsync.setHandlerForComponent
updateMediaSessionStates()
updateMediaSessionStates(states): void
Updates the state of the media sessions.
Parameters
states
MediaSessionState[]
Returns
void
Remarks
Updating the session states is crucial for reflecting changes in media playback status, available media streams, and other related information. State changes can also be an action taken by a media control server application upon acting on an media control action received through the installedIMediaControlHandlerAsync instance.
Implementation of
IMediaControlServerAsync.updateMediaSessionStates

