-
- All Implemented Interfaces:
-
org.readium.r2.navigator.Navigator
@Deprecated(message = Use the new readium-navigator-media modules.) public interface MediaNavigator implements Navigator
A navigator rendering an audio or video publication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceMediaNavigator.Listener
-
Method Summary
Modifier and Type Method Description abstract UnitsetPlaybackRate(Double rate)Sets the speed of the media playback. abstract Unitplay()Resumes or start the playback at the current location. abstract Unitpause()Pauses the playback. abstract UnitplayPause()Toggles the playback. abstract Unitstop()Stops the playback. abstract UnitseekTo(Duration position)Seeks to the given time in the current resource. abstract UnitseekRelative(Duration offset)Seeks relatively from the current position in the current resource. abstract Flow<MediaPlayback>getPlayback()Current playback information. abstract BooleangetIsPlaying()Indicates whether the navigator is currently playing. abstract StateFlow<Locator>getCurrentLocator()Current position in the publication. LocatorgetCurrentLocation()-
-
Method Detail
-
setPlaybackRate
abstract Unit setPlaybackRate(Double rate)
Sets the speed of the media playback.
Normal speed is 1.0 and 0.0 is incorrect.
-
playPause
abstract Unit playPause()
Toggles the playback. Can be useful as a handler for play/pause button.
-
stop
abstract Unit stop()
Stops the playback.
Compared to pause, the navigator may clear its state in whatever way is appropriate. For example, recovering a player's resources.
-
seekRelative
abstract Unit seekRelative(Duration offset)
Seeks relatively from the current position in the current resource.
-
getPlayback
abstract Flow<MediaPlayback> getPlayback()
Current playback information.
-
getIsPlaying
abstract Boolean getIsPlaying()
Indicates whether the navigator is currently playing.
-
getCurrentLocator
abstract StateFlow<Locator> getCurrentLocator()
Current position in the publication. Can be used to save a bookmark to the current position.
-
getCurrentLocation
Locator getCurrentLocation()
-
-
-
-