StandaloneMediaClock
Artifact: androidx.media3:media3-exoplayer
@UnstableApi
class StandaloneMediaClock : MediaClock
A MediaClock whose position advances with real time based on the playback parameters when started.
Summary
Public constructors |
|---|
StandaloneMediaClock(clock: Clock!)Creates a new standalone media clock using the given |
Public functions |
|
|---|---|
Long |
Returns the current media position in microseconds. |
Unit |
resetPosition(positionUs: Long)Resets the clock's position. |
Unit |
start()Starts the clock. |
Unit |
stop()Stops the clock. |
Public properties |
|
|---|---|
PlaybackParameters! |
Inherited functions |
||
|---|---|---|
|
Public constructors
StandaloneMediaClock
StandaloneMediaClock(clock: Clock!)
Creates a new standalone media clock using the given Clock implementation.
Public functions
resetPosition
fun resetPosition(positionUs: Long): Unit
Resets the clock's position.
| Parameters | |
|---|---|
positionUs: Long |
The position to set in microseconds. |