import { SpeedSettingsButton } from "stream-chat-react-native";
<SpeedSettingsButton
currentPlaybackRate={1.5}
onPress={() => cyclePlaybackRate()}
/>;This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
SpeedSettingsButton
SpeedSettingsButton renders a small bordered button displaying the current playback speed (e.g., "x1.0", "x1.5", "x2.0"). It is used in audio and video playback controls to allow users to cycle through playback rates.
Usage
Props
currentPlaybackRate (required)
The current playback speed value. Displayed with one decimal place (e.g., 1.0, 1.5, 2.0).
| Type |
|---|
| number |
onPress (required)
Callback invoked when the button is pressed.
| Type |
|---|
() => void |
containerStyle
Additional style applied to the button container.
| Type |
|---|
StyleProp<ViewStyle> |
The button has fixed dimensions of 40 × 24 with a rounded pill shape and a border styled using the controlPlaybackToggleBorder semantic token.