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

import { SpeedSettingsButton } from "stream-chat-react-native";

<SpeedSettingsButton
  currentPlaybackRate={1.5}
  onPress={() => cyclePlaybackRate()}
/>;

Props

PropDescriptionType
currentPlaybackRate (required)The current playback speed value. Displayed with one decimal place (e.g., 1.0, 1.5, 2.0).number
onPress (required)Callback invoked when the button is pressed.() => void
containerStyleAdditional style applied to the button container. The button has fixed dimensions of 40x24 with a rounded pill shape and a border styled using the controlPlaybackToggleBorder semantic token.StyleProp<ViewStyle>