Merge "MediaPlayerBase: Add PlayerEventCallback#onPlaybackSpeedChanged()" into pi-dev
This commit is contained in:
@@ -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) { }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user