ReferenceMenus
media-captions-radio-group
A menu radio group for selecting caption and subtitle tracks
Creates radio items from the player text track state and selects the showing caption or subtitle track.
Import
Anatomy
Behavior
The group is available when the configured media exposes at least one caption or subtitle track. The first generated option is Off; selecting it hides captions. Track labels use the track label, then language, then kind. Pass formatTrack to customize the visible labels.
<media-captions-radio-group> generates <media-menu-radio-item> children, including the Off item. Add an optional <template> with a single <media-menu-radio-item> to customize each generated item.
Styling
Unavailable groups receive the native hidden attribute.
Accessibility
The group uses the menu radio group pattern.
The element receives an accessible label from the label property or defaults to Captions.
Examples
Basic usage
API Reference
media-captions-radio-group
Menu radio group that generates an Off <media-menu-radio-item> plus one per captions and subtitles track, and
shares the selected label and availability with an enclosing menu. An optional <template> holding one
<media-menu-radio-item> customizes each generated item.