setSpeed
Sets the playback rate as a multiplier of real time, within SPEED_MIN to SPEED_MAX.
Real, on both halves. Audio runs through a time stretch, so 2x is twice as fast at the same pitch rather than a chipmunk; the video schedule divides its frame durations by the rate; and the shared clock runs at the rate, so audio, video and the reported position agree at every speed, including for video-only media.
A change while media plays is seamless: nothing stops, nothing is flushed, and the player stays PlaybackStatus.Playing. The audio already buffered for the device plays out at the old rate, so the new rate is heard after that buffer: about 200 ms, longer on Android where the device's own buffer sets it. The clock and the picture change rate at that same moment. Small changes, such as the half-percent nudges a watch-together app uses to stay in step, are inaudible. It works the same way on a source that cannot seek.
Parameters
Throws
outside that range.