@videojs/html 10.3.0 → 10.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/default/define/audio/compat-skin.css +91 -38
- package/dist/default/define/audio/compat-skin2.js +1 -1
- package/dist/default/define/audio/neutral-skin.css +52 -31
- package/dist/default/define/audio/neutral-skin2.js +1 -1
- package/dist/default/define/audio/scaffold-skin.css +105 -40
- package/dist/default/define/audio/scaffold-skin2.js +1 -1
- package/dist/default/define/audio/skin.css +53 -31
- package/dist/default/define/audio/skin2.js +1 -1
- package/dist/default/define/live-audio/compat-skin.css +91 -38
- package/dist/default/define/live-audio/compat-skin2.js +1 -1
- package/dist/default/define/live-audio/neutral-skin.css +50 -29
- package/dist/default/define/live-audio/neutral-skin2.js +1 -1
- package/dist/default/define/live-audio/scaffold-skin.css +105 -40
- package/dist/default/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/default/define/live-audio/skin.css +51 -29
- package/dist/default/define/live-audio/skin2.js +1 -1
- package/dist/default/define/live-video/compat-skin.css +142 -61
- package/dist/default/define/live-video/compat-skin2.js +1 -1
- package/dist/default/define/live-video/neutral-skin.css +241 -55
- package/dist/default/define/live-video/neutral-skin2.js +1 -1
- package/dist/default/define/live-video/scaffold-skin.css +159 -63
- package/dist/default/define/live-video/scaffold-skin2.js +1 -1
- package/dist/default/define/live-video/skin.css +245 -60
- package/dist/default/define/live-video/skin2.js +1 -1
- package/dist/default/define/ui/time-slider-markers.js +5 -0
- package/dist/default/define/video/compat-skin.css +150 -61
- package/dist/default/define/video/compat-skin2.js +1 -1
- package/dist/default/define/video/neutral-skin.css +322 -66
- package/dist/default/define/video/neutral-skin2.js +1 -1
- package/dist/default/define/video/scaffold-skin.css +168 -63
- package/dist/default/define/video/scaffold-skin2.js +1 -1
- package/dist/default/define/video/skin.css +348 -66
- package/dist/default/define/video/skin2.js +1 -1
- package/dist/default/index.js +3 -1
- package/dist/default/internal/skins/compat-audio/skin.css +91 -38
- package/dist/default/internal/skins/compat-live-audio/skin.css +91 -38
- package/dist/default/internal/skins/compat-live-video/skin.css +142 -61
- package/dist/default/internal/skins/compat-live-video/template.js +2 -0
- package/dist/default/internal/skins/compat-video/skin.css +150 -61
- package/dist/default/internal/skins/compat-video/template.js +2 -0
- package/dist/default/internal/skins/default-audio/skin.css +53 -31
- package/dist/default/internal/skins/default-live-audio/skin.css +51 -29
- package/dist/default/internal/skins/default-live-video/skin.css +245 -60
- package/dist/default/internal/skins/default-live-video/template.js +14 -0
- package/dist/default/internal/skins/default-video/register.js +3 -0
- package/dist/default/internal/skins/default-video/skin.css +348 -66
- package/dist/default/internal/skins/default-video/template.js +33 -5
- package/dist/default/internal/skins/neutral-audio/skin.css +52 -31
- package/dist/default/internal/skins/neutral-live-audio/skin.css +50 -29
- package/dist/default/internal/skins/neutral-live-video/skin.css +241 -55
- package/dist/default/internal/skins/neutral-live-video/template.js +14 -0
- package/dist/default/internal/skins/neutral-video/skin.css +322 -66
- package/dist/default/internal/skins/neutral-video/template.js +25 -11
- package/dist/default/internal/skins/scaffold-audio/skin.css +105 -40
- package/dist/default/internal/skins/scaffold-live-audio/skin.css +105 -40
- package/dist/default/internal/skins/scaffold-live-video/skin.css +159 -63
- package/dist/default/internal/skins/scaffold-live-video/template.js +2 -0
- package/dist/default/internal/skins/scaffold-video/skin.css +168 -63
- package/dist/default/internal/skins/scaffold-video/template.js +3 -1
- package/dist/default/media/background-video/adapter.js +13 -35
- package/dist/default/media/background-video/base.js +95 -0
- package/dist/default/media/background-video/template.js +13 -20
- package/dist/default/media/hls-background-video/adapter.js +16 -35
- package/dist/default/ui/captions-radio-group/element.js +14 -1
- package/dist/default/ui/controls/element.js +6 -3
- package/dist/default/ui/time-slider/markers.js +160 -0
- package/dist/default/version.js +1 -1
- package/dist/dev/define/audio/compat-skin.css +91 -38
- package/dist/dev/define/audio/compat-skin2.js +1 -1
- package/dist/dev/define/audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/audio/neutral-skin.css +52 -31
- package/dist/dev/define/audio/neutral-skin2.js +1 -1
- package/dist/dev/define/audio/neutral-skin2.js.map +1 -1
- package/dist/dev/define/audio/scaffold-skin.css +105 -40
- package/dist/dev/define/audio/scaffold-skin2.js +1 -1
- package/dist/dev/define/audio/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/audio/skin.css +53 -31
- package/dist/dev/define/audio/skin2.js +1 -1
- package/dist/dev/define/audio/skin2.js.map +1 -1
- package/dist/dev/define/live-audio/compat-skin.css +91 -38
- package/dist/dev/define/live-audio/compat-skin2.js +1 -1
- package/dist/dev/define/live-audio/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/neutral-skin.css +50 -29
- package/dist/dev/define/live-audio/neutral-skin2.js +1 -1
- package/dist/dev/define/live-audio/neutral-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/scaffold-skin.css +105 -40
- package/dist/dev/define/live-audio/scaffold-skin2.js +1 -1
- package/dist/dev/define/live-audio/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/live-audio/skin.css +51 -29
- package/dist/dev/define/live-audio/skin2.js +1 -1
- package/dist/dev/define/live-audio/skin2.js.map +1 -1
- package/dist/dev/define/live-video/compat-skin.css +142 -61
- package/dist/dev/define/live-video/compat-skin2.js +1 -1
- package/dist/dev/define/live-video/compat-skin2.js.map +1 -1
- package/dist/dev/define/live-video/neutral-skin.css +241 -55
- package/dist/dev/define/live-video/neutral-skin2.js +1 -1
- package/dist/dev/define/live-video/neutral-skin2.js.map +1 -1
- package/dist/dev/define/live-video/scaffold-skin.css +159 -63
- package/dist/dev/define/live-video/scaffold-skin2.js +1 -1
- package/dist/dev/define/live-video/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/live-video/skin.css +245 -60
- package/dist/dev/define/live-video/skin2.js +1 -1
- package/dist/dev/define/live-video/skin2.js.map +1 -1
- package/dist/dev/define/ui/time-slider-markers.d.ts +8 -0
- package/dist/dev/define/ui/time-slider-markers.js +7 -0
- package/dist/dev/define/ui/time-slider-markers.js.map +1 -0
- package/dist/dev/define/video/compat-skin.css +150 -61
- package/dist/dev/define/video/compat-skin2.js +1 -1
- package/dist/dev/define/video/compat-skin2.js.map +1 -1
- package/dist/dev/define/video/neutral-skin.css +322 -66
- package/dist/dev/define/video/neutral-skin2.js +1 -1
- package/dist/dev/define/video/neutral-skin2.js.map +1 -1
- package/dist/dev/define/video/scaffold-skin.css +168 -63
- package/dist/dev/define/video/scaffold-skin2.js +1 -1
- package/dist/dev/define/video/scaffold-skin2.js.map +1 -1
- package/dist/dev/define/video/skin.css +348 -66
- package/dist/dev/define/video/skin2.js +1 -1
- package/dist/dev/define/video/skin2.js.map +1 -1
- package/dist/dev/index.d.ts +5 -4
- package/dist/dev/index.js +3 -1
- package/dist/dev/internal/skins/compat-audio/skin.css +91 -38
- package/dist/dev/internal/skins/compat-live-audio/skin.css +91 -38
- package/dist/dev/internal/skins/compat-live-video/skin.css +142 -61
- package/dist/dev/internal/skins/compat-live-video/template.js +2 -0
- package/dist/dev/internal/skins/compat-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/compat-video/skin.css +150 -61
- package/dist/dev/internal/skins/compat-video/template.js +2 -0
- package/dist/dev/internal/skins/compat-video/template.js.map +1 -1
- package/dist/dev/internal/skins/default-audio/skin.css +53 -31
- package/dist/dev/internal/skins/default-live-audio/skin.css +51 -29
- package/dist/dev/internal/skins/default-live-video/register.js.map +1 -1
- package/dist/dev/internal/skins/default-live-video/skin.css +245 -60
- package/dist/dev/internal/skins/default-live-video/template.js +14 -0
- package/dist/dev/internal/skins/default-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/default-video/register.d.ts +1 -0
- package/dist/dev/internal/skins/default-video/register.js +3 -0
- package/dist/dev/internal/skins/default-video/register.js.map +1 -1
- package/dist/dev/internal/skins/default-video/skin.css +348 -66
- package/dist/dev/internal/skins/default-video/template.js +33 -5
- package/dist/dev/internal/skins/default-video/template.js.map +1 -1
- package/dist/dev/internal/skins/neutral-audio/skin.css +52 -31
- package/dist/dev/internal/skins/neutral-live-audio/skin.css +50 -29
- package/dist/dev/internal/skins/neutral-live-video/register.js.map +1 -1
- package/dist/dev/internal/skins/neutral-live-video/skin.css +241 -55
- package/dist/dev/internal/skins/neutral-live-video/template.js +14 -0
- package/dist/dev/internal/skins/neutral-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/neutral-video/register.js.map +1 -1
- package/dist/dev/internal/skins/neutral-video/skin.css +322 -66
- package/dist/dev/internal/skins/neutral-video/template.js +25 -11
- package/dist/dev/internal/skins/neutral-video/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-audio/skin.css +105 -40
- package/dist/dev/internal/skins/scaffold-live-audio/skin.css +105 -40
- package/dist/dev/internal/skins/scaffold-live-video/skin.css +159 -63
- package/dist/dev/internal/skins/scaffold-live-video/template.js +2 -0
- package/dist/dev/internal/skins/scaffold-live-video/template.js.map +1 -1
- package/dist/dev/internal/skins/scaffold-video/skin.css +168 -63
- package/dist/dev/internal/skins/scaffold-video/template.js +3 -1
- package/dist/dev/internal/skins/scaffold-video/template.js.map +1 -1
- package/dist/dev/media/background-video/adapter.d.ts +7 -13
- package/dist/dev/media/background-video/adapter.js +13 -35
- package/dist/dev/media/background-video/adapter.js.map +1 -1
- package/dist/dev/media/background-video/base.d.ts +44 -0
- package/dist/dev/media/background-video/base.js +97 -0
- package/dist/dev/media/background-video/base.js.map +1 -0
- package/dist/dev/media/background-video/template.d.ts +3 -0
- package/dist/dev/media/background-video/template.js +13 -20
- package/dist/dev/media/background-video/template.js.map +1 -1
- package/dist/dev/media/hls-background-video/adapter.d.ts +8 -18
- package/dist/dev/media/hls-background-video/adapter.js +16 -35
- package/dist/dev/media/hls-background-video/adapter.js.map +1 -1
- package/dist/dev/ui/captions-button/element.d.ts +2 -0
- package/dist/dev/ui/captions-radio-group/element.d.ts +2 -1
- package/dist/dev/ui/captions-radio-group/element.js +14 -1
- package/dist/dev/ui/captions-radio-group/element.js.map +1 -1
- package/dist/dev/ui/controls/element.d.ts +2 -2
- package/dist/dev/ui/controls/element.js +6 -3
- package/dist/dev/ui/controls/element.js.map +1 -1
- package/dist/dev/ui/time-slider/markers.d.ts +48 -0
- package/dist/dev/ui/time-slider/markers.js +165 -0
- package/dist/dev/ui/time-slider/markers.js.map +1 -0
- package/dist/dev/version.js +1 -1
- package/docs/README.md +1 -1
- package/docs/guides/autoplay.md +1 -1
- package/docs/guides/background-video.md +2 -4
- package/docs/guides/browser-support.md +22 -16
- package/docs/guides/cdn.md +9 -9
- package/docs/guides/customize-skins.md +3 -0
- package/docs/guides/installation-cdn.md +2 -2
- package/docs/guides/installation-shadcn.md +1 -1
- package/docs/guides/installation-svelte.md +2 -2
- package/docs/guides/installation-vue.md +2 -2
- package/docs/guides/installation.md +2 -2
- package/docs/guides/internationalization.md +5 -5
- package/docs/guides/keyboard-shortcuts.md +10 -0
- package/docs/guides/llms.txt +2 -1
- package/docs/guides/migrate-from-media-chrome.md +4 -4
- package/docs/guides/migrate-from-mux-player.md +6 -6
- package/docs/guides/migrate-from-plyr.md +7 -7
- package/docs/guides/migrate-from-video-js-8.md +6 -6
- package/docs/guides/migrate-from-vidstack.md +4 -4
- package/docs/guides/presets.md +4 -4
- package/docs/guides/self-hosting.md +5 -5
- package/docs/guides/skins.md +8 -7
- package/docs/guides/timed-metadata.md +318 -0
- package/docs/llms.txt +16 -2
- package/docs/reference/api/chapters-track.md +71 -0
- package/docs/reference/api/define-text-track.md +113 -0
- package/docs/reference/api/feature-text-cues.md +133 -0
- package/docs/reference/api/feature-text-tracks.md +11 -5
- package/docs/reference/api/get-active-text-cues.md +69 -0
- package/docs/reference/api/get-text-cues.md +69 -0
- package/docs/reference/api/get-text-tracks.md +41 -0
- package/docs/reference/api/hls-metadata-track.md +48 -0
- package/docs/reference/api/html-create-player.md +2 -2
- package/docs/reference/api/llms.txt +13 -1
- package/docs/reference/api/media-capabilities.md +4 -4
- package/docs/reference/api/player-store.md +9 -4
- package/docs/reference/api/preset-audio.md +3 -1
- package/docs/reference/api/preset-background.md +1 -1
- package/docs/reference/api/preset-live-audio.md +3 -1
- package/docs/reference/api/preset-live-video.md +2 -1
- package/docs/reference/api/preset-video.md +2 -1
- package/docs/reference/components/audio-compat-skin.md +1 -1
- package/docs/reference/components/audio-neutral-skin.md +1 -1
- package/docs/reference/components/audio-scaffold-skin.md +1 -1
- package/docs/reference/components/audio-skin.md +1 -1
- package/docs/reference/components/audio.md +19 -1
- package/docs/reference/components/background-video-skin.md +1 -1
- package/docs/reference/components/background-video.md +26 -11
- package/docs/reference/components/captions-radio-group.md +1 -1
- package/docs/reference/components/cloudflare-video.md +1 -1
- package/docs/reference/components/controls.md +16 -3
- package/docs/reference/components/dailymotion-video.md +2 -2
- package/docs/reference/components/dash-video.md +20 -3
- package/docs/reference/components/google-analytics.md +1 -1
- package/docs/reference/components/google-cast.md +1 -1
- package/docs/reference/components/hls-audio.md +56 -2
- package/docs/reference/components/hls-background-video.md +22 -5
- package/docs/reference/components/hls-video.md +99 -7
- package/docs/reference/components/hlsjs-video.md +52 -13
- package/docs/reference/components/live-audio-compat-skin.md +1 -1
- package/docs/reference/components/live-audio-neutral-skin.md +1 -1
- package/docs/reference/components/live-audio-scaffold-skin.md +1 -1
- package/docs/reference/components/live-audio-skin.md +1 -1
- package/docs/reference/components/live-video-compat-skin.md +5 -1
- package/docs/reference/components/live-video-neutral-skin.md +5 -1
- package/docs/reference/components/live-video-scaffold-skin.md +5 -1
- package/docs/reference/components/live-video-skin.md +5 -1
- package/docs/reference/components/llms.txt +2 -1
- package/docs/reference/components/mixcloud-audio.md +2 -2
- package/docs/reference/components/mux-audio.md +34 -3
- package/docs/reference/components/mux-background-video.md +1 -1
- package/docs/reference/components/mux-data.md +1 -1
- package/docs/reference/components/mux-video.md +17 -3
- package/docs/reference/components/native-hls-video.md +32 -3
- package/docs/reference/components/playerjs-video.md +2 -2
- package/docs/reference/components/shaka-video.md +2 -3
- package/docs/reference/components/soundcloud-audio.md +2 -2
- package/docs/reference/components/spotify-audio.md +2 -2
- package/docs/reference/components/tiktok-video.md +2 -2
- package/docs/reference/components/time-slider-markers.md +194 -0
- package/docs/reference/components/time-slider.md +14 -0
- package/docs/reference/components/twitch-video.md +1 -1
- package/docs/reference/components/video-compat-skin.md +5 -1
- package/docs/reference/components/video-neutral-skin.md +5 -1
- package/docs/reference/components/video-scaffold-skin.md +5 -1
- package/docs/reference/components/video-skin.md +5 -1
- package/docs/reference/components/video.md +19 -1
- package/docs/reference/components/vimeo-video.md +1 -2
- package/docs/reference/components/wistia-video.md +1 -1
- package/docs/reference/components/youtube-video.md +1 -2
- package/package.json +48 -48
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Text cues
|
|
2
|
+
|
|
3
|
+
Cues and active cues from metadata, chapters, and app text tracks
|
|
4
|
+
|
|
5
|
+
Reads the cues of text tracks, from the media and from the app, and tracks which cues are active at the current time. The [timed metadata guide](../../guides/timed-metadata.md) shows how to use it.
|
|
6
|
+
|
|
7
|
+
`textCues` has one entry per track being read, in `textTrackList` order. Each entry holds the `track` as `textTrackList` lists it, every one of its `cues` ordered by start time, and its `activeCues`. Cues are plain data with an `id`, `startTime`, `endTime`, `text`, and, when the cue carries data, a `value` and a `type`.
|
|
8
|
+
|
|
9
|
+
By default the feature reads every `metadata` and `chapters` track that isn’t `disabled`, except the `thumbnails` track. `watchTextCues(filter)` adds the tracks a filter matches until the function it returns is called.
|
|
10
|
+
|
|
11
|
+
Tracks from the media and tracks from the app are read the same way. The [text track feature](./feature-text-tracks.md) lists both in `textTrackList`, and each track’s `source` is `'media'` or `'app'`. Cue changes are kept out of the text track feature, so UI that only lists tracks doesn’t update as cues come and go.
|
|
12
|
+
|
|
13
|
+
## Import
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { textCuesFeature } from '@videojs/html';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The `audioFeatures`, `liveAudioFeatures`, `liveVideoFeatures`, and `videoFeatures` [feature bundles](../../guides/presets.md) include this feature.
|
|
20
|
+
|
|
21
|
+
## API Reference
|
|
22
|
+
|
|
23
|
+
### State
|
|
24
|
+
|
|
25
|
+
| Property | Type | Description |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `textCues` | `MediaTrackCues[]` | Cues for the tracks being read: `metadata` and `chapters` tracks that aren't disabled, except the thumbnails track, plus any track a `watchTextCues()` filter matches. In `textTrackList` order. |
|
|
28
|
+
|
|
29
|
+
### Actions
|
|
30
|
+
|
|
31
|
+
| Action | Type | Description |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `watchTextCues` | `(filter: { kind?: TextTrackKind \| readonly TextTrackKind[]; label?: string; language?: string } \| ((track: MediaTextTrack) => boolean)) => (() => void)` | Read cues for more tracks, such as captions for an interactive transcript. Cues are tracked until the returned function is called. |
|
|
34
|
+
|
|
35
|
+
### Selector
|
|
36
|
+
|
|
37
|
+
Pass `selectTextCues` to [`PlayerController`](./player-controller.md) to subscribe to text cue state. Returns `undefined` if the text cues feature is not configured. Outside a custom element, read `player.store.textCues` in a `player.store.subscribe()` callback, or pick cues with [`getActiveTextCues`](./get-active-text-cues.md).
|
|
38
|
+
|
|
39
|
+
**cue-count.ts**
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { createPlayer, UIElement, selectTextCues } from '@videojs/html';
|
|
43
|
+
import { videoFeatures } from '@videojs/html/video';
|
|
44
|
+
|
|
45
|
+
const { PlayerController } = createPlayer({ features: videoFeatures });
|
|
46
|
+
|
|
47
|
+
class CueCount extends UIElement {
|
|
48
|
+
readonly #textCues = new PlayerController(this, selectTextCues);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Active cues
|
|
53
|
+
|
|
54
|
+
A cue is active from its `startTime` up to its `endTime`. A cue whose `endTime` equals its `startTime` is a point, and stays active for one second from where it sits, so a seek that lands far past a point never activates it. The rule is the same for tracks from the media and from the app. The one exception is a chapters track the app added: a chapter without an `endTime` runs to the next chapter, and the last one to the end of the media.
|
|
55
|
+
|
|
56
|
+
Active cues follow the media’s `currentTime` through `timeupdate` and `seeked` events, and a media track’s `cuechange` events. They aren’t frame-accurate. Updates come a few times a second, so fast playback can move past a point, or a short cue, between two of them. A cue that started since the last update counts as active for that update even when it’s already over, so playback never skips one. A seek doesn’t: the cues it jumps over stay inactive.
|
|
57
|
+
|
|
58
|
+
Cues delivered with a stream can be open-ended. Cue ends are clamped to the media duration once it’s finite.
|
|
59
|
+
|
|
60
|
+
## Cue values
|
|
61
|
+
|
|
62
|
+
A cue’s `value` comes from the first of these that applies:
|
|
63
|
+
|
|
64
|
+
1. The cue’s own `value`. A `DataCue`, such as the ones Safari’s native HLS creates for in-band metadata, carries one, and so do the cues hls.js creates for ID3 and `EXT-X-DATERANGE` metadata. Its `type` says what `value` holds, such as `org.id3`. A type names the shape of `value`, not where it came from, so ID3 carried in an `emsg` box is `org.id3` too.
|
|
65
|
+
2. On a `metadata` track, cue text that parses as a JSON object or array.
|
|
66
|
+
3. Otherwise, the cue has no `value`. Its text is always in `text`.
|
|
67
|
+
|
|
68
|
+
App cues keep the `value` and `type` they were added with.
|
|
69
|
+
|
|
70
|
+
A media publishes cues on its text tracks in the platform’s shapes. A `VTTCueLike` carries `text`, like the platform’s `VTTCue`. A `DataCueLike` carries a `value` and, when known, its `type`, like the platform’s `DataCue`. A `TextCueLike` is either one, and a single cue can be both, as the cues hls.js creates are. A custom media writes its cues in these shapes.
|
|
71
|
+
|
|
72
|
+
## App tracks
|
|
73
|
+
|
|
74
|
+
`addTextTrack()` and `removeTextTrack()` come from the [text track feature](./feature-text-tracks.md), and are described here. `addTextTrack()` adds a track to the player rather than to the media, so it works with any media, including embeds without text tracks of their own. It takes a [track definition](./define-text-track.md) and its content, or one object describing both, and returns a handle to the track.
|
|
75
|
+
|
|
76
|
+
```ts
|
|
77
|
+
const player = document.querySelector('video-player')!;
|
|
78
|
+
const quiz = player.store.addTextTrack({ kind: 'metadata', label: 'quiz' });
|
|
79
|
+
|
|
80
|
+
quiz.addCue({ startTime: 42, value: { question: 'Ready?' } });
|
|
81
|
+
quiz.remove();
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
The track description takes these fields:
|
|
85
|
+
|
|
86
|
+
| Field | Description |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| `kind` | The track kind: `metadata`, `chapters`, `captions`, `subtitles`, or `descriptions`. |
|
|
89
|
+
| `label` | The track label. Defaults to `''`. |
|
|
90
|
+
| `language` | The track language, as a BCP 47 tag. Defaults to `''`. |
|
|
91
|
+
| `cues` | The track’s cues. |
|
|
92
|
+
| `src` | A file to load cues from. The file is fetched once the player attaches to media, so only on the client. Without a `format`, it’s WebVTT, or JSON that is an array of cues or an object with a `cues` array. |
|
|
93
|
+
| `format` | A function that reads the `src` file’s text into cues, such as [`podcastChapters`](./chapters-track.md). It returns an array of cues or an object with a `cues` array, and can return a promise, so a parser for another format, such as SRT, loads only when a file needs it. |
|
|
94
|
+
|
|
95
|
+
Each cue takes these fields:
|
|
96
|
+
|
|
97
|
+
| Field | Description |
|
|
98
|
+
| --- | --- |
|
|
99
|
+
| `id` | The cue’s id. When it’s missing or empty, it defaults to an id unique within the track. |
|
|
100
|
+
| `startTime` | Where the cue starts, in seconds. |
|
|
101
|
+
| `endTime` | Where the cue ends, in seconds. Omit it for a point, or, in a chapters track, for a chapter that runs to the next one. |
|
|
102
|
+
| `text` | The cue’s text. Defaults to `''`. |
|
|
103
|
+
| `value` | Structured, JSON-serializable data. |
|
|
104
|
+
| `type` | What `value` holds. |
|
|
105
|
+
|
|
106
|
+
The handle `addTextTrack()` returns has the track’s `id` in `textTrackList`, and `removed`, which turns `true` once the track is gone. `addCue(cue)` and `removeCue(id)` change its cues, and `remove()` removes it. `removeTextTrack(id)` removes a track the app added; tracks from the media stay.
|
|
107
|
+
|
|
108
|
+
Like a `<track>` element, an app track stays until it’s removed, through source changes and media swaps. Removing a track stops loading its `src`. A file given as `src` that fails to load leaves the track with the cues it already has.
|
|
109
|
+
|
|
110
|
+
App tracks start `hidden`. Browsers never draw `metadata` or `chapters` cues. An app `captions` or `subtitles` track is copied into the media, so the browser draws its cues when the track is selected, including in iOS fullscreen where the player’s UI isn’t shown, and the captions menu lists it. The track takes its copy’s mode, so it’s `disabled` until it’s selected and `showing` while it is.
|
|
111
|
+
|
|
112
|
+
When the media has no chapters track, the text track feature’s `chaptersCues` reads the first chapters track the app added, so the [time slider](../components/time-slider.md) can show its chapters. In the same way, when the media has no thumbnails track, `thumbnailsTrack` reads the first `metadata` track the app added with the label `thumbnails`, such as a storyboard file. Image URLs in its cues resolve against its `src`, as they do for a `<track>` element.
|
|
113
|
+
|
|
114
|
+
## Exports
|
|
115
|
+
|
|
116
|
+
| Export | Description |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| `MediaTrackCues` | One `textCues` entry: a `track`, its `cues`, and its `activeCues`. |
|
|
119
|
+
| `MediaTextCue` | A cue as plain data. Its type parameter types `value`. |
|
|
120
|
+
| `TextCueLike` | A cue on a media’s text track: a `VTTCueLike`, a `DataCueLike`, or both. |
|
|
121
|
+
| `VTTCueLike` | A media cue that carries `text`, like the platform’s `VTTCue`. |
|
|
122
|
+
| `DataCueLike` | A media cue that carries a `value` and its `type`, like the platform’s `DataCue`. |
|
|
123
|
+
| `TextTrackFilter` | Picks tracks by `kind`, `label`, or `language`, or with a function. Each given field must match, and a list of kinds matches any kind in it. |
|
|
124
|
+
| `TextTrackSource` | Where a track came from: `'media'` or `'app'`. |
|
|
125
|
+
| `AddTextTrack` | The type of `addTextTrack()`. |
|
|
126
|
+
| `TextTrackInit` | A track description with its content. |
|
|
127
|
+
| `TextTrackContent` | What a track carries: `cues`, `src`, and `format`. |
|
|
128
|
+
| `TextCueInit` | A cue an app adds. |
|
|
129
|
+
| `TextCueFormat` | A function that reads a file’s text into cues. |
|
|
130
|
+
| `TextCueFormatResult` | What a `TextCueFormat` returns: an array of cues, or an object with a `cues` array. |
|
|
131
|
+
| `TextTrackHandle` | The handle `addTextTrack()` returns. |
|
|
132
|
+
| `InferCueValue` | The `value` type of a cue type. |
|
|
133
|
+
| `MediaTextCuesState` | The state this feature adds to the store. |
|
|
@@ -4,9 +4,13 @@ Subtitles, captions, and chapter track state for the player store
|
|
|
4
4
|
|
|
5
5
|
Manages subtitles, captions, chapters, and thumbnail tracks.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`textTrackList` lists the media’s tracks, then the tracks an app adds to the player with this feature’s `addTextTrack()`, described with the [text cues feature](./feature-text-cues.md). Each track’s `source` is `'media'` or `'app'`. An app `captions` or `subtitles` track is copied into the media so the browser can draw it, and it’s selected and listed like the media’s own; its copy isn’t listed separately. Media without text tracks of their own, such as embeds, list only app tracks.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
A default `kind="chapters"` track can also divide the [time slider](../components/time-slider.md) into chapter ranges and label the chapter at the current interaction position. When the media has no chapters track, `chaptersCues` reads the first chapters track the app added instead.
|
|
10
|
+
|
|
11
|
+
This feature doesn’t track cues as they become active. The text cues feature does, for metadata and chapters tracks and for any track a reader asks for.
|
|
12
|
+
|
|
13
|
+
`thumbnailsTrack` is the first `kind="metadata"` track labeled `thumbnails`, or `null` when there is none. When the media has none, it’s the first such track the app added, with its `src` as the base for image URLs. Its `crossOrigin` reports the media component’s CORS mode, or `null` when the media is not CORS-enabled. [Thumbnail](../components/thumbnail.md) reads it to fetch sprite sheets the same way the browser fetched the track.
|
|
10
14
|
|
|
11
15
|
## Import
|
|
12
16
|
|
|
@@ -14,7 +18,7 @@ A default `kind="chapters"` track can also divide the [time slider](../component
|
|
|
14
18
|
import { textTrackFeature } from '@videojs/html';
|
|
15
19
|
```
|
|
16
20
|
|
|
17
|
-
The `
|
|
21
|
+
The `audioFeatures`, `liveAudioFeatures`, `liveVideoFeatures`, and `videoFeatures` [feature bundles](../../guides/presets.md) include this feature.
|
|
18
22
|
|
|
19
23
|
## API Reference
|
|
20
24
|
|
|
@@ -22,10 +26,11 @@ The `liveVideoFeatures` and `videoFeatures` [feature bundles](../../guides/prese
|
|
|
22
26
|
|
|
23
27
|
| Property | Type | Description |
|
|
24
28
|
| --- | --- | --- |
|
|
25
|
-
| `textTrackList` | `MediaTextTrack[]` |
|
|
29
|
+
| `textTrackList` | `MediaTextTrack[]` | Every text track: the media's, then those the app added through the player. `source` tells them apart. |
|
|
26
30
|
| `subtitlesShowing` | `boolean` | Whether a captions/subtitles track is showing. |
|
|
27
|
-
| `chaptersCues` | `MediaTextCue[]` | Cues from the first `kind="chapters"` track, with cue ends clamped to a finite media duration. |
|
|
31
|
+
| `chaptersCues` | `MediaTextCue[]` | Cues from the media's first `kind="chapters"` track, with cue ends clamped to a finite media duration. When the media has none, cues from the first chapters track the app added, where a chapter without an end runs to the next one and the last to the end of the media. |
|
|
28
32
|
| `thumbnailsTrack` | `{ cues: MediaTextCue[]; src: string \| null; crossOrigin: 'anonymous' \| 'use-credentials' \| null } \| null` | The first thumbnails track, or `null` when there is none. |
|
|
33
|
+
| `addTextTrack` | `{ <Cue extends MediaTextCue>(track: TextTrackDefinition<Cue>, content?: TextTrackContent<InferCueValue<Cue>>): TextTrackHandle<InferCueValue<Cue>>; <Value = unknown>(init: TextTrackInit<Value>): TextTrackHandle<Value> }` | Add a text track from the app. It works on any media, sits next to the media's tracks in `textTrackList`, and its cues are read like theirs. Like a `<track>` element, it stays until it's removed, through source changes and media swaps. |
|
|
29
34
|
|
|
30
35
|
### Actions
|
|
31
36
|
|
|
@@ -33,6 +38,7 @@ The `liveVideoFeatures` and `videoFeatures` [feature bundles](../../guides/prese
|
|
|
33
38
|
| --- | --- | --- |
|
|
34
39
|
| `toggleSubtitles` | `(forceShow?: boolean) => boolean` | Toggle captions/subtitles visibility. Showing enables one caption/subtitle track. A track already showing stays selected. Otherwise, selection prefers the last track shown, then a track matching the browser language, then the first available track. Returns whether a track is showing. |
|
|
35
40
|
| `selectSubtitlesTrack` | `(id: string \| null) => void` | Show the captions/subtitles track with `id`, or turn captions/subtitles off with `null`. |
|
|
41
|
+
| `removeTextTrack` | `(id: string) => void` | Remove a track the app added. Tracks from the media stay. |
|
|
36
42
|
|
|
37
43
|
### Selector
|
|
38
44
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# getActiveTextCues
|
|
2
|
+
|
|
3
|
+
The cues active now on the text tracks a filter or track definition matches
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { getActiveTextCues } from '@videojs/html';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`getActiveTextCues` returns the cues active at the current time on the tracks a filter or [track definition](./define-text-track.md) matches, from the media and the app alike. Cues from several tracks are merged in time order.
|
|
12
|
+
|
|
13
|
+
It reads `textCues` from the [text cues feature](./feature-text-cues.md), which describes when a cue is active, so it only finds cues on the tracks that feature reads.
|
|
14
|
+
|
|
15
|
+
Read through a definition, cues are typed by it. With a schema, cues whose value fails it are skipped.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Read the active cues in a `player.store.subscribe()` callback to follow playback:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const player = document.querySelector('video-player')!;
|
|
23
|
+
const quiz = document.querySelector<HTMLElement>('.quiz')!;
|
|
24
|
+
|
|
25
|
+
player.store.subscribe(() => {
|
|
26
|
+
const [cue] = getActiveTextCues(player.store, quizTrack);
|
|
27
|
+
|
|
28
|
+
quiz.hidden = !cue;
|
|
29
|
+
quiz.textContent = cue?.value?.question ?? '';
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## API Reference
|
|
34
|
+
|
|
35
|
+
### With Definition
|
|
36
|
+
|
|
37
|
+
`getActiveTextCues<Cue extends MediaTextCue>(source, track): readonly Cue[]`
|
|
38
|
+
|
|
39
|
+
The cues active now on the tracks a track definition matches, typed by the definition. With a schema, cues whose value fails it are skipped.
|
|
40
|
+
|
|
41
|
+
`player.store.subscribe(() => { const [question] = getActiveTextCues(player.store, quizTrack); });`
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Parameter | Type | Default | Description |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| `source` (required) | `{ textCues: readonly MediaTrackCues[] }` | — | State that carries text cues, such as the player store. |
|
|
48
|
+
| `track` (required) | `{ kind: 'subtitles' \| 'captions' \| 'descriptions' \| 'chapters' \| 'metadata'; label?: string; language?: string; schema?: StandardSchemaV1 }` | — | The track definition to read. |
|
|
49
|
+
|
|
50
|
+
#### Return Value
|
|
51
|
+
|
|
52
|
+
`readonly Cue[]`
|
|
53
|
+
|
|
54
|
+
### With Filter
|
|
55
|
+
|
|
56
|
+
`getActiveTextCues(source, filter?): readonly MediaTextCue[]`
|
|
57
|
+
|
|
58
|
+
The cues active now on the tracks a filter matches, from the media or the app.
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Default | Description |
|
|
63
|
+
| --- | --- | --- | --- |
|
|
64
|
+
| `source` (required) | `{ textCues: readonly MediaTrackCues[] }` | — | State that carries text cues, such as the player store. |
|
|
65
|
+
| `filter` | `{ kind?: TextTrackKind \| readonly TextTrackKind[]; label?: string; language?: string } \| ((track: MediaTextTrack) => boolean)` | — | Picks tracks by kind, label, or language, or with a function. Defaults to every track being read. |
|
|
66
|
+
|
|
67
|
+
#### Return Value
|
|
68
|
+
|
|
69
|
+
`readonly MediaTextCue[]`
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# getTextCues
|
|
2
|
+
|
|
3
|
+
Every cue on the text tracks a filter or track definition matches
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { getTextCues } from '@videojs/html';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`getTextCues` returns every cue on the tracks a filter or [track definition](./define-text-track.md) matches, from the media and the app alike. Cues from several tracks are merged in time order.
|
|
12
|
+
|
|
13
|
+
It reads `textCues` from the [text cues feature](./feature-text-cues.md), so it only finds cues on the tracks that feature reads: `metadata` and `chapters` tracks that aren’t `disabled`, except the `thumbnails` track, and the tracks a `watchTextCues()` filter matches.
|
|
14
|
+
|
|
15
|
+
Read through a definition, cues are typed by it. With a schema, cues whose value fails it are skipped.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
To read tracks the feature doesn’t read by default, such as captions for a transcript, watch them first:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
const player = document.querySelector('video-player')!;
|
|
23
|
+
const captions = { kind: 'captions', language: 'en' } as const;
|
|
24
|
+
|
|
25
|
+
player.store.watchTextCues(captions);
|
|
26
|
+
|
|
27
|
+
player.store.subscribe(() => {
|
|
28
|
+
const cues = getTextCues(player.store, captions);
|
|
29
|
+
console.log(cues.map((cue) => cue.text));
|
|
30
|
+
});
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## API Reference
|
|
34
|
+
|
|
35
|
+
### With Definition
|
|
36
|
+
|
|
37
|
+
`getTextCues<Cue extends MediaTextCue>(source, track): readonly Cue[]`
|
|
38
|
+
|
|
39
|
+
Every cue on the tracks a track definition matches, typed by the definition. With a schema, cues whose value fails it are skipped.
|
|
40
|
+
|
|
41
|
+
`const questions = getTextCues(player.store, quizTrack);`
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Parameter | Type | Default | Description |
|
|
46
|
+
| --- | --- | --- | --- |
|
|
47
|
+
| `source` (required) | `{ textCues: readonly MediaTrackCues[] }` | — | State that carries text cues, such as the player store. |
|
|
48
|
+
| `track` (required) | `{ kind: 'subtitles' \| 'captions' \| 'descriptions' \| 'chapters' \| 'metadata'; label?: string; language?: string; schema?: StandardSchemaV1 }` | — | The track definition to read. |
|
|
49
|
+
|
|
50
|
+
#### Return Value
|
|
51
|
+
|
|
52
|
+
`readonly Cue[]`
|
|
53
|
+
|
|
54
|
+
### With Filter
|
|
55
|
+
|
|
56
|
+
`getTextCues(source, filter?): readonly MediaTextCue[]`
|
|
57
|
+
|
|
58
|
+
Every cue on the tracks a filter matches, from the media or the app.
|
|
59
|
+
|
|
60
|
+
#### Parameters
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Default | Description |
|
|
63
|
+
| --- | --- | --- | --- |
|
|
64
|
+
| `source` (required) | `{ textCues: readonly MediaTrackCues[] }` | — | State that carries text cues, such as the player store. |
|
|
65
|
+
| `filter` | `{ kind?: TextTrackKind \| readonly TextTrackKind[]; label?: string; language?: string } \| ((track: MediaTextTrack) => boolean)` | — | Picks tracks by kind, label, or language, or with a function. Defaults to every track being read. |
|
|
66
|
+
|
|
67
|
+
#### Return Value
|
|
68
|
+
|
|
69
|
+
`readonly MediaTextCue[]`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# getTextTracks
|
|
2
|
+
|
|
3
|
+
The text tracks a filter or track definition matches, from the media or the app
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { getTextTracks } from '@videojs/html';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`getTextTracks` returns the tracks in `textTrackList` that a filter or [track definition](./define-text-track.md) matches, from the media and the app alike. Each track’s `source` says which. The list comes from the [text track feature](./feature-text-tracks.md).
|
|
12
|
+
|
|
13
|
+
A filter picks tracks by `kind`, `label`, or `language`, or with a function. Each given field must match, and a list of kinds matches any kind in it. Without a filter, `getTextTracks` returns every track.
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
Read the tracks in a `player.store.subscribe()` callback to follow changes:
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
const player = document.querySelector('video-player')!;
|
|
21
|
+
|
|
22
|
+
player.store.subscribe(() => {
|
|
23
|
+
const captions = getTextTracks(player.store, { kind: ['captions', 'subtitles'] });
|
|
24
|
+
console.log(captions.map((track) => track.label));
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API Reference
|
|
29
|
+
|
|
30
|
+
`getTextTracks(source, filter?): MediaTextTrack[]`
|
|
31
|
+
|
|
32
|
+
### Parameters
|
|
33
|
+
|
|
34
|
+
| Parameter | Type | Default | Description |
|
|
35
|
+
| --- | --- | --- | --- |
|
|
36
|
+
| `source` (required) | `{ textTrackList: readonly MediaTextTrack[] }` | — | State that lists text tracks, such as the player store. |
|
|
37
|
+
| `filter` | `{ kind?: TextTrackKind \| readonly TextTrackKind[]; label?: string; language?: string } \| ((track: MediaTextTrack) => boolean) \| { kind: 'subtitles' \| 'captions' \| 'descriptions' \| 'chapters' \| 'metadata'; label?: string; language?: string; schema?: StandardSchemaV1 }` | `{}` | Picks tracks by kind, label, or language, or with a function. Defaults to every track. |
|
|
38
|
+
|
|
39
|
+
### Return Value
|
|
40
|
+
|
|
41
|
+
`MediaTextTrack[]`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# hlsMetadataTrack
|
|
2
|
+
|
|
3
|
+
A track definition for the ID3 and EXT-X-DATERANGE metadata hls.js publishes
|
|
4
|
+
|
|
5
|
+
## Import
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { hlsMetadataTrack } from '@videojs/html';
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
`hlsMetadataTrack` is a [track definition](./define-text-track.md) for `{ kind: 'metadata', label: 'id3' }`, the track hls.js publishes timed metadata on. Its cues are typed as `HlsMetadataCue`. The [text cues feature](./feature-text-cues.md) reads the track like any other metadata track.
|
|
12
|
+
|
|
13
|
+
hls.js plays streams in [`HlsJsVideo`](../components/hlsjs-video.md) and the media built on it, such as [`MuxVideo`](../components/mux-video.md), when they play through Media Source Extensions. Where the browser plays HLS natively, as Safari does, in-band metadata arrives as `DataCue`s on the browser’s own metadata tracks instead; read those with a `{ kind: 'metadata' }` filter.
|
|
14
|
+
|
|
15
|
+
## Cues
|
|
16
|
+
|
|
17
|
+
Each cue carries one ID3 frame or one `EXT-X-DATERANGE` attribute. Its `type` tells which, and narrows `value`:
|
|
18
|
+
|
|
19
|
+
| `type` | Source | `value` |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `'org.id3'` | An ID3 frame in the stream’s segments, or carried in an `emsg` box. hls.js types the second `https://aomedia.org/emsg/ID3`; the player reads both as `org.id3`. | `Id3Frame`: the frame id as `key`, such as `TXXX` or `PRIV`, its description or owner as `info`, and its `data`. |
|
|
22
|
+
| `'com.apple.quicktime.HLS'` | An `EXT-X-DATERANGE` tag in the playlist. | `HlsDateRangeAttribute`: the attribute name as `key`, such as `CLASS` or `X-AD-ID`, and its `data`. |
|
|
23
|
+
|
|
24
|
+
A date range’s cues span the range, from its start to its end.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
**id3.ts**
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { getActiveTextCues, hlsMetadataTrack } from '@videojs/html';
|
|
32
|
+
|
|
33
|
+
const player = document.querySelector('video-player')!;
|
|
34
|
+
|
|
35
|
+
player.store.subscribe(() => {
|
|
36
|
+
for (const cue of getActiveTextCues(player.store, hlsMetadataTrack)) {
|
|
37
|
+
if (cue.type === 'org.id3' && cue.value?.key === 'TXXX') console.log(cue.value.info, cue.value.data);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Exports
|
|
43
|
+
|
|
44
|
+
| Export | Description |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| `HlsMetadataCue` | A metadata cue from hls.js, typed by its `type`. |
|
|
47
|
+
| `Id3Frame` | An ID3 frame: `key`, `info`, and `data`. |
|
|
48
|
+
| `HlsDateRangeAttribute` | One `EXT-X-DATERANGE` attribute: `key` and `data`. |
|
|
@@ -175,7 +175,7 @@ Creates a typed HTML player class and bound controller.
|
|
|
175
175
|
|
|
176
176
|
| Parameter | Type | Default | Description |
|
|
177
177
|
| --- | --- | --- | --- |
|
|
178
|
-
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaQualityState>, PlayerFeature<MediaAudioTrackState>, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, PlayerFeature<MediaFullscreenState>, PlayerFeature<MediaPictureInPictureState>, PlayerFeature<MediaRemotePlaybackState>, PlayerFeature<MediaControlsState>,
|
|
178
|
+
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaQualityState>, PlayerFeature<MediaAudioTrackState>, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, PlayerFeature<MediaFullscreenState>, PlayerFeature<MediaPictureInPictureState>, PlayerFeature<MediaRemotePlaybackState>, PlayerFeature<MediaControlsState>, typeof textTrackFeature, typeof textCuesFeature, PlayerFeature<MediaErrorState>, typeof metadataFeature] }` | — | Player configuration with features. |
|
|
179
179
|
|
|
180
180
|
#### Return Value
|
|
181
181
|
|
|
@@ -195,7 +195,7 @@ Creates a typed HTML audio player class and bound controller.
|
|
|
195
195
|
|
|
196
196
|
| Parameter | Type | Default | Description |
|
|
197
197
|
| --- | --- | --- | --- |
|
|
198
|
-
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, PlayerFeature<MediaErrorState>, typeof metadataFeature] }` | — | Player configuration with features. |
|
|
198
|
+
| `config` (required) | `{ features: [PlayerFeature<MediaPlaybackState>, typeof playbackRateFeature, PlayerFeature<MediaVolumeState>, PlayerFeature<MediaTimeState>, PlayerFeature<MediaSourceState>, PlayerFeature<MediaBufferState>, typeof textTrackFeature, typeof textCuesFeature, PlayerFeature<MediaErrorState>, typeof metadataFeature] }` | — | Player configuration with features. |
|
|
199
199
|
|
|
200
200
|
#### Return Value
|
|
201
201
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Video.js v10 — HTML API
|
|
2
2
|
|
|
3
|
-
> API reference for the player factory, presets, store controllers, features, translation tools, and utilities. Bundled with `@videojs/html` v10.
|
|
3
|
+
> API reference for the player factory, presets, store controllers, features, text tracks, translation tools, and utilities. Bundled with `@videojs/html` v10.4.0. Links are relative paths to files in this directory.
|
|
4
4
|
|
|
5
5
|
## Player
|
|
6
6
|
|
|
@@ -50,10 +50,22 @@ API reference for the feature modules passed to createPlayer, which provide play
|
|
|
50
50
|
- [Remote Playback](./feature-remote-playback.md): Remote playback state and actions for the player store
|
|
51
51
|
- [Source](./feature-source.md): Media source state and actions for the player store
|
|
52
52
|
- [Stream type](./feature-stream-type.md): Stream delivery type (live / on-demand) state for the player store
|
|
53
|
+
- [Text cues](./feature-text-cues.md): Cues and active cues from metadata, chapters, and app text tracks
|
|
53
54
|
- [Text tracks](./feature-text-tracks.md): Subtitles, captions, and chapter track state for the player store
|
|
54
55
|
- [Time](./feature-time.md): Playback position and duration state for the player store
|
|
55
56
|
- [Volume](./feature-volume.md): Volume level and mute state for the player store
|
|
56
57
|
|
|
58
|
+
## Text tracks
|
|
59
|
+
|
|
60
|
+
API reference for reading text tracks and their cues: track definitions and readers.
|
|
61
|
+
|
|
62
|
+
- [defineTextTrack](./define-text-track.md): Define a text track once, with the type of its cue values, to add and read it with
|
|
63
|
+
- [getTextTracks](./get-text-tracks.md): The text tracks a filter or track definition matches, from the media or the app
|
|
64
|
+
- [getTextCues](./get-text-cues.md): Every cue on the text tracks a filter or track definition matches
|
|
65
|
+
- [getActiveTextCues](./get-active-text-cues.md): The cues active now on the text tracks a filter or track definition matches
|
|
66
|
+
- [chaptersTrack](./chapters-track.md): A track definition for chapters, and converters that turn chapter JSON formats into cues
|
|
67
|
+
- [hlsMetadataTrack](./hls-metadata-track.md): A track definition for the ID3 and EXT-X-DATERANGE metadata hls.js publishes
|
|
68
|
+
|
|
57
69
|
## i18n
|
|
58
70
|
|
|
59
71
|
API reference for translating the player: the i18n elements, controller, and the phrase registry.
|
|
@@ -38,7 +38,7 @@ Each `isMedia*Capable` guard accepts any value and returns `false` for `null`, `
|
|
|
38
38
|
|
|
39
39
|
A guard checks that a few members of a capability are present, then narrows to every member of that capability’s contract. The table lists both.
|
|
40
40
|
|
|
41
|
-
Some media can’t provide buffered ranges, text tracks, or remote playback, and
|
|
41
|
+
Some media can’t provide buffered ranges, text tracks, or remote playback, and return `undefined` from `buffered` and `seekable`, `textTracks`, or `remote` instead. `isMediaBufferCapable`, `isMediaTextTrackCapable`, and `isMediaRemotePlaybackCapable` return `false` for `undefined`. Media that can provide buffered ranges but has none yet, such as an embed before it loads, reports an empty range, so `isMediaBufferCapable` returns `true`. A custom media that extends a built-in one opts out by overriding the getter to return `undefined`.
|
|
42
42
|
|
|
43
43
|
A guard describes what the media object supports, not its current state. `isMediaErrorCapable` returns `true` while `error` is `null`, and `isMediaVolumeCapable` returns `true` on platforms that ignore volume changes. For current state and availability, such as `volumeAvailability` from the [volume feature](./feature-volume.md), read the player’s [features](../../guides/features.md) instead.
|
|
44
44
|
|
|
@@ -49,13 +49,13 @@ A guard describes what the media object supports, not its current state. `isMedi
|
|
|
49
49
|
| `isMediaSourceCapable` | `src`, `currentSrc`, `readyState`, `load()` | `src`, `currentSrc`, `readyState`, `preload`, `crossOrigin`, `load()`, `canPlayType()` |
|
|
50
50
|
| `isMediaVolumeCapable` | `volume`, `muted` | `volume`, `muted`, `defaultMuted` |
|
|
51
51
|
| `isMediaPlaybackRateCapable` | `playbackRate` | `playbackRate`, `defaultPlaybackRate` |
|
|
52
|
-
| `isMediaBufferCapable` | `buffered`, `seekable`, neither
|
|
52
|
+
| `isMediaBufferCapable` | `buffered`, `seekable`, neither `undefined` | `buffered`, `seekable` |
|
|
53
53
|
| `isMediaErrorCapable` | `error` (`null` counts) | `error` |
|
|
54
|
-
| `isMediaTextTrackCapable` | `textTracks
|
|
54
|
+
| `isMediaTextTrackCapable` | `textTracks` is not `undefined` | `textTracks`, `addTextTrack()` |
|
|
55
55
|
| `isMediaVideoRenditionCapable` | `videoRenditions` | `videoRenditions` |
|
|
56
56
|
| `isMediaAudioTrackCapable` | `audioTracks` | `audioTracks`, `addAudioTrack()`, `removeAudioTrack()` |
|
|
57
57
|
| `isMediaVideoDimensionsCapable` | `videoWidth`, `videoHeight` | `videoWidth`, `videoHeight` |
|
|
58
|
-
| `isMediaRemotePlaybackCapable` | `remote` is an object
|
|
58
|
+
| `isMediaRemotePlaybackCapable` | `remote` is an object | `remote`, `disableRemotePlayback` |
|
|
59
59
|
| `isMediaStreamTypeCapable` | `streamType` | `streamType` |
|
|
60
60
|
| `isMediaLiveCapable` | `liveEdgeStart`, `targetLiveWindow` | `liveEdgeStart`, `targetLiveWindow` |
|
|
61
61
|
|
|
@@ -55,12 +55,14 @@ Each feature links to the same entry on its reference page.
|
|
|
55
55
|
| `toggleControls` | `(forceShow?: boolean) => boolean` | [`controlsFeature`](./feature-controls.md#controls-action-toggleControls) | Toggle controls visibility, or force it with `forceShow`. Returns the new `controlsVisible` value. |
|
|
56
56
|
| `buffered` | `[number, number][]` | [`bufferFeature`](./feature-buffer.md#buffer-state-buffered) | Buffered time ranges as \[start, end\] tuples. |
|
|
57
57
|
| `seekable` | `[number, number][]` | [`bufferFeature`](./feature-buffer.md#buffer-state-seekable) | Seekable time ranges as \[start, end\] tuples. |
|
|
58
|
-
| `textTrackList` | `MediaTextTrack[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-textTrackList) |
|
|
58
|
+
| `textTrackList` | `MediaTextTrack[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-textTrackList) | Every text track: the media's, then those the app added through the player. `source` tells them apart. |
|
|
59
59
|
| `subtitlesShowing` | `boolean` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-subtitlesShowing) | Whether a captions/subtitles track is showing. |
|
|
60
|
-
| `chaptersCues` | `MediaTextCue[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-chaptersCues) | Cues from the first `kind="chapters"` track, with cue ends clamped to a finite media duration. |
|
|
60
|
+
| `chaptersCues` | `MediaTextCue[]` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-chaptersCues) | Cues from the media's first `kind="chapters"` track, with cue ends clamped to a finite media duration. When the media has none, cues from the first chapters track the app added, where a chapter without an end runs to the next one and the last to the end of the media. |
|
|
61
61
|
| `thumbnailsTrack` | `{ cues: MediaTextCue[]; src: string \| null; crossOrigin: 'anonymous' \| 'use-credentials' \| null } \| null` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-thumbnailsTrack) | The first thumbnails track, or `null` when there is none. |
|
|
62
|
+
| `addTextTrack` | `{ <Cue extends MediaTextCue>(track: TextTrackDefinition<Cue>, content?: TextTrackContent<InferCueValue<Cue>>): TextTrackHandle<InferCueValue<Cue>>; <Value = unknown>(init: TextTrackInit<Value>): TextTrackHandle<Value> }` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-state-addTextTrack) | Add a text track from the app. It works on any media, sits next to the media's tracks in `textTrackList`, and its cues are read like theirs. Like a `<track>` element, it stays until it's removed, through source changes and media swaps. |
|
|
62
63
|
| `toggleSubtitles` | `(forceShow?: boolean) => boolean` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-action-toggleSubtitles) | Toggle captions/subtitles visibility. Showing enables one caption/subtitle track. A track already showing stays selected. Otherwise, selection prefers the last track shown, then a track matching the browser language, then the first available track. Returns whether a track is showing. |
|
|
63
64
|
| `selectSubtitlesTrack` | `(id: string \| null) => void` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-action-selectSubtitlesTrack) | Show the captions/subtitles track with `id`, or turn captions/subtitles off with `null`. |
|
|
65
|
+
| `removeTextTrack` | `(id: string) => void` | [`textTrackFeature`](./feature-text-tracks.md#textTrack-action-removeTextTrack) | Remove a track the app added. Tracks from the media stay. |
|
|
64
66
|
| `playbackRate` | `number` | [`playbackRateFeature`](./feature-playback-rate.md#playbackRate-state-playbackRate) | Current playback rate. |
|
|
65
67
|
| `playbackRateAvailability` | `'available' \| 'unavailable' \| 'unsupported'` | [`playbackRateFeature`](./feature-playback-rate.md#playbackRate-state-playbackRateAvailability) | Whether the media can change its playback rate. `unsupported` when the attached media has no `playbackRate` at all, such as an embed whose provider takes no speed command. |
|
|
66
68
|
| `playbackRates` | `readonly number[]` | [`playbackRateFeature`](./feature-playback-rate.md#playbackRate-state-playbackRates) | The default rates that fit the media's range. Set them through the player, not through the store. They are listed even when the media cannot change its rate, so check `playbackRateAvailability` before offering them. |
|
|
@@ -88,6 +90,8 @@ Each feature links to the same entry on its reference page.
|
|
|
88
90
|
| `streamType` | `'on-demand' \| 'live' \| 'unknown'` | [`streamTypeFeature`](./feature-stream-type.md#streamType-state-streamType) | Current stream delivery type. Components use this to show live-specific UI (for example, a live indicator or a "jump to live edge" button) or hide the time display. |
|
|
89
91
|
| `orientationLockType` | `'any' \| 'landscape' \| 'landscape-primary' \| 'landscape-secondary' \| 'natural' \| 'portrait' \| 'portrait-primary' \| 'portrait-secondary'` | [`orientationLockFeature`](./feature-orientation-lock.md#orientationLock-state-orientationLockType) | Screen orientation type locked while fullscreen is active. |
|
|
90
92
|
| `setOrientationLockType` | `(value: 'any' \| 'landscape' \| 'landscape-primary' \| 'landscape-secondary' \| 'natural' \| 'portrait' \| 'portrait-primary' \| 'portrait-secondary' \| null \| undefined) => void` | [`orientationLockFeature`](./feature-orientation-lock.md#orientationLock-action-setOrientationLockType) | Sets the locked orientation type. A missing value, including an empty one, restores the default. |
|
|
93
|
+
| `textCues` | `MediaTrackCues[]` | [`textCuesFeature`](./feature-text-cues.md#textCues-state-textCues) | Cues for the tracks being read: `metadata` and `chapters` tracks that aren't disabled, except the thumbnails track, plus any track a `watchTextCues()` filter matches. In `textTrackList` order. |
|
|
94
|
+
| `watchTextCues` | `(filter: { kind?: TextTrackKind \| readonly TextTrackKind[]; label?: string; language?: string } \| ((track: MediaTextTrack) => boolean)) => (() => void)` | [`textCuesFeature`](./feature-text-cues.md#textCues-action-watchTextCues) | Read cues for more tracks, such as captions for an interactive transcript. Cues are tracked until the returned function is called. |
|
|
91
95
|
|
|
92
96
|
## Features by preset
|
|
93
97
|
|
|
@@ -101,7 +105,7 @@ Each column is a preset's feature bundle. A feature no bundle includes is opt-in
|
|
|
101
105
|
| [`fullscreenFeature`](./feature-fullscreen.md) | ✓ | – | – | ✓ |
|
|
102
106
|
| [`controlsFeature`](./feature-controls.md) | ✓ | – | – | ✓ |
|
|
103
107
|
| [`bufferFeature`](./feature-buffer.md) | ✓ | ✓ | ✓ | ✓ |
|
|
104
|
-
| [`textTrackFeature`](./feature-text-tracks.md) | ✓ |
|
|
108
|
+
| [`textTrackFeature`](./feature-text-tracks.md) | ✓ | ✓ | ✓ | ✓ |
|
|
105
109
|
| [`playbackRateFeature`](./feature-playback-rate.md) | ✓ | ✓ | – | – |
|
|
106
110
|
| [`pipFeature`](./feature-pip.md) | ✓ | – | – | ✓ |
|
|
107
111
|
| [`errorFeature`](./feature-error.md) | ✓ | ✓ | ✓ | ✓ |
|
|
@@ -112,4 +116,5 @@ Each column is a preset's feature bundle. A feature no bundle includes is opt-in
|
|
|
112
116
|
| [`remotePlaybackFeature`](./feature-remote-playback.md) | ✓ | – | – | ✓ |
|
|
113
117
|
| [`liveFeature`](./feature-live.md) | – | – | ✓ | ✓ |
|
|
114
118
|
| [`streamTypeFeature`](./feature-stream-type.md) | – | – | – | – |
|
|
115
|
-
| [`orientationLockFeature`](./feature-orientation-lock.md) | – | – | – | – |
|
|
119
|
+
| [`orientationLockFeature`](./feature-orientation-lock.md) | – | – | – | – |
|
|
120
|
+
| [`textCuesFeature`](./feature-text-cues.md) | ✓ | ✓ | ✓ | ✓ |
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/audio/skin';
|
|
|
14
14
|
Import `@videojs/html/audio/neutral-skin`, `compat-skin`, or `scaffold-skin` instead for another skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/audio.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`audio-neutral.js`, `audio-compat.js`, and `audio-scaffold.js` register the other skins instead, and `audio-player.js` registers `<audio-player>` alone.
|
|
@@ -62,6 +62,8 @@ The preset root also exports a `PlayerController` bound to the audio player’s
|
|
|
62
62
|
| [`timeFeature`](./feature-time.md) | Playback position and duration state for the player store |
|
|
63
63
|
| [`sourceFeature`](./feature-source.md) | Media source state and actions for the player store |
|
|
64
64
|
| [`bufferFeature`](./feature-buffer.md) | Buffered and seekable time range state for the player store |
|
|
65
|
+
| [`textTrackFeature`](./feature-text-tracks.md) | Subtitles, captions, and chapter track state for the player store |
|
|
66
|
+
| [`textCuesFeature`](./feature-text-cues.md) | Cues and active cues from metadata, chapters, and app text tracks |
|
|
65
67
|
| [`errorFeature`](./feature-error.md) | Media error state and actions for the player store |
|
|
66
68
|
| [`metadataFeature`](./feature-metadata.md) | Resolved title and poster values for the player store |
|
|
67
69
|
|
|
@@ -15,7 +15,7 @@ import '@videojs/html/background/video';
|
|
|
15
15
|
Or load the [CDN](../../guides/cdn.md) bundle that registers all three:
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
18
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/background.js"></script>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Unlike the other presets, the background preset has one bundle and no player-only bundle.
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/live-audio/skin';
|
|
|
14
14
|
Import `@videojs/html/live-audio/neutral-skin`, `compat-skin`, or `scaffold-skin` instead for another skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-audio.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`live-audio-neutral.js`, `live-audio-compat.js`, and `live-audio-scaffold.js` register the other skins instead, and `live-audio-player.js` registers `<live-audio-player>` alone.
|
|
@@ -64,6 +64,8 @@ The preset root also exports a `PlayerController` bound to the live audio player
|
|
|
64
64
|
| [`timeFeature`](./feature-time.md) | Playback position and duration state for the player store |
|
|
65
65
|
| [`sourceFeature`](./feature-source.md) | Media source state and actions for the player store |
|
|
66
66
|
| [`bufferFeature`](./feature-buffer.md) | Buffered and seekable time range state for the player store |
|
|
67
|
+
| [`textTrackFeature`](./feature-text-tracks.md) | Subtitles, captions, and chapter track state for the player store |
|
|
68
|
+
| [`textCuesFeature`](./feature-text-cues.md) | Cues and active cues from metadata, chapters, and app text tracks |
|
|
67
69
|
| [`errorFeature`](./feature-error.md) | Media error state and actions for the player store |
|
|
68
70
|
| [`liveFeature`](./feature-live.md) | Live edge state for the player store |
|
|
69
71
|
| [`metadataFeature`](./feature-metadata.md) | Resolved title and poster values for the player store |
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/live-video/skin';
|
|
|
14
14
|
Import `@videojs/html/live-video/neutral-skin`, `compat-skin`, or `scaffold-skin` instead for another skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/live-video.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`live-video-neutral.js`, `live-video-compat.js`, and `live-video-scaffold.js` register the other skins instead, and `live-video-player.js` registers `<live-video-player>` alone.
|
|
@@ -69,6 +69,7 @@ The preset root also exports a `PlayerController` bound to the live video player
|
|
|
69
69
|
| [`remotePlaybackFeature`](./feature-remote-playback.md) | Remote playback state and actions for the player store |
|
|
70
70
|
| [`controlsFeature`](./feature-controls.md) | User activity and controls visibility state for the player store |
|
|
71
71
|
| [`textTrackFeature`](./feature-text-tracks.md) | Subtitles, captions, and chapter track state for the player store |
|
|
72
|
+
| [`textCuesFeature`](./feature-text-cues.md) | Cues and active cues from metadata, chapters, and app text tracks |
|
|
72
73
|
| [`errorFeature`](./feature-error.md) | Media error state and actions for the player store |
|
|
73
74
|
| [`liveFeature`](./feature-live.md) | Live edge state for the player store |
|
|
74
75
|
| [`metadataFeature`](./feature-metadata.md) | Resolved title and poster values for the player store |
|
|
@@ -14,7 +14,7 @@ import '@videojs/html/video/skin';
|
|
|
14
14
|
Import `@videojs/html/video/neutral-skin`, `compat-skin`, or `scaffold-skin` instead for another skin. Or load one [CDN](../../guides/cdn.md) bundle that registers the player and a skin together:
|
|
15
15
|
|
|
16
16
|
```html
|
|
17
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.
|
|
17
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.4.0/video.js"></script>
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
`video-neutral.js`, `video-compat.js`, and `video-scaffold.js` register the other skins instead, and `video-player.js` registers `<video-player>` alone.
|
|
@@ -69,6 +69,7 @@ The preset root also exports a `PlayerController` bound to the video player’s
|
|
|
69
69
|
| [`remotePlaybackFeature`](./feature-remote-playback.md) | Remote playback state and actions for the player store |
|
|
70
70
|
| [`controlsFeature`](./feature-controls.md) | User activity and controls visibility state for the player store |
|
|
71
71
|
| [`textTrackFeature`](./feature-text-tracks.md) | Subtitles, captions, and chapter track state for the player store |
|
|
72
|
+
| [`textCuesFeature`](./feature-text-cues.md) | Cues and active cues from metadata, chapters, and app text tracks |
|
|
72
73
|
| [`errorFeature`](./feature-error.md) | Media error state and actions for the player store |
|
|
73
74
|
| [`metadataFeature`](./feature-metadata.md) | Resolved title and poster values for the player store |
|
|
74
75
|
|