@videojs/react 10.0.0-beta.30 → 10.0.0-beta.31

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.
Files changed (130) hide show
  1. package/dist/default/i18n/context.js.map +1 -1
  2. package/dist/default/i18n/create-i18n.js +3 -1
  3. package/dist/default/i18n/create-i18n.js.map +1 -1
  4. package/dist/default/i18n/get-provider-root-props.js +4 -2
  5. package/dist/default/i18n/get-provider-root-props.js.map +1 -1
  6. package/dist/default/player/container.js +16 -7
  7. package/dist/default/player/container.js.map +1 -1
  8. package/dist/default/presets/audio/minimal-skin.css +39 -7
  9. package/dist/default/presets/audio/skin.css +31 -7
  10. package/dist/default/presets/live-audio/minimal-skin.css +39 -7
  11. package/dist/default/presets/live-audio/skin.css +31 -7
  12. package/dist/default/presets/live-video/minimal-skin.css +39 -7
  13. package/dist/default/presets/live-video/minimal-skin.js +4 -1
  14. package/dist/default/presets/live-video/minimal-skin.js.map +1 -1
  15. package/dist/default/presets/live-video/minimal-skin.tailwind.js +4 -1
  16. package/dist/default/presets/live-video/minimal-skin.tailwind.js.map +1 -1
  17. package/dist/default/presets/live-video/skin.css +31 -7
  18. package/dist/default/presets/live-video/skin.js +4 -1
  19. package/dist/default/presets/live-video/skin.js.map +1 -1
  20. package/dist/default/presets/live-video/skin.tailwind.js +4 -1
  21. package/dist/default/presets/live-video/skin.tailwind.js.map +1 -1
  22. package/dist/default/presets/video/minimal-skin.css +39 -7
  23. package/dist/default/presets/video/minimal-skin.js +27 -11
  24. package/dist/default/presets/video/minimal-skin.js.map +1 -1
  25. package/dist/default/presets/video/minimal-skin.tailwind.js +28 -12
  26. package/dist/default/presets/video/minimal-skin.tailwind.js.map +1 -1
  27. package/dist/default/presets/video/skin.css +31 -7
  28. package/dist/default/presets/video/skin.js +27 -11
  29. package/dist/default/presets/video/skin.js.map +1 -1
  30. package/dist/default/presets/video/skin.tailwind.js +28 -12
  31. package/dist/default/presets/video/skin.tailwind.js.map +1 -1
  32. package/dist/default/skins/dist/default/default/tailwind/components/button-group.js +1 -1
  33. package/dist/default/skins/dist/default/default/tailwind/components/button-group.js.map +1 -1
  34. package/dist/default/skins/dist/default/default/tailwind/components/controls.js +1 -1
  35. package/dist/default/skins/dist/default/default/tailwind/components/controls.js.map +1 -1
  36. package/dist/default/skins/dist/default/default/tailwind/components/menu.js +8 -7
  37. package/dist/default/skins/dist/default/default/tailwind/components/menu.js.map +1 -1
  38. package/dist/default/skins/dist/default/default/tailwind/components/time.js +1 -1
  39. package/dist/default/skins/dist/default/default/tailwind/components/time.js.map +1 -1
  40. package/dist/default/skins/dist/default/minimal/tailwind/components/button-group.js +1 -1
  41. package/dist/default/skins/dist/default/minimal/tailwind/components/button-group.js.map +1 -1
  42. package/dist/default/skins/dist/default/minimal/tailwind/components/controls.js +1 -1
  43. package/dist/default/skins/dist/default/minimal/tailwind/components/controls.js.map +1 -1
  44. package/dist/default/skins/dist/default/minimal/tailwind/components/menu.js +8 -7
  45. package/dist/default/skins/dist/default/minimal/tailwind/components/menu.js.map +1 -1
  46. package/dist/default/skins/dist/default/minimal/tailwind/components/time.js +2 -2
  47. package/dist/default/skins/dist/default/minimal/tailwind/components/time.js.map +1 -1
  48. package/dist/default/ui/hooks/use-slider.js +1 -2
  49. package/dist/default/ui/hooks/use-slider.js.map +1 -1
  50. package/dist/dev/i18n/context.d.ts +3 -1
  51. package/dist/dev/i18n/context.d.ts.map +1 -1
  52. package/dist/dev/i18n/context.js.map +1 -1
  53. package/dist/dev/i18n/create-i18n.d.ts.map +1 -1
  54. package/dist/dev/i18n/create-i18n.js +3 -1
  55. package/dist/dev/i18n/create-i18n.js.map +1 -1
  56. package/dist/dev/i18n/get-provider-root-props.js +4 -2
  57. package/dist/dev/i18n/get-provider-root-props.js.map +1 -1
  58. package/dist/dev/player/container.d.ts.map +1 -1
  59. package/dist/dev/player/container.js +16 -7
  60. package/dist/dev/player/container.js.map +1 -1
  61. package/dist/dev/presets/audio/minimal-skin.css +39 -7
  62. package/dist/dev/presets/audio/skin.css +31 -7
  63. package/dist/dev/presets/live-audio/minimal-skin.css +39 -7
  64. package/dist/dev/presets/live-audio/skin.css +31 -7
  65. package/dist/dev/presets/live-video/minimal-skin.css +39 -7
  66. package/dist/dev/presets/live-video/minimal-skin.js +4 -1
  67. package/dist/dev/presets/live-video/minimal-skin.js.map +1 -1
  68. package/dist/dev/presets/live-video/minimal-skin.tailwind.js +4 -1
  69. package/dist/dev/presets/live-video/minimal-skin.tailwind.js.map +1 -1
  70. package/dist/dev/presets/live-video/skin.css +31 -7
  71. package/dist/dev/presets/live-video/skin.js +4 -1
  72. package/dist/dev/presets/live-video/skin.js.map +1 -1
  73. package/dist/dev/presets/live-video/skin.tailwind.js +4 -1
  74. package/dist/dev/presets/live-video/skin.tailwind.js.map +1 -1
  75. package/dist/dev/presets/video/minimal-skin.css +39 -7
  76. package/dist/dev/presets/video/minimal-skin.d.ts.map +1 -1
  77. package/dist/dev/presets/video/minimal-skin.js +27 -11
  78. package/dist/dev/presets/video/minimal-skin.js.map +1 -1
  79. package/dist/dev/presets/video/minimal-skin.tailwind.d.ts.map +1 -1
  80. package/dist/dev/presets/video/minimal-skin.tailwind.js +28 -12
  81. package/dist/dev/presets/video/minimal-skin.tailwind.js.map +1 -1
  82. package/dist/dev/presets/video/skin.css +31 -7
  83. package/dist/dev/presets/video/skin.d.ts.map +1 -1
  84. package/dist/dev/presets/video/skin.js +27 -11
  85. package/dist/dev/presets/video/skin.js.map +1 -1
  86. package/dist/dev/presets/video/skin.tailwind.d.ts.map +1 -1
  87. package/dist/dev/presets/video/skin.tailwind.js +28 -12
  88. package/dist/dev/presets/video/skin.tailwind.js.map +1 -1
  89. package/dist/dev/skins/dist/default/default/tailwind/components/button-group.js +1 -1
  90. package/dist/dev/skins/dist/default/default/tailwind/components/button-group.js.map +1 -1
  91. package/dist/dev/skins/dist/default/default/tailwind/components/controls.js +1 -1
  92. package/dist/dev/skins/dist/default/default/tailwind/components/controls.js.map +1 -1
  93. package/dist/dev/skins/dist/default/default/tailwind/components/menu.js +8 -7
  94. package/dist/dev/skins/dist/default/default/tailwind/components/menu.js.map +1 -1
  95. package/dist/dev/skins/dist/default/default/tailwind/components/time.js +1 -1
  96. package/dist/dev/skins/dist/default/default/tailwind/components/time.js.map +1 -1
  97. package/dist/dev/skins/dist/default/minimal/tailwind/components/button-group.js +1 -1
  98. package/dist/dev/skins/dist/default/minimal/tailwind/components/button-group.js.map +1 -1
  99. package/dist/dev/skins/dist/default/minimal/tailwind/components/controls.js +1 -1
  100. package/dist/dev/skins/dist/default/minimal/tailwind/components/controls.js.map +1 -1
  101. package/dist/dev/skins/dist/default/minimal/tailwind/components/menu.js +8 -7
  102. package/dist/dev/skins/dist/default/minimal/tailwind/components/menu.js.map +1 -1
  103. package/dist/dev/skins/dist/default/minimal/tailwind/components/time.js +2 -2
  104. package/dist/dev/skins/dist/default/minimal/tailwind/components/time.js.map +1 -1
  105. package/dist/dev/ui/hooks/use-slider.d.ts.map +1 -1
  106. package/dist/dev/ui/hooks/use-slider.js +1 -2
  107. package/dist/dev/ui/hooks/use-slider.js.map +1 -1
  108. package/docs/README.md +1 -1
  109. package/docs/concepts/media-sources.md +26 -2
  110. package/docs/concepts/skins.md +48 -16
  111. package/docs/how-to/customize-skins.md +7933 -50
  112. package/docs/how-to/i18n-switch-locale.md +27 -0
  113. package/docs/how-to/installation.md +4 -4
  114. package/docs/how-to/migrate-from-plyr.md +1 -1
  115. package/docs/llms.txt +7 -0
  116. package/docs/reference/cloudflare-video.md +223 -0
  117. package/docs/reference/dash-video.md +55 -0
  118. package/docs/reference/feature-metadata.md +3 -1
  119. package/docs/reference/hls-audio.md +27 -1
  120. package/docs/reference/hls-video.md +39 -1
  121. package/docs/reference/hlsjs-video.md +627 -0
  122. package/docs/reference/native-hls-video.md +41 -0
  123. package/docs/reference/shaka-video.md +359 -0
  124. package/docs/reference/spotify-audio.md +188 -0
  125. package/docs/reference/tiktok-video.md +280 -0
  126. package/docs/reference/title.md +1 -1
  127. package/docs/reference/twitch-video.md +211 -0
  128. package/docs/reference/vimeo-video.md +736 -0
  129. package/docs/reference/youtube-video.md +339 -0
  130. package/package.json +8 -8
@@ -24,6 +24,33 @@ Ambient switching only applies when `I18nProvider` has no explicit `locale` prop
24
24
 
25
25
  An [`I18nProvider`](../reference/i18n-provider.md) without `locale` reads `<html lang>`. Updating it is enough when you are not forcing an explicit locale.
26
26
 
27
+ ## Set text direction
28
+
29
+ `lang` identifies the content language. `dir` controls text and layout direction. Browsers do not infer one from the other, so set both when the locale applies to the whole document:
30
+
31
+ ts
32
+
33
+ ```
34
+ document.documentElement.lang = 'ar';
35
+ document.documentElement.dir = 'rtl';
36
+ ```
37
+
38
+ Set `dir` back to `ltr` when you switch to a left-to-right language. This prevents the previous direction from remaining active.
39
+
40
+ When React’s `locale` is explicit, the player applies its resolved `lang` and `dir` to the container. A `lang` or `dir` passed to that container overrides the rendered DOM boundary only; translations still come from `I18nProvider locale`.
41
+
42
+ In HTML, `<media-i18n lang>` sets the provider locale and derives its direction. An explicit `dir` on `<media-i18n>` overrides that derived direction.
43
+
44
+ Providers without an explicit locale inherit ambient document language and direction. In that case, set `lang` and `dir` on `<html>` or another ancestor:
45
+
46
+ html
47
+
48
+ ```
49
+ <html lang="ar" dir="rtl">
50
+ ```
51
+
52
+ RTL preserves playback control ordering and time-semantic media icons while mirroring menu motion and navigation chevrons. Horizontal time and volume sliders retain a physical left-to-right value scale: Left Arrow decreases the value, Right Arrow increases it, and the minimum remains on the left.
53
+
27
54
  ## Explicit provider language
28
55
 
29
56
  tsx
@@ -18,7 +18,7 @@ bash
18
18
  ```
19
19
  npx @videojs/cli docs how-to/installation \
20
20
  --framework <html|react> \
21
- --preset <video|audio|background-video> \
21
+ --preset <video|audio|live-video|live-audio|background-video> \
22
22
  --skin <default|minimal|none> \
23
23
  --media <html5-video|html5-audio|hls|dash|mux-video|mux-audio|vimeo|background-video> \
24
24
  --source-url <url> \
@@ -28,11 +28,11 @@ npx @videojs/cli docs how-to/installation \
28
28
  Here’s what the flags mean:
29
29
 
30
30
  * *Framework*: Pick whether you’re working in React or if you’d like to use HTML custom elements. (More to come!)
31
- * *Preset*: Pick a pre-built player. The default presets work well for general website playback.
31
+ * *Preset*: Pick a pre-built player. The default presets work well for general website playback; the live presets add a Live button and drop the on-demand time displays.
32
32
  * *Skin*: Pick what your player looks like
33
- * *Media*: Pick what kind of media you have
33
+ * *Media*: Pick what kind of media you have. The `live-video` preset supports HLS and Mux video; `live-audio` supports Mux audio.
34
34
  * *Source URL*: Define where your media comes from (or omit for a sample URL)
35
- * *Install method*: How do you want to install your package? (CDN is HTML-only)
35
+ * *Install method*: How do you want to install your package? (CDN is HTML-only.)
36
36
 
37
37
  If you’re an agent, interview your user and offer to run the CLI for them, or offer them a precomposed CLI command.
38
38
 
@@ -139,7 +139,7 @@ js
139
139
  import { VimeoVideo } from '@videojs/react/media/vimeo-video';
140
140
  ```
141
141
 
142
- Set the `src` to the URL for the Vimeo video, for example `https://vimeo.com/648359100`.
142
+ Set the `src` to the URL for the Vimeo video, for example `https://vimeo.com/76979871`.
143
143
 
144
144
  ### YouTube
145
145
 
package/docs/llms.txt CHANGED
@@ -94,6 +94,7 @@ API Reference for UI components for building media player interfaces.
94
94
  API Reference for media components that handle streaming protocols and media playback.
95
95
 
96
96
  - [BackgroundVideo](./reference/background-video.md): Decorative background video element with automatic muting and looping
97
+ - [CloudflareVideo](./reference/cloudflare-video.md): Video component that plays Cloudflare Stream videos through the Stream player
97
98
  - [DashVideo](./reference/dash-video.md): DASH video element powered by dash.js for adaptive bitrate streaming
98
99
  - [HlsAudio](./reference/hls-audio.md): Audio-only HLS element that plays the audio rendition of an HLS stream
99
100
  - [HlsVideo](./reference/hls-video.md): Lightweight HLS video element with minimal bundle size
@@ -101,6 +102,12 @@ API Reference for media components that handle streaming protocols and media pla
101
102
  - [MuxAudio](./reference/mux-audio.md): Audio element for Mux-hosted HLS streams
102
103
  - [MuxVideo](./reference/mux-video.md): Video element for Mux-hosted HLS streams
103
104
  - [NativeHlsVideo](./reference/native-hls-video.md): HLS video element using the browser's built-in HLS support
105
+ - [ShakaVideo](./reference/shaka-video.md): Video element powered by Shaka Player for DASH, HLS, and progressive playback with DRM
106
+ - [SpotifyAudio](./reference/spotify-audio.md): Audio component that plays Spotify tracks, episodes, playlists, and shows through the Spotify embed
107
+ - [TikTokVideo](./reference/tiktok-video.md): Video component that plays TikTok videos through the TikTok embed player
108
+ - [TwitchVideo](./reference/twitch-video.md): Video component that plays Twitch videos and live channels through the Twitch embed player
109
+ - [VimeoVideo](./reference/vimeo-video.md): Video component that plays Vimeo videos and live events through the Vimeo player
110
+ - [YouTubeVideo](./reference/youtube-video.md): Video component that plays YouTube videos and playlists through the YouTube IFrame player
104
111
 
105
112
  ### Player Features
106
113
 
@@ -0,0 +1,223 @@
1
+ # CloudflareVideo
2
+
3
+ Video component that plays Cloudflare Stream videos through the Stream player
4
+
5
+ Video component that plays [Cloudflare Stream](https://developers.cloudflare.com/stream/) videos through the Stream player embed. Cloudflare’s own chrome stays hidden by default, so it drops into a [player skin](../concepts/skins.md) like any other media component; set `controls` to use Cloudflare’s UI instead.
6
+
7
+ ## Load a source
8
+
9
+ `src` takes a raw 32-character video UID, any `cloudflarestream.com` or `videodelivery.net` URL, or a signed token. Watch, embed, iframe, manifest, and thumbnail URLs all carry the UID in the same position, and a signed token stands in for the UID wherever one appears.
10
+
11
+ tsx
12
+
13
+ ```
14
+ <CloudflareVideo src="https://watch.videodelivery.net/bfbd585059e33391d67b0f1d15fe6ea4" />
15
+ ```
16
+
17
+ ## Signed playback
18
+
19
+ For [signed URLs](https://developers.cloudflare.com/stream/viewing-videos/securing-your-stream/), pass the signed token wherever the UID would go: as the whole `src`, or inside a Stream URL. Keep your customer subdomain when your URLs name one. Cloudflare serves signed and access-controlled videos only from `customer-<code>.cloudflarestream.com`, so the element preserves that origin instead of collapsing it onto the shared host.
20
+
21
+ ## Behavior
22
+
23
+ A few things work differently from a native `<video>` element, because the Stream embed doesn’t expose them:
24
+
25
+ * The embed owns text tracks: `textTracks` stays empty, and `engine.cloudflare.defaultTextTrack` picks the track to show.
26
+ * Picture-in-picture is unavailable, and the player reports it as unsupported.
27
+ * Fullscreen targets the iframe, so Cloudflare’s own chrome shows in fullscreen.
28
+ * `playsInline` has no effect: the Stream embed always plays inline.
29
+
30
+ ## Examples
31
+
32
+ ### Basic Usage
33
+
34
+ App.tsx
35
+
36
+ App.css
37
+
38
+ ```
39
+ import { CloudflareVideo } from '@videojs/react/media/cloudflare-video';
40
+
41
+ export default function BasicUsage() {
42
+ return (
43
+ <div className="cloudflare-video">
44
+ <CloudflareVideo src="https://watch.videodelivery.net/bfbd585059e33391d67b0f1d15fe6ea4" controls />
45
+ </div>
46
+ );
47
+ }
48
+ ```
49
+ ```
50
+ .cloudflare-video {
51
+ width: 100%;
52
+ aspect-ratio: 16 / 9;
53
+ }
54
+ ```
55
+
56
+ ## API Reference
57
+
58
+ ### Props
59
+
60
+ Accepts these Video.js-specific props:
61
+
62
+ Prop
63
+
64
+ Type
65
+
66
+ Default
67
+
68
+ Details
69
+
70
+ `autoplay`
71
+
72
+ `boolean`
73
+
74
+ `false`
75
+
76
+ `controls`
77
+
78
+ `boolean`
79
+
80
+ `false`
81
+
82
+ `defaultMuted`
83
+
84
+ `boolean`
85
+
86
+ `false`
87
+
88
+ `loop`
89
+
90
+ `boolean`
91
+
92
+ `false`
93
+
94
+ `muted`
95
+
96
+ `boolean`
97
+
98
+ `false`
99
+
100
+ `playsInline`
101
+
102
+ `boolean`
103
+
104
+ `true`
105
+
106
+ `poster`
107
+
108
+ `string`
109
+
110
+ `''`
111
+
112
+ `preload`
113
+
114
+ `MediaPreloadType`
115
+
116
+ `'metadata'`
117
+
118
+ `source`
119
+
120
+ `CloudflareSource | null`
121
+
122
+ `null`
123
+
124
+
125
+
126
+ Description
127
+
128
+ Structured source: `src` plus embed parameters under `engine.cloudflare`. Replacing it re-derives `src`.
129
+
130
+ `src`
131
+
132
+ `string`
133
+
134
+ `''`
135
+
136
+ ### Engine options
137
+
138
+ #### `source.engine.cloudflare`
139
+
140
+ Pass [Stream player parameters](https://developers.cloudflare.com/stream/viewing-videos/using-the-stream-player/) under `source.engine.cloudflare`, spelled exactly as Cloudflare spells them, plus anything Cloudflare adds next. They’re serialized onto the embed URL untouched, and the embed reads them once, when its URL is built. [Media Sources](../concepts/media-sources.md) covers how engine options fit into a structured source.
141
+
142
+ `controls`, `autoplay`, `loop`, `muted`, `preload`, and `poster` come from the props of the same name, so they have no `engine.cloudflare` spelling.
143
+
144
+ tsx
145
+
146
+ ```
147
+ <CloudflareVideo
148
+ source={{
149
+ src: 'bfbd585059e33391d67b0f1d15fe6ea4',
150
+ engine: { cloudflare: { primaryColor: '#f03e3e', startTime: '5m30s' } },
151
+ }}
152
+ />
153
+ ```
154
+
155
+ Option
156
+
157
+ Type
158
+
159
+ Details
160
+
161
+ `ad-url`
162
+
163
+ `string`
164
+
165
+
166
+
167
+ Description
168
+
169
+ VAST tag to play as a pre-roll ad. Reported through the `stream-ad*` events.
170
+
171
+ `defaultTextTrack`
172
+
173
+ `string`
174
+
175
+
176
+
177
+ Description
178
+
179
+ BCP 47 language of the text track to show by default (`'en'`, `'de'`).
180
+
181
+ `letterboxColor`
182
+
183
+ `string`
184
+
185
+
186
+
187
+ Description
188
+
189
+ Any CSS color for the letterbox bars around a video that does not fill the player.
190
+
191
+ `primaryColor`
192
+
193
+ `string`
194
+
195
+
196
+
197
+ Description
198
+
199
+ Any CSS color for the progress bar and other player accents.
200
+
201
+ `referrerPolicy`
202
+
203
+ `ReferrerPolicy`
204
+
205
+
206
+
207
+ Description
208
+
209
+ `referrerpolicy` for the embed iframe. Not a Cloudflare player parameter.
210
+
211
+ `startTime`
212
+
213
+ `string | number`
214
+
215
+
216
+
217
+ Description
218
+
219
+ Where playback starts, in seconds or as a time string (`'5m30s'`).
220
+
221
+ ### Ref
222
+
223
+ Forwards its ref to the rendered `<iframe>`. The ref is an [HTMLIFrameElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement). Control playback with the component props and player APIs rather than the iframe ref.
@@ -60,6 +60,61 @@ dash.js takes settings on a live player, so changing `engine.dashJs` re-applies
60
60
 
61
61
  `''`
62
62
 
63
+ ### Engine options
64
+
65
+ #### `source.engine.dashJs`
66
+
67
+ Pass dash.js’s own settings here. They’re handed to dash.js untouched, so every option in its [settings reference](https://cdn.dashjs.org/latest/jsdoc/module-Settings.html) works. Replacing the object resets any settings applied before it. [Media Sources](../concepts/media-sources.md) covers how engine options fit into a structured source.
68
+
69
+ Each of the three below is a group of dash.js settings rather than a single value, and dash.js documents what’s inside them.
70
+
71
+ tsx
72
+
73
+ ```
74
+ <DashVideo
75
+ source={{
76
+ src: 'https://example.com/manifest.mpd',
77
+ engine: { dashJs: { streaming: { buffer: { fastSwitchEnabled: true } } } },
78
+ }}
79
+ />
80
+ ```
81
+
82
+ Option
83
+
84
+ Type
85
+
86
+ Details
87
+
88
+ `debug`
89
+
90
+ `object`
91
+
92
+
93
+
94
+ Type
95
+
96
+ `{ logLevel?: LogLevel; dispatchEvent?: boolean; }`
97
+
98
+ `errors`
99
+
100
+ `object`
101
+
102
+
103
+
104
+ Type
105
+
106
+ `{ recoverAttempts?: { mediaErrorDecode?: number; }; }`
107
+
108
+ `streaming`
109
+
110
+ `object`
111
+
112
+
113
+
114
+ Type
115
+
116
+ `{ abandonLoadTimeout?: number; wallclockTimeUpdateInterval?: number; manifestUpdateRetryInterval?: number; liveUpdateTimeThresholdInMilliseconds?: number; cacheInitSegments?: boolean; ... 40 more ...; dvbReporting?: { ...; }; }`
117
+
63
118
  ### Ref
64
119
 
65
120
  Forwards its ref to the rendered `<video>`. The ref is an [HTMLVideoElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLVideoElement) and exposes its complete native property and method API.
@@ -78,6 +78,8 @@ The resolved poster URL, independent of the media element's own `poster`. Set it
78
78
 
79
79
  ### Selector
80
80
 
81
+ To just show the name of what is playing, drop in the [Title component](./title.md) — it reads this feature for you. Reach for the selector when building your own UI.
82
+
81
83
  Pass `selectMetadata` to [`usePlayer`](./use-player.md) to subscribe to metadata state. Returns `undefined` if the metadata feature is not configured.
82
84
 
83
85
  ContentTitle.tsx
@@ -126,4 +128,4 @@ The media tier comes from media that reports content data and announces changes
126
128
 
127
129
  `poster` is the feature’s own resolved value, not the media element’s `poster` attribute. Setting one does not set the other.
128
130
 
129
- A low-resolution stand-in to show while the poster loads is not part of this feature. The [poster](./poster.md) renders an `<img>` you control, so give it a `background-image` and that shows until the poster itself paints over it.
131
+ A low-resolution stand-in to show while the poster loads is not part of this feature. The [poster](./poster.md) renders an `<img>` you control, so give it a `background-image` and that shows until the poster itself paints over it. [Add a poster placeholder](../how-to/add-a-poster-placeholder.md) walks through that technique for each framework.
@@ -30,7 +30,33 @@ export default function BasicUsage() {
30
30
 
31
31
  ### Props
32
32
 
33
- Accepts the standard React props for a native `<audio>`.
33
+ Accepts the standard React props for a native `<audio>`, plus these Video.js-specific props:
34
+
35
+ Prop
36
+
37
+ Type
38
+
39
+ Default
40
+
41
+ Details
42
+
43
+ `disableRemotePlayback`
44
+
45
+ `false | Target["disableRemotePlayback"]`
46
+
47
+ `false`
48
+
49
+ `preload`
50
+
51
+ `Target["preload"] | "metadata"`
52
+
53
+ `''`
54
+
55
+ `src`
56
+
57
+ `"" | Target["src"]`
58
+
59
+ `''`
34
60
 
35
61
  ### Ref
36
62
 
@@ -30,7 +30,45 @@ export default function BasicUsage() {
30
30
 
31
31
  ### Props
32
32
 
33
- Accepts the standard React props for a native `<video>`.
33
+ Accepts the standard React props for a native `<video>`, plus these Video.js-specific props:
34
+
35
+ Prop
36
+
37
+ Type
38
+
39
+ Default
40
+
41
+ Details
42
+
43
+ `disableRemotePlayback`
44
+
45
+ `false | Target["disableRemotePlayback"]`
46
+
47
+ `false`
48
+
49
+ `preload`
50
+
51
+ `Target["preload"] | "metadata"`
52
+
53
+ `''`
54
+
55
+ `src`
56
+
57
+ `"" | Target["src"]`
58
+
59
+ `''`
60
+
61
+ `streamType`
62
+
63
+ `MediaStreamType | NonNullable<Target["streamType"]>`
64
+
65
+ `'unknown'`
66
+
67
+
68
+
69
+ Description
70
+
71
+ Current stream type (`'on-demand'`, `'live'`, or `'unknown'`). Defaults to `'unknown'`; detecting hosts update it automatically, and consumers can set it to override detection.
34
72
 
35
73
  ### Ref
36
74