You.i Engine
CYIAbstractVideoPlayer::MediaPlaybackControlsInterface Class Referenceabstract

Detailed Description

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
 

Constructor & Destructor Documentation

◆ ~MediaPlaybackControlsInterface()

virtual CYIAbstractVideoPlayer::MediaPlaybackControlsInterface::~MediaPlaybackControlsInterface ( )
virtualdefault

Member Function Documentation

◆ EnableMediaPlaybackControl()

virtual void CYIAbstractVideoPlayer::MediaPlaybackControlsInterface::EnableMediaPlaybackControl ( bool  enabled)
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.

Note
Some external media controls may only be handled by the player when media playback controls are enabled, with no corresponding media key event bubbled up to the app when media playback control is disabled.
See also
CYIEventHandler::HandleEvent

◆ IsMediaPlaybackControlEnabled()

virtual bool CYIAbstractVideoPlayer::MediaPlaybackControlsInterface::IsMediaPlaybackControlEnabled ( ) const
pure virtual

Returns whether the player is set to respond to platform media playback controls.

◆ SetControlsHandler()

virtual void CYIAbstractVideoPlayer::MediaPlaybackControlsInterface::SetControlsHandler ( ControlsHandler pControlsHandler)
pure virtual

Sets a ControlsHandler to intercept media playback control operations. If set to nullptr, the media controls will be handled automatically.

Note
EnableMediaPlaybackControl must also be called to enable the player to handle media controls.
See also
EnableMediaPlaybackControl

The documentation for this class was generated from the following file: