FileReplay

interface FileReplay : Replay

Local file replay stream control interface.

Provides control over some local file stream, allowing to control playback.

Every client that requests a reference on a local file replay stream is given its own dedicated instance of that stream. Multiple, independent stream may thus be open from the same file.

The stream is stopped and released as soon as the reference that provides it is closed. All open sinks are closed as a consequence.

Types

Source
Link copied to clipboard
interface Source : Parcelable
Identifies a source for media replay.

Functions

defaultVideoTrackOf
Link copied to clipboard
open fun defaultVideoTrackOf(@NonNull file: File): FileReplay.Source
Creates a source for streaming the default video track from a local file.
duration
Link copied to clipboard
@IntRange(from = 0)
abstract fun duration(): Long
Informs about total playback duration.
openSink
Link copied to clipboard
abstract fun openSink(@NonNull config: Stream.Sink.Config): Stream.Sink
Opens a sink from this stream.
pause
Link copied to clipboard
abstract fun pause(): Boolean
Requests playback to pause.
play
Link copied to clipboard
abstract fun play(): Boolean
Requests playback to start.
playState
Link copied to clipboard
abstract fun playState(): Replay.PlayState
Informs about current playback state.
position
Link copied to clipboard
@IntRange(from = 0)
abstract fun position(): Long
Informs about current playback position.
seekTo
Link copied to clipboard
abstract fun seekTo(@IntRange(from = 0position: Long): Boolean
Requests playback position change.
source
Link copied to clipboard
abstract fun source(): FileReplay.Source
Informs about the configured source for this file replay stream.
state
Link copied to clipboard
abstract fun state(): Stream.State
Informs about current stream state.
stop
Link copied to clipboard
abstract fun stop()
Stops the stream.
videoTrackOf
Link copied to clipboard
open fun videoTrackOf(@NonNull file: File, @NonNull trackName: String): FileReplay.Source
Creates a source for streaming a specific video track from a local file.

Properties

TRACK_THERMAL_UNBLENDED
Link copied to clipboard
val TRACK_THERMAL_UNBLENDED: String
Name for the thermal unblended video track in thermal media files.