Name Description Size Coverage
AudioFocusManager.cpp 1918 -
AudioFocusManager.h AudioFocusManager is used to assign the audio focus to different requester and decide which requester can own audio focus when audio competing happens. When the audio competing happens, the last request would be a winner who can still own the audio focus, and all the other requesters would lose the audio focus. Now MediaController is the onlt requester, it would request the audio focus when it becomes audible and revoke the audio focus when the controller is no longer active. 1479 -
ContentMediaController.cpp static 14408 -
ContentMediaController.h ContentMediaControlKeyReceiver is an interface which is used to receive media control key sent from the chrome process. 4953 -
ContentPlaybackController.cpp 8616 -
ContentPlaybackController.h This interface is used to handle different playback control actions in the content process. Most of the methods are designed based on the MediaSessionAction values, which are defined in the media session spec [1]. The reason we need that is to explicitly separate the implementation from all different defined methods. If we want to add a new method in the future, we can do that without modifying other methods. If the active media session has a corresponding MediaSessionActionHandler, then we would invoke it, or we would do nothing. However, for certain actions, such as `play`, `pause` and `stop`, we have default action handling in order to control playback correctly even if the website doesn't use media session at all or the media session doesn't have correspending action handler [2]. [1] https://w3c.github.io/mediasession/#enumdef-mediasessionaction [2] https://w3c.github.io/mediasession/#ref-for-active-media-session%E2%91%A1%E2%93%AA 2742 -
MediaControlIPC.h 2909 -
MediaControlKeyManager.cpp 7916 -
MediaControlKeyManager.h MediaControlKeyManager is a wrapper of MediaControlKeySource, which is used to manage creating and destroying a real media keys event source. It monitors the amount of the media controller in MediaService, and would create the event source when there is any existing controller and destroy it when there is no controller. 2343 -
MediaControlKeySource.cpp 4108 -
MediaControlKeySource.h MediaControlKeyListener is a pure interface, which is used to monitor MediaControlKey, we can add it onto the MediaControlKeySource, and then everytime when the media key events occur, `OnActionPerformed` will be called so that we can do related handling. 4643 -
MediaController.cpp 20853 -
MediaController.h IMediaController is an interface which includes control related methods and methods used to know its playback state. 7981 -
MediaControlService.cpp static 18702 -
MediaControlService.h MediaControlService is an interface to access controllers by providing controller Id. Everytime when controller becomes active, which means there is one or more media started in the corresponding browsing context, so now the controller is actually controlling something in the content process, so it would be added into the list of the MediaControlService. The controller would be removed from the list of the MediaControlService when it becomes inactive, which means no media is playing in the corresponding browsing context. Note that, a controller can't be added to or remove from the list twice. It should should have a responsibility to add and remove itself in the proper time. 7280 -
MediaControlUtils.cpp 739 -
MediaControlUtils.h 4632 -
MediaPlaybackStatus.cpp 7155 -
MediaPlaybackStatus.h This enum is used to update controlled media state to the media controller in the chrome process. `eStarted`: media has successfully registered to the content media controller `ePlayed` : media has started playing `ePaused` : media has paused playing, but still can be resumed by content media controller `eStopped`: media has unregistered from the content media controller, we can not control it anymore 6123 -
MediaStatusManager.cpp 19775 -
MediaStatusManager.h IMediaInfoUpdater is an interface which provides methods to update the media related information that happens in the content process. 12647 -
moz.build 1038 -
PositionStateEvent.h THIS FILE IS AUTOGENERATED FROM PositionStateEvent.webidl BY Codegen.py - DO NOT EDIT 1753 -
tests -