as

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

IMediaControlServerAsync

Represent media control server operations. This interface provides methods for managing media control handlers and updating media session states.

Properties

setHandlerForComponent()

setHandlerForComponent: (handler, instance) => void

Assigns a handler to process requests for media control actions for a given component.

Parameters

handler

IMediaControlHandlerAsync

instance

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.


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 installed IMediaControlHandlerAsync instance.


Last updated: Sep 30, 2025