ReferenceMenus
PlaybackRateRadioGroup
A menu radio group for selecting playback speed
Creates radio items from the player playback rate state and selects the playback speed.
Import
Anatomy
Behavior
The group is available when the configured media exposes playback rates. Option labels default to the rate followed by a multiplication sign (e.g. 1.5×); pass formatRate to customize them.
PlaybackRateRadioGroup.Root uses usePlaybackRateOptions to own selection and renders no element. Wrap the menu’s Menu.Trigger and Menu.Content in it so the trigger inherits the group’s disabled and hidden state and exposes data-availability. PlaybackRateRadioGroup.Options renders the items: its required renderItem callback renders the Menu.RadioItem root and receives item state containing the translated label and current checked value. PlaybackRateRadioGroup.Value displays the selected label, typically inside the trigger. Options and Value render null when the playback rate feature is not configured.
The PlaybackRateRadioGroup export from the @videojs/react root is a compatibility component that composes Root and Options behind the former single-component props. Prefer the parts for new code.
Styling
Unavailable groups receive the native hidden attribute.
Accessibility
The group uses the menu radio group pattern.
PlaybackRateRadioGroup.Options receives its accessible label from the label prop on PlaybackRateRadioGroup.Root or defaults to Playback rate. Override it with aria-label or aria-labelledby on PlaybackRateRadioGroup.Options.