Back to Exoplayer

StandaloneMediaClock (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/util/StandaloneMediaClock.html

latest4.4 KB
Original Source

Package com.google.android.exoplayer2.util

Class StandaloneMediaClock

  • java.lang.Object

    • com.google.android.exoplayer2.util.StandaloneMediaClock
  • All Implemented Interfaces:MediaClock


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classStandaloneMediaClockextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[MediaClock](MediaClock.html "interface in com.google.android.exoplayer2.util")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

A MediaClock whose position advances with real time based on the playback parameters when started.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | StandaloneMediaClock​(Clock clock) | Deprecated.

Creates a new standalone media clock using the given Clock implementation. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | PlaybackParameters | getPlaybackParameters() | Deprecated.

Returns the active playback parameters. | | long | getPositionUs() | Deprecated.

Returns the current media position in microseconds. | | void | resetPosition​(long positionUs) | Deprecated.

Resets the clock's position. | | void | setPlaybackParameters​(PlaybackParameters playbackParameters) | Deprecated.

Attempts to set the playback parameters. | | void | start() | Deprecated.

Starts the clock. | | void | stop() | Deprecated.

Stops the clock. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

StandaloneMediaClock

public StandaloneMediaClock​([Clock](Clock.html "interface in com.google.android.exoplayer2.util")clock)

Deprecated.

Creates a new standalone media clock using the given Clock implementation. Parameters:clock - A Clock.

Method Detail

- 

start

public void start()

Deprecated.

Starts the clock. Does nothing if the clock is already started.

- 

stop

public void stop()

Deprecated.

Stops the clock. Does nothing if the clock is already stopped.

- 

resetPosition

public void resetPosition​(long positionUs)

Deprecated.

Resets the clock's position. Parameters:positionUs - The position to set in microseconds.

- 

getPositionUs

public long getPositionUs()

Deprecated.

Description copied from interface: MediaClock

Returns the current media position in microseconds. Specified by:getPositionUs in interface MediaClock

- 

setPlaybackParameters

public void setPlaybackParameters​([PlaybackParameters](../PlaybackParameters.html "class in com.google.android.exoplayer2")playbackParameters)

Deprecated.

Description copied from interface: MediaClock

Attempts to set the playback parameters. The media clock may override the speed if changing the playback parameters is not supported. Specified by:setPlaybackParameters in interface MediaClockParameters:playbackParameters - The playback parameters to attempt to set.

- 

getPlaybackParameters

public[PlaybackParameters](../PlaybackParameters.html "class in com.google.android.exoplayer2")getPlaybackParameters()

Deprecated.

Description copied from interface: MediaClock

Returns the active playback parameters. Specified by:getPlaybackParameters in interface MediaClock