Changing playback speed in Exoplayer

two1stnamz picture two1stnamz · Aug 11, 2015 · Viewed 12.4k times · Source

I'm looking to implement an audio player with variable speed playback (1.0x, 1.25x, 1.5x) like typical audiobook players currently on the market do. I would like to use Google's Exoplayer library as my audioplayer library however they don't appear to support variable speed playback. Any ideas on how to implement this, or any extensions that do support this?

Answer

Christian picture Christian · May 17, 2018

The function setPlaybackSpeed() was removed and now you set the playback speed via:

    PlaybackParameters param = new PlaybackParameters(speed);
    mExoPlayer.setPlaybackParameters(param);

speed is a float number. Normal speed is 1f and double the speed would be 2f.