Name Description Size Coverage
AudioFocusManager.cpp 1941 -
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 -
AudioSessionManager.cpp 13394 -
AudioSessionManager.h Owns the parent-side AudioSession spec state for a single tab (per-top-level-BC). Encapsulates the per-browsing-context override map and the "compute the audio session type" and "update the selected audio session" algorithms behind a small mutator API, so callers cannot reach the underlying map without going through the manager. The owner (`MediaController`) holds the manager directly. The manager keeps a raw back-pointer to the owner for event dispatch and for inherited per-BC audibility queries; the owner outlives the manager by construction. 5022 -
AudioSessionRecord.cpp 2222 -
AudioSessionRecord.h Per-browsing-context AudioSession spec state held in the parent process by MediaController. Lifetime is independent of ContextMediaInfo (the audibility store on MediaPlaybackStatus): an override can be present on a browsing context that has never played media, and ContextMediaInfo can exist without any matching AudioSessionRecord. 3661 -
ContentMediaController.cpp static 15330 -
ContentMediaController.h ContentMediaControlKeyReceiver is an interface which is used to receive media control key sent from the chrome process. 5660 -
ContentPlaybackController.cpp 9502 -
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 2812 -
MediaControlIPC.h 3663 -
MediaControlKeyManager.cpp 8054 -
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 4395 -
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. 4910 -
MediaController.cpp 23533 -
MediaController.h IMediaController is an interface which includes control related methods and methods used to know its playback state. 9494 -
MediaControlService.cpp static 18884 -
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 618 -
MediaControlUtils.h 4498 -
MediaPlaybackStatus.cpp 11777 -
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 9409 -
MediaStatusManager.cpp 19822 -
MediaStatusManager.h IMediaInfoUpdater is an interface which provides methods to update the media related information that happens in the content process. 13361 -
moz.build 1128 -
PositionStateEvent.h THIS FILE IS AUTOGENERATED FROM PositionStateEvent.webidl BY Codegen.py - DO NOT EDIT 1631 -
tests -