Setting Playback Speed on Android Devices

In this topic, you will learn how to add variable speed playback functionality to apps using the Brightcove Native SDK for Android.


For some of your apps, you may want to provide the ability for the user to change the playback speed while they are watching videos (ie, eLearning environments). You can add this functionality with the Native SDK for Android.

In your player Activity class, you can create a dialog menu to select from a desired list of playback speeds.


To add variable speed playback to your Android app, follow these steps:

  1. First, create the menu where you can select a speed. Here we will use a TextView which, when tapped, will open the menu that contains the speed values. Other menu options include Spinners.

    private TextView playbackSpeed;

    Then, add the TextView to your Activity layout:

           android:text="Change Speed"
           android:textAlignment="textEnd" />
  2. Add the playback speed control to your player Activity:

    playbackSpeed = (TextView) findViewById(;
  3. Set an onClick listener on the TextView:

    playbackSpeed.setOnClickListener(new View.OnClickListener() {
       public void onClick(View v) {
  4. Add a method to show the player speed dialog:

    private void showPlayerSpeedDialog() {
       String[] playerSpeedArrayLabels = {"0.8x", "1.0x", "1.2x", "1.5x", "1.8x", "2.0x"};
       PopupMenu popupMenu = new PopupMenu(MainActivity.this, playbackSpeed);
       for (int i = 0; i < playerSpeedArrayLabels.length; i++) {
           popupMenu.getMenu().add(i, i, i, playerSpeedArrayLabels[i]);
       popupMenu.setOnMenuItemClickListener(item -> {
           int id = item.getItemId();
           CharSequence itemTitle = item.getTitle();
           float playbackSpeed = Float.parseFloat(itemTitle.subSequence(0, 3).toString());
           changePlayerSpeed(playbackSpeed, itemTitle.subSequence(0, 3).toString());
           return false;
  5. Add a method to change the player speed to the value selected from the menu. Additionally, the method can set the selected value into the label for the TextView:

    private void changePlayerSpeed(float speed, String speedLabel) {
       // Set playback speed
       ((ExoPlayerVideoDisplayComponent) brightcoveVideoView.getVideoDisplay()).getExoPlayer().setPlaybackParameters(new PlaybackParameters(speed, 1.0f));
       // Set playback speed label
       playbackSpeed.setText("Speed: " + speedLabel + "x");

Handling playback problems

If you encounter problems with setting higher or lower playback speeds, consider restricting whether to show the playback speed control, or restricting the speeds available, based on:

  • OS level using:

  • Manufacturer using: (reliability is not guaranteed)

  • Hardware profile (TV or phone/mobile) by checking the boolean value of:

    BrightcoveMediaController.checkTvMode(Context context)


It is important to note that while it is possible to set playback speed with the ExoPlayer and the Brightcove Native SDK for Android, it does not guarantee that setting a given playback speed will provide a seamless viewing and listening experience.

Testing has revealed that it is possible to set a playback speed that will be too high for older OS versions and lower-spec devices to handle without an unacceptable degradation in audio and video quality.

if you want to implement playback speed control, it is recommended that you consider the following:

  • What is the oldest Android OS level that my application is intended for?
    • Older OSes may not have the proper codec support for higher or lower playback speeds than normal
    • Older OSes may have older chip sets that can not process the video and audio data in a performant manner
  • Is my content DRM-protected?
    • Since testing has revealed some DRM-related issues with playback speed, we do not want to rule out the possibility of decryption issues when playing at higher or lower speeds than normal
  • Does my content use closed captions or multiple audio tracks?
    • Enabling or disabling captions, or switching between captions, especially on older devices or OS levels, is a circumstance to be considered.