Search e01
One query across the encyclopedia, books, dictionary, papers, Wikidata and the developer library. Every hit carries its source.
6 results across 6 corpora for MediaMetadata.
Developer library 6
MediaSession
`MediaSession` to make browser playback controllable from that standard/global user interface. ## Instance properties - metadata - : Returns an instance of MediaMetadata, which contains rich media metadata for display in a platform UI. - playbackState - : Indicates whether the current media session is playing. Valid values are `none`, `paused`, or `playing`. ## Instance methods - setActionHandler() - : Sets
MediaSession: setPositionState() method
duration: audioEl.duration, playbackRate: audioEl.playbackRate, position: audioEl.currentTime, }); } ``` We can use this function when updating MediaMetadata and within callbacks for actions, such as below. ```js navigator.mediaSession.setActionHandler("seekbackward", (details) => { // our time to skip const skipTime = details.seekOffset || 10; // set our position audioEl.currentTime = Math.
MediaSession: setActionHandler() method
ew media session and assigns action handlers (which don't do anything) to it. ```js if ("mediaSession" in navigator) { navigator.mediaSession.metadata = new MediaMetadata({ title: "Unforgettable", artist: "Nat King Cole", album: "The Ultimate Collection (Remastered)", artwork: [ { src: "https://dummyimage.com/96x96", sizes: "96x96", type: "image/png", }, {
MediaSession: metadata property
Media Session API The **`metadata`** property of the MediaSession interface contains a MediaMetadata object providing descriptive information about the currently playing media, or `null` if the metadata has not been set. This metadata is provided by the browser to the device for presentation in any standard media control user interface the device might offer. ## Value An instance of MediaMetadata containing inform
Media Session API
ccess and be controlled by the OS-level media controls (such as Firefox's [MediaControl](https://bugzil.la/1648100)). ## Media Session concepts and usage The MediaMetadata interface lets a website provide rich metadata to the platform UI for media that is playing. This metadata includes the title, artist (creator) name, album (collection), artwork, and chapter information. The platform can show this metadata in med
ChapterInformation
ource (i.e., a video or audio file). The chapter information for a given media resource is set when it is first created, via the `chapterInfo` property of the MediaMetadata() constructor's initialization object. The property takes an array of `ChapterInformation` objects as its value. You can access the chapter information for an existing MediaMetadata object via its chapterInfo property. This returns an array of `