Class StandaloneMediaClock
- java.lang.Object
-
- com.google.android.exoplayer2.util.StandaloneMediaClock
-
- All Implemented Interfaces:
MediaClock
@Deprecated public final class StandaloneMediaClock extends Object implements MediaClock
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.AMediaClockwhose 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 givenClockimplementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PlaybackParametersgetPlaybackParameters()Deprecated.Returns the active playback parameters.longgetPositionUs()Deprecated.Returns the current media position in microseconds.voidresetPosition(long positionUs)Deprecated.Resets the clock's position.voidsetPlaybackParameters(PlaybackParameters playbackParameters)Deprecated.Attempts to set the playback parameters.voidstart()Deprecated.Starts the clock.voidstop()Deprecated.Stops the 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:MediaClockReturns the current media position in microseconds.- Specified by:
getPositionUsin interfaceMediaClock
-
setPlaybackParameters
public void setPlaybackParameters(PlaybackParameters playbackParameters)
Deprecated.Description copied from interface:MediaClockAttempts to set the playback parameters. The media clock may override the speed if changing the playback parameters is not supported.- Specified by:
setPlaybackParametersin interfaceMediaClock- Parameters:
playbackParameters- The playback parameters to attempt to set.
-
getPlaybackParameters
public PlaybackParameters getPlaybackParameters()
Deprecated.Description copied from interface:MediaClockReturns the active playback parameters.- Specified by:
getPlaybackParametersin interfaceMediaClock
-
-