MediaSessionOptions Class
The host hooks of the Media Session API (https://w3c.github.io/mediasession/, BrowsingContextOptions.MediaSession).
public sealed class MediaSessionOptionsConstructors
| Name | Description |
|---|---|
| MediaSessionOptions() |
MediaSessionOptions()
public MediaSessionOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| SessionChanged | Gets or sets the callback invoked when a page changes its media session (navigator.mediaSession): its metadata (or an attribute of its metadata), its playback state, its position state, its action handlers, or the state of its microphone, camera and screen sharing. The host reads the MediaSession to show the media controls of the platform (e.g. the lock screen), and calls MediaSession.HandleAction when the user presses one of them. The callback is invoked on the thread of the event loop, and must not block it. The default is null: the media sessions are shown nowhere. The first argument is the context of the window (see CallbackContext): its CallbackContext.Window is never null. |
SessionChanged
MediaSession.csGets or sets the callback invoked when a page changes its media session (navigator.mediaSession): its metadata (or an attribute of its metadata), its playback state, its position state, its action handlers, or the state of its microphone, camera and screen sharing. The host reads the MediaSession to show the media controls of the platform (e.g. the lock screen), and calls MediaSession.HandleAction when the user presses one of them. The callback is invoked on the thread of the event loop, and must not block it. The default is null: the media sessions are shown nowhere. The first argument is the context of the window (see CallbackContext): its CallbackContext.Window is never null.
public Action<CallbackContext, MediaSession>? SessionChanged { get; init; }