Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6ba53d6 authored by Jaewan Kim's avatar Jaewan Kim Committed by Android (Google) Code Review
Browse files

Merge "MediaPlayerBase: Add PlayerEventCallback#onPlaybackSpeedChanged()" into pi-dev

parents a5b29fff 6fac589d
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -337,6 +337,13 @@ public abstract class MediaPlayerBase implements AutoCloseable {
         */
        public void onBufferingStateChanged(@NonNull MediaPlayerBase mpb,
                @NonNull DataSourceDesc dsd, @BuffState int state) { }

        /**
         * Called to indicate that the playback speed has changed.
         * @param mpb the player that is buffering
         * @param speed the new playback speed.
         */
        public void onPlaybackSpeedChanged(@NonNull MediaPlayerBase mpb, float speed) { }
    }

}
+9 −0
Original line number Diff line number Diff line
@@ -829,6 +829,15 @@ public class MediaSession2 implements AutoCloseable {
        public void onBufferingStateChanged(@NonNull MediaSession2 session,
                @NonNull MediaPlayerBase player, @NonNull MediaItem2 item, @BuffState int state) { }

        /**
         * Called to indicate that the playback speed has changed.
         * @param session the session for this event
         * @param player the player for this event
         * @param speed the new playback speed.
         */
        public void onPlaybackSpeedChanged(@NonNull MediaSession2 session,
                @NonNull MediaPlayerBase player, float speed) { }

        /**
         * Called when a playlist is changed from the {@link MediaPlaylistAgent}.
         * <p>