Display
Captions
This component is used to render and display captions/subtitles.
The captions component renders and displays captions/subtitles. It will be rendered as an
overlay when the player view type is video
, and as a simple captions box when the
type is audio
.
- See the loading text tracks guide for how to load and manage captions/subtitles.
- Rendering is handled by the media-captions library, see the repo for more information.
- See the media-captions motivation section for why native captions are not good enough.
- The player will dynamically switch to native captions when custom captions cannot be displayed (e.g., iOS Safari on iPhone).
Styling Parts
Section titled Styling PartsYou can style cues, voices, timed cues (past/future), and regions like so:
API Reference
Section titled API ReferenceHTMLAttributes
Ref<CaptionsInstance>
Renders and displays captions/subtitles. This will be an overlay for video and a simple captions box for audio.
Props
Section titled PropsPrevious
Next