||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.
||ContentMediaControlKeyReceiver is an interface which is used to receive media
control key sent from the chrome process.
||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 .
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
||Implementation for FetchImageHelper::ImageFetchListener
||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 .
By using `FetchImage()`, it would return a promise that would resolve with a
`imgIContainer`, then we can get the image data from the container.
||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.
||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.
||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.
||IMediaController is an interface which includes control related methods and
methods used to know its playback state.
||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
`eStopped`: media has unregistered from the content media controller, we can
not control it anymore
||IMediaInfoUpdater is an interface which provides methods to update the media
related information that happens in the content process.
||THIS FILE IS AUTOGENERATED FROM PositionStateEvent.webidl BY Codegen.py - DO