webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
WebCore::PlatformMediaSession Class Reference

#include <PlatformMediaSession.h>

Classes

union  RemoteCommandArgument
 

Public Types

enum  MediaType {
  None = 0, Video, VideoAudio, Audio,
  WebAudio, None = 0, Video, VideoAudio,
  Audio, WebAudio
}
 
enum  State {
  Idle, Autoplaying, Playing, Paused,
  Interrupted, Idle, Autoplaying, Playing,
  Paused, Interrupted
}
 
enum  InterruptionType {
  NoInterruption, SystemSleep, EnteringBackground, SystemInterruption,
  SuspendedUnderLock, InvisibleAutoplay, NoInterruption, SystemSleep,
  EnteringBackground, SystemInterruption, SuspendedUnderLock, InvisibleAutoplay
}
 
enum  EndInterruptionFlags { NoFlags = 0, MayResumePlaying = 1 << 0, NoFlags = 0, MayResumePlaying = 1 << 0 }
 
enum  Characteristics {
  HasNothing = 0, HasAudio = 1 << 0, HasVideo = 1 << 1, HasNothing = 0,
  HasAudio = 1 << 0, HasVideo = 1 << 1
}
 
enum  RemoteControlCommandType {
  NoCommand, PlayCommand, PauseCommand, StopCommand,
  TogglePlayPauseCommand, BeginSeekingBackwardCommand, EndSeekingBackwardCommand, BeginSeekingForwardCommand,
  EndSeekingForwardCommand, SeekToPlaybackPositionCommand, NoCommand, PlayCommand,
  PauseCommand, StopCommand, TogglePlayPauseCommand, BeginSeekingBackwardCommand,
  EndSeekingBackwardCommand, BeginSeekingForwardCommand, EndSeekingForwardCommand, SeekToPlaybackPositionCommand
}
 
enum  DisplayType {
  Normal, Fullscreen, Optimized, Normal,
  Fullscreen, Optimized
}
 
enum  MediaType {
  None = 0, Video, VideoAudio, Audio,
  WebAudio, None = 0, Video, VideoAudio,
  Audio, WebAudio
}
 
enum  State {
  Idle, Autoplaying, Playing, Paused,
  Interrupted, Idle, Autoplaying, Playing,
  Paused, Interrupted
}
 
enum  InterruptionType {
  NoInterruption, SystemSleep, EnteringBackground, SystemInterruption,
  SuspendedUnderLock, InvisibleAutoplay, NoInterruption, SystemSleep,
  EnteringBackground, SystemInterruption, SuspendedUnderLock, InvisibleAutoplay
}
 
enum  EndInterruptionFlags { NoFlags = 0, MayResumePlaying = 1 << 0, NoFlags = 0, MayResumePlaying = 1 << 0 }
 
enum  Characteristics {
  HasNothing = 0, HasAudio = 1 << 0, HasVideo = 1 << 1, HasNothing = 0,
  HasAudio = 1 << 0, HasVideo = 1 << 1
}
 
enum  RemoteControlCommandType {
  NoCommand, PlayCommand, PauseCommand, StopCommand,
  TogglePlayPauseCommand, BeginSeekingBackwardCommand, EndSeekingBackwardCommand, BeginSeekingForwardCommand,
  EndSeekingForwardCommand, SeekToPlaybackPositionCommand, NoCommand, PlayCommand,
  PauseCommand, StopCommand, TogglePlayPauseCommand, BeginSeekingBackwardCommand,
  EndSeekingBackwardCommand, BeginSeekingForwardCommand, EndSeekingForwardCommand, SeekToPlaybackPositionCommand
}
 
enum  DisplayType {
  Normal, Fullscreen, Optimized, Normal,
  Fullscreen, Optimized
}
 
typedef unsigned CharacteristicsFlags
 
typedef unsigned CharacteristicsFlags
 

Public Member Functions

 PlatformMediaSession (PlatformMediaSessionClient &)
 
virtual ~PlatformMediaSession ()
 
MediaType mediaType () const
 
MediaType presentationType () const
 
State state () const
 
void setState (State)
 
InterruptionType interruptionType () const
 
CharacteristicsFlags characteristics () const
 
void clientCharacteristicsChanged ()
 
void beginInterruption (InterruptionType)
 
void endInterruption (EndInterruptionFlags)
 
void clientWillBeginAutoplaying ()
 
bool clientWillBeginPlayback ()
 
bool clientWillPausePlayback ()
 
void pauseSession ()
 
void stopSession ()
 
void visibilityChanged ()
 
bool canReceiveRemoteControlCommands () const
 
void didReceiveRemoteControlCommand (RemoteControlCommandType, const RemoteCommandArgument *argument=nullptr)
 
bool supportsSeeking () const
 
DisplayType displayType () const
 
bool isHidden () const
 
bool shouldOverrideBackgroundLoadingRestriction () const
 
virtual bool canPlayToWirelessPlaybackTarget () const
 
virtual bool isPlayingToWirelessPlaybackTarget () const
 
void isPlayingToWirelessPlaybackTargetChanged (bool)
 
bool activeAudioSessionRequired ()
 
bool canProduceAudio () const
 
void canProduceAudioChanged ()
 
void scheduleClientDataBufferingCheck ()
 
virtual void resetPlaybackSessionState ()
 
String sourceApplicationIdentifier () const
 
virtual bool allowsNowPlayingControlsVisibility () const
 
 PlatformMediaSession (PlatformMediaSessionClient &)
 
virtual ~PlatformMediaSession ()
 
MediaType mediaType () const
 
MediaType presentationType () const
 
State state () const
 
void setState (State)
 
InterruptionType interruptionType () const
 
CharacteristicsFlags characteristics () const
 
void clientCharacteristicsChanged ()
 
void beginInterruption (InterruptionType)
 
void endInterruption (EndInterruptionFlags)
 
void clientWillBeginAutoplaying ()
 
bool clientWillBeginPlayback ()
 
bool clientWillPausePlayback ()
 
void pauseSession ()
 
void stopSession ()
 
void visibilityChanged ()
 
bool canReceiveRemoteControlCommands () const
 
void didReceiveRemoteControlCommand (RemoteControlCommandType, const RemoteCommandArgument *argument=nullptr)
 
bool supportsSeeking () const
 
DisplayType displayType () const
 
bool isHidden () const
 
bool shouldOverrideBackgroundLoadingRestriction () const
 
virtual bool canPlayToWirelessPlaybackTarget () const
 
virtual bool isPlayingToWirelessPlaybackTarget () const
 
void isPlayingToWirelessPlaybackTargetChanged (bool)
 
bool activeAudioSessionRequired ()
 
bool canProduceAudio () const
 
void canProduceAudioChanged ()
 
void scheduleClientDataBufferingCheck ()
 
virtual void resetPlaybackSessionState ()
 
String sourceApplicationIdentifier () const
 
virtual bool allowsNowPlayingControlsVisibility () const
 

Static Public Member Functions

static std::unique_ptr< PlatformMediaSessioncreate (PlatformMediaSessionClient &)
 
static std::unique_ptr< PlatformMediaSessioncreate (PlatformMediaSessionClient &)
 

Protected Member Functions

PlatformMediaSessionClientclient () const
 
PlatformMediaSessionClientclient () const
 

Friends

class PlatformMediaSessionManager
 

Member Typedef Documentation

◆ CharacteristicsFlags [1/2]

◆ CharacteristicsFlags [2/2]

Member Enumeration Documentation

◆ Characteristics [1/2]

Enumerator
HasNothing 
HasAudio 
HasVideo 
HasNothing 
HasAudio 
HasVideo 

◆ Characteristics [2/2]

Enumerator
HasNothing 
HasAudio 
HasVideo 
HasNothing 
HasAudio 
HasVideo 

◆ DisplayType [1/2]

Enumerator
Normal 
Fullscreen 
Optimized 
Normal 
Fullscreen 
Optimized 

◆ DisplayType [2/2]

Enumerator
Normal 
Fullscreen 
Optimized 
Normal 
Fullscreen 
Optimized 

◆ EndInterruptionFlags [1/2]

Enumerator
NoFlags 
MayResumePlaying 
NoFlags 
MayResumePlaying 

◆ EndInterruptionFlags [2/2]

Enumerator
NoFlags 
MayResumePlaying 
NoFlags 
MayResumePlaying 

◆ InterruptionType [1/2]

Enumerator
NoInterruption 
SystemSleep 
EnteringBackground 
SystemInterruption 
SuspendedUnderLock 
InvisibleAutoplay 
NoInterruption 
SystemSleep 
EnteringBackground 
SystemInterruption 
SuspendedUnderLock 
InvisibleAutoplay 

◆ InterruptionType [2/2]

Enumerator
NoInterruption 
SystemSleep 
EnteringBackground 
SystemInterruption 
SuspendedUnderLock 
InvisibleAutoplay 
NoInterruption 
SystemSleep 
EnteringBackground 
SystemInterruption 
SuspendedUnderLock 
InvisibleAutoplay 

◆ MediaType [1/2]

Enumerator
None 
Video 
VideoAudio 
Audio 
WebAudio 
None 
Video 
VideoAudio 
Audio 
WebAudio 

◆ MediaType [2/2]

Enumerator
None 
Video 
VideoAudio 
Audio 
WebAudio 
None 
Video 
VideoAudio 
Audio 
WebAudio 

◆ RemoteControlCommandType [1/2]

Enumerator
NoCommand 
PlayCommand 
PauseCommand 
StopCommand 
TogglePlayPauseCommand 
BeginSeekingBackwardCommand 
EndSeekingBackwardCommand 
BeginSeekingForwardCommand 
EndSeekingForwardCommand 
SeekToPlaybackPositionCommand 
NoCommand 
PlayCommand 
PauseCommand 
StopCommand 
TogglePlayPauseCommand 
BeginSeekingBackwardCommand 
EndSeekingBackwardCommand 
BeginSeekingForwardCommand 
EndSeekingForwardCommand 
SeekToPlaybackPositionCommand 

◆ RemoteControlCommandType [2/2]

Enumerator
NoCommand 
PlayCommand 
PauseCommand 
StopCommand 
TogglePlayPauseCommand 
BeginSeekingBackwardCommand 
EndSeekingBackwardCommand 
BeginSeekingForwardCommand 
EndSeekingForwardCommand 
SeekToPlaybackPositionCommand 
NoCommand 
PlayCommand 
PauseCommand 
StopCommand 
TogglePlayPauseCommand 
BeginSeekingBackwardCommand 
EndSeekingBackwardCommand 
BeginSeekingForwardCommand 
EndSeekingForwardCommand 
SeekToPlaybackPositionCommand 

◆ State [1/2]

Enumerator
Idle 
Autoplaying 
Playing 
Paused 
Interrupted 
Idle 
Autoplaying 
Playing 
Paused 
Interrupted 

◆ State [2/2]

Enumerator
Idle 
Autoplaying 
Playing 
Paused 
Interrupted 
Idle 
Autoplaying 
Playing 
Paused 
Interrupted 

Constructor & Destructor Documentation

◆ PlatformMediaSession() [1/2]

WebCore::PlatformMediaSession::PlatformMediaSession ( PlatformMediaSessionClient )

◆ ~PlatformMediaSession() [1/2]

virtual WebCore::PlatformMediaSession::~PlatformMediaSession ( )
virtual

◆ PlatformMediaSession() [2/2]

WebCore::PlatformMediaSession::PlatformMediaSession ( PlatformMediaSessionClient )

◆ ~PlatformMediaSession() [2/2]

virtual WebCore::PlatformMediaSession::~PlatformMediaSession ( )
virtual

Member Function Documentation

◆ activeAudioSessionRequired() [1/2]

bool WebCore::PlatformMediaSession::activeAudioSessionRequired ( )

◆ activeAudioSessionRequired() [2/2]

bool WebCore::PlatformMediaSession::activeAudioSessionRequired ( )

◆ allowsNowPlayingControlsVisibility() [1/2]

virtual bool WebCore::PlatformMediaSession::allowsNowPlayingControlsVisibility ( ) const
inlinevirtual

◆ allowsNowPlayingControlsVisibility() [2/2]

virtual bool WebCore::PlatformMediaSession::allowsNowPlayingControlsVisibility ( ) const
inlinevirtual

◆ beginInterruption() [1/2]

void WebCore::PlatformMediaSession::beginInterruption ( InterruptionType  )

◆ beginInterruption() [2/2]

void WebCore::PlatformMediaSession::beginInterruption ( InterruptionType  )

◆ canPlayToWirelessPlaybackTarget() [1/2]

virtual bool WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget ( ) const
inlinevirtual

◆ canPlayToWirelessPlaybackTarget() [2/2]

virtual bool WebCore::PlatformMediaSession::canPlayToWirelessPlaybackTarget ( ) const
inlinevirtual

◆ canProduceAudio() [1/2]

bool WebCore::PlatformMediaSession::canProduceAudio ( ) const

◆ canProduceAudio() [2/2]

bool WebCore::PlatformMediaSession::canProduceAudio ( ) const

◆ canProduceAudioChanged() [1/2]

void WebCore::PlatformMediaSession::canProduceAudioChanged ( )

◆ canProduceAudioChanged() [2/2]

void WebCore::PlatformMediaSession::canProduceAudioChanged ( )

◆ canReceiveRemoteControlCommands() [1/2]

bool WebCore::PlatformMediaSession::canReceiveRemoteControlCommands ( ) const

◆ canReceiveRemoteControlCommands() [2/2]

bool WebCore::PlatformMediaSession::canReceiveRemoteControlCommands ( ) const

◆ characteristics() [1/2]

CharacteristicsFlags WebCore::PlatformMediaSession::characteristics ( ) const

◆ characteristics() [2/2]

CharacteristicsFlags WebCore::PlatformMediaSession::characteristics ( ) const

◆ client() [1/2]

PlatformMediaSessionClient& WebCore::PlatformMediaSession::client ( ) const
inlineprotected

◆ client() [2/2]

PlatformMediaSessionClient& WebCore::PlatformMediaSession::client ( ) const
inlineprotected

◆ clientCharacteristicsChanged() [1/2]

void WebCore::PlatformMediaSession::clientCharacteristicsChanged ( )

◆ clientCharacteristicsChanged() [2/2]

void WebCore::PlatformMediaSession::clientCharacteristicsChanged ( )

◆ clientWillBeginAutoplaying() [1/2]

void WebCore::PlatformMediaSession::clientWillBeginAutoplaying ( )

◆ clientWillBeginAutoplaying() [2/2]

void WebCore::PlatformMediaSession::clientWillBeginAutoplaying ( )

◆ clientWillBeginPlayback() [1/2]

bool WebCore::PlatformMediaSession::clientWillBeginPlayback ( )

◆ clientWillBeginPlayback() [2/2]

bool WebCore::PlatformMediaSession::clientWillBeginPlayback ( )

◆ clientWillPausePlayback() [1/2]

bool WebCore::PlatformMediaSession::clientWillPausePlayback ( )

◆ clientWillPausePlayback() [2/2]

bool WebCore::PlatformMediaSession::clientWillPausePlayback ( )

◆ create() [1/2]

static std::unique_ptr<PlatformMediaSession> WebCore::PlatformMediaSession::create ( PlatformMediaSessionClient )
static

◆ create() [2/2]

static std::unique_ptr<PlatformMediaSession> WebCore::PlatformMediaSession::create ( PlatformMediaSessionClient )
static

◆ didReceiveRemoteControlCommand() [1/2]

void WebCore::PlatformMediaSession::didReceiveRemoteControlCommand ( RemoteControlCommandType  ,
const RemoteCommandArgument argument = nullptr 
)

◆ didReceiveRemoteControlCommand() [2/2]

void WebCore::PlatformMediaSession::didReceiveRemoteControlCommand ( RemoteControlCommandType  ,
const RemoteCommandArgument argument = nullptr 
)

◆ displayType() [1/2]

DisplayType WebCore::PlatformMediaSession::displayType ( ) const

◆ displayType() [2/2]

DisplayType WebCore::PlatformMediaSession::displayType ( ) const

◆ endInterruption() [1/2]

void WebCore::PlatformMediaSession::endInterruption ( EndInterruptionFlags  )

◆ endInterruption() [2/2]

void WebCore::PlatformMediaSession::endInterruption ( EndInterruptionFlags  )

◆ interruptionType() [1/2]

InterruptionType WebCore::PlatformMediaSession::interruptionType ( ) const
inline

◆ interruptionType() [2/2]

InterruptionType WebCore::PlatformMediaSession::interruptionType ( ) const
inline

◆ isHidden() [1/2]

bool WebCore::PlatformMediaSession::isHidden ( ) const

◆ isHidden() [2/2]

bool WebCore::PlatformMediaSession::isHidden ( ) const

◆ isPlayingToWirelessPlaybackTarget() [1/2]

virtual bool WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget ( ) const
inlinevirtual

◆ isPlayingToWirelessPlaybackTarget() [2/2]

virtual bool WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTarget ( ) const
inlinevirtual

◆ isPlayingToWirelessPlaybackTargetChanged() [1/2]

void WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTargetChanged ( bool  )

◆ isPlayingToWirelessPlaybackTargetChanged() [2/2]

void WebCore::PlatformMediaSession::isPlayingToWirelessPlaybackTargetChanged ( bool  )

◆ mediaType() [1/2]

MediaType WebCore::PlatformMediaSession::mediaType ( ) const

◆ mediaType() [2/2]

MediaType WebCore::PlatformMediaSession::mediaType ( ) const

◆ pauseSession() [1/2]

void WebCore::PlatformMediaSession::pauseSession ( )

◆ pauseSession() [2/2]

void WebCore::PlatformMediaSession::pauseSession ( )

◆ presentationType() [1/2]

MediaType WebCore::PlatformMediaSession::presentationType ( ) const

◆ presentationType() [2/2]

MediaType WebCore::PlatformMediaSession::presentationType ( ) const

◆ resetPlaybackSessionState() [1/2]

virtual void WebCore::PlatformMediaSession::resetPlaybackSessionState ( )
inlinevirtual

◆ resetPlaybackSessionState() [2/2]

virtual void WebCore::PlatformMediaSession::resetPlaybackSessionState ( )
inlinevirtual

◆ scheduleClientDataBufferingCheck() [1/2]

void WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck ( )

◆ scheduleClientDataBufferingCheck() [2/2]

void WebCore::PlatformMediaSession::scheduleClientDataBufferingCheck ( )

◆ setState() [1/2]

void WebCore::PlatformMediaSession::setState ( State  )

◆ setState() [2/2]

void WebCore::PlatformMediaSession::setState ( State  )

◆ shouldOverrideBackgroundLoadingRestriction() [1/2]

bool WebCore::PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction ( ) const

◆ shouldOverrideBackgroundLoadingRestriction() [2/2]

bool WebCore::PlatformMediaSession::shouldOverrideBackgroundLoadingRestriction ( ) const

◆ sourceApplicationIdentifier() [1/2]

String WebCore::PlatformMediaSession::sourceApplicationIdentifier ( ) const

◆ sourceApplicationIdentifier() [2/2]

String WebCore::PlatformMediaSession::sourceApplicationIdentifier ( ) const

◆ state() [1/2]

State WebCore::PlatformMediaSession::state ( ) const
inline

◆ state() [2/2]

State WebCore::PlatformMediaSession::state ( ) const
inline

◆ stopSession() [1/2]

void WebCore::PlatformMediaSession::stopSession ( )

◆ stopSession() [2/2]

void WebCore::PlatformMediaSession::stopSession ( )

◆ supportsSeeking() [1/2]

bool WebCore::PlatformMediaSession::supportsSeeking ( ) const

◆ supportsSeeking() [2/2]

bool WebCore::PlatformMediaSession::supportsSeeking ( ) const

◆ visibilityChanged() [1/2]

void WebCore::PlatformMediaSession::visibilityChanged ( )

◆ visibilityChanged() [2/2]

void WebCore::PlatformMediaSession::visibilityChanged ( )

Friends And Related Function Documentation

◆ PlatformMediaSessionManager


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