You.i Engine
CYIAbstractVideoPlayer::BackgroundPlaybackInterface Class Referenceabstract

Detailed Description

Interface containing all functionality required to achieve playback of media when the application is in the background.

Player implementations which support playback of media in the background implement this interface and return a pointer to the instance via GetBackgroundPlaybackInterface.

#include <player/YiAbstractVideoPlayer.h>

Public Member Functions

virtual ~BackgroundPlaybackInterface ()=default
virtual bool IsBackgroundPlaybackEnabled () const =0
virtual void EnableBackgroundPlayback (bool enabled)=0
virtual void SetMetadata (const CYIString &title, const CYIString &text, const CYIUrl &imageUri)=0
virtual void SetRewindIncrementMs (std::chrono::milliseconds increment)=0
virtual void SetFastForwardIncrementMs (std::chrono::milliseconds increment)=0
virtual void SetNotificationColor (const CYIColor &color)=0

Constructor & Destructor Documentation

◆ ~BackgroundPlaybackInterface()

virtual CYIAbstractVideoPlayer::BackgroundPlaybackInterface::~BackgroundPlaybackInterface ( )

Member Function Documentation

◆ EnableBackgroundPlayback()

virtual void CYIAbstractVideoPlayer::BackgroundPlaybackInterface::EnableBackgroundPlayback ( bool  enabled)
pure virtual

Enables or disables background playback of media. When enabled is true media will continue playback when the application is sent into the background. This toggle is independent of media, once enabled on a player instance background playback will remain enabled until disabled via this method.

◆ IsBackgroundPlaybackEnabled()

virtual bool CYIAbstractVideoPlayer::BackgroundPlaybackInterface::IsBackgroundPlaybackEnabled ( ) const
pure virtual

Returns true if background playback is currently enabled. By default background playback is disabled on all player implementations provided by You.i Engine.

◆ SetFastForwardIncrementMs()

virtual void CYIAbstractVideoPlayer::BackgroundPlaybackInterface::SetFastForwardIncrementMs ( std::chrono::milliseconds  increment)
pure virtual

Sets the incremement that the fast forward button will progress playback.

◆ SetMetadata()

virtual void CYIAbstractVideoPlayer::BackgroundPlaybackInterface::SetMetadata ( const CYIString title,
const CYIString text,
const CYIUrl imageUri 
pure virtual

Sets the metadata of the background playback notification.

iamgeUri currently only supports network images.

◆ SetNotificationColor()

virtual void CYIAbstractVideoPlayer::BackgroundPlaybackInterface::SetNotificationColor ( const CYIColor color)
pure virtual

Sets the color of the playback notification.

◆ SetRewindIncrementMs()

virtual void CYIAbstractVideoPlayer::BackgroundPlaybackInterface::SetRewindIncrementMs ( std::chrono::milliseconds  increment)
pure virtual

Sets the incremement that the rewind button will rewind playback.

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