Skip to navigation

Control playback speed

Learn how to adjust video playback speed in the FastPix Android Player.

The SDK supports playback speeds from 0.25x to 2.0x.

Set a specific speed

player.setPlaybackSpeed(1.5f) // Picks the closest supported speed if needed
val speed = player.getPlaybackSpeed()

Step through speeds

player.fast() // Jump to next speed (wraps around)
player.slow() // Jump to previous speed (wraps around)
player.normalize() // Reset to 1.0x

Get available speeds

val all = player.getAvailablePlaybackSpeeds() // FloatArray of supported speeds

Listen for speed changes

override fun onPlaybackRateChanged(rate: Float) {
// Playback speed updated
}

Notes

  • Audio pitch stays normal at every speed, so there is no chipmunk effect.
  • If an exact speed is not available, the SDK selects the closest supported speed.
  • Playback speed is preserved across configuration changes.

Frequently asked questions

How do I change the playback speed in the FastPix Android player?

Call player.setPlaybackSpeed(1.5f) to set a speed directly, or step through the supported speeds with player.fast(), player.slow(), and player.normalize() (reset to 1.0x). If an exact speed is not available, the SDK selects the closest supported speed.

What playback speeds does the SDK support?

The SDK supports speeds from 0.25x to 2.0x. Read the exact list at runtime with player.getAvailablePlaybackSpeeds(), which returns a FloatArray of the supported values.

Does changing the playback speed affect the audio pitch?

No. Audio pitch stays normal at every speed, so there is no chipmunk effect. This applies across the full 0.25x to 2.0x range.

Is the playback speed kept after a screen rotation?

Yes. Playback speed is preserved across configuration changes such as rotation, so you do not need to reapply it. Listen for changes with onPlaybackRateChanged(rate: Float).


What’s next