-
- All Implemented Interfaces:
-
org.readium.r2.navigator.preferences.Configurable
public interface AudioEngine<S extends Configurable.Settings, P extends Configurable.Preferences<P>> implements Configurable<S, P>
An audio engine playing a list of items.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAudioEngine.ErrorMarker interface for the errors that the AudioEngine returns.
public classAudioEngine.StateState of the player.
public final classAudioEngine.PlaybackState of the playback.
-
Method Summary
Modifier and Type Method Description abstract Unitplay()Resumes the playback at the current location. abstract Unitpause()Pauses the playback. abstract UnitskipTo(Integer index, Duration offset)Skips to offset in the item at index. abstract Unitskip(Duration duration)Skips duration either forward or backward if duration is negative. abstract UnitskipForward()Skips forward a small increment. abstract UnitskipBackward()Skips backward a small increment. abstract Unitclose()Closes the player. abstract PlayerasPlayer()Adapts this engine to the media3 Player interface. abstract StateFlow<AudioEngine.Playback>getPlayback()Current state of the playback. abstract StateFlow<S>getSettings()-
-
Method Detail
-
skipForward
abstract Unit skipForward()
Skips forward a small increment.
-
skipBackward
abstract Unit skipBackward()
Skips backward a small increment.
-
getPlayback
abstract StateFlow<AudioEngine.Playback> getPlayback()
Current state of the playback.
-
getSettings
abstract StateFlow<S> getSettings()
-
-
-
-