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
Native
Skip to main content

Interface IMediaControlServerAsync

interface IMediaControlServerAsync
Extends com.amazon.apmf.IStandard Interface for media control server operations.

Methods

setHandlerForComponent()

void setHandlerForComponent(IMediaControlHandlerAsync* handler, com.amazon.kepler.runtime.IComponentInstance* component)
Assigns a handler to process requests for media control actions associated with a given component. Assigning a handler is essential for processing media control requests and implementing custom media control logic. This call allows one handler per component. The active handler is the one set by the last invocation to setHandler.

Parameters

handler
IMediaControlHandlerAsync* — Required The instance to invoke when media control requests arrive.
component
com.amazon.kepler.runtime.IComponentInstance* — Required The component instance to associate with the given handler, obtained from component lifecycle functions like onStart.

updateMediaSessionStates()

void updateMediaSessionStates(MediaSessionState*[] states)
Notifies interested clients about media session state updates. Updating the server session states is crucial for reflecting changes in media playback status, currently selected media, and other related information. When applicable, a media control server is expected to issue session state updates upon acting on a media control request received through the installed [IMediaControlHandlerAsync] instance.

Parameters

states
MediaSessionState*[] — Required The media session states that have been updated. The list can contain one or more media session states.
Last modified on October 29, 2026