ReferenceMenu
usePlaybackRateOptions
Hook to build playback rate menu options from the player playback rate state
Import
usePlaybackRateOptions returns the current playback rate, the available options, and setRate / setValue callbacks for wiring rate selection into a menu. It returns null when the playback rate feature is not configured.
Options come from the player’s configured playback rates. Labels default to the rate followed by a multiplication sign (e.g. 1.5×); pass formatRate to customize them. setValue accepts an option’s string value, while setRate accepts a number directly.
See PlaybackRateRadioGroup for the component-level pattern, and Menu for a complete settings menu example.