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 |
14562 |
ContentMediaController.h |
ContentMediaControlKeyReceiver is an interface which is used to receive media
control key sent from the chrome process.
|
4953 |
ContentPlaybackController.cpp |
|
8647 |
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 |
FetchImageHelper.cpp |
Implementation for FetchImageHelper::ImageFetchListener
|
4745 |
FetchImageHelper.h |
FetchImageHelper is used to fetch image data from MediaImage, and the fetched
image data would be used to show on the virtual control inferface. The URL of
MediaImage is defined by websites by using MediaSession API [1].
By using `FetchImage()`, it would return a promise that would resolve with a
`imgIContainer`, then we can get the image data from the container.
[1] https://w3c.github.io/mediasession/#dictdef-mediaimage
|
2861 |
MediaControlIPC.h |
|
2910 |
MediaControlKeyManager.cpp |
|
7952 |
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 |
|
20842 |
MediaController.h |
IMediaController is an interface which includes control related methods and
methods used to know its playback state.
|
7981 |
MediaControlService.cpp |
static |
18728 |
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.
|
7318 |
MediaControlUtils.cpp |
|
739 |
MediaControlUtils.h |
|
4397 |
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
|
6151 |
MediaStatusManager.cpp |
|
19779 |
MediaStatusManager.h |
IMediaInfoUpdater is an interface which provides methods to update the media
related information that happens in the content process.
|
12647 |
moz.build |
|
1118 |
PositionStateEvent.h |
THIS FILE IS AUTOGENERATED FROM PositionStateEvent.webidl BY Codegen.py - DO
NOT EDIT |
1753 |
tests |
|
|