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

Commit 9032b8b0 authored by Jaewan Kim's avatar Jaewan Kim Committed by android-build-merger
Browse files

Merge "MediaPlayerBase: Add PlayerEventCallback#onPlaybackSpeedChanged()" into...

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

Change-Id: If6e9f52da2826fec1f82499f2dab498bbec0357c
parents 4a0f627f aa1f4210
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>