An interface which provides control over the behavior of the player in response to platform media playback controls, such as media control buttons on headphones, or through voice commands.
Player implementations which handle the platform media playback controls implement this interface and return a pointer to the instance via GetMediaPlaybackControlsInterface.
#include <player/YiAbstractVideoPlayer.h>
Classes | |
class | ControlsHandler |
Public Member Functions | |
virtual | ~MediaPlaybackControlsInterface ()=default |
virtual void | EnableMediaPlaybackControl (bool enabled)=0 |
virtual bool | IsMediaPlaybackControlEnabled () const =0 |
virtual void | SetControlsHandler (ControlsHandler *pControlsHandler)=0 |
|
virtualdefault |
|
pure virtual |
Sets whether the player handles platform media playback controls. If enabled is true, then the player will be set to handle all external media controls, and no media key events will be bubbled up to the app through CYIEventHandler::HandleEvent. If enabled is false, the player will not handle external media controls, and media key events will be bubbled up to the app through CYIEventHandler::HandleEvent as normal.
|
pure virtual |
Returns whether the player is set to respond to platform media playback controls.
|
pure virtual |
Sets a ControlsHandler to intercept media playback control operations. If set to nullptr, the media controls will be handled automatically.