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

am: a6ba53d69d

Change-Id: Id3e25aa4e9f71d646f263de372901fbd35e81569
This commit is contained in:
Jaewan Kim
2018-03-26 05:16:59 +00:00
committed by android-build-merger
2 changed files with 16 additions and 0 deletions

View File

@@ -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) { }
}
}

View File

@@ -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>