getPlaybackSpeed

public floatĀ getPlaybackSpeed()

Gets the current playback speed.

Returns the speed at which the media is playing, where 1.0 represents normal speed.

Example usage:

SurfaceView surfaceView = findViewById(R.id.surface_view);
SandboxedPlayer player = new SandboxedPlayer(context, surfaceView);
float speed = player.getPlaybackSpeed();
Log.d("Client", "Current speed: " + speed); // e.g., 1.0

Return

The playback speed (e.g., 1.0 for normal), or 1.0 if unset.