VideoProgressUpdate

public final class VideoProgressUpdate


Defines an update to the video's progress. For the cases where progress is requested but not yet available, VideoProgressUpdate#VIDEO_TIME_NOT_READY should be returned.

Summary

Constants

static final VideoProgressUpdate

Value to use for cases when progress is not yet defined, such as video initialization.

Public fields

final long
final long

Public constructors

VideoProgressUpdate(long currentTimeMs, long durationMs)

Constructs a progress update object.

Public methods

boolean
long

Returns the current time in milliseconds.

long

Returns the duration in milliseconds.

int

Constants

VIDEO_TIME_NOT_READY

public static final VideoProgressUpdate VIDEO_TIME_NOT_READY

Value to use for cases when progress is not yet defined, such as video initialization.

Public fields

currentTimeMs

public final long currentTimeMs

durationMs

public final long durationMs

Public constructors

VideoProgressUpdate

public VideoProgressUpdate(long currentTimeMs, long durationMs)

Constructs a progress update object.

Parameters
long currentTimeMs

progress into video being played in milliseconds.

long durationMs

total video duration in milliseconds.

Public methods

equals

public boolean equals(@Nullable Object obj)

getCurrentTimeMs

public long getCurrentTimeMs()

Returns the current time in milliseconds.

getDurationMs

public long getDurationMs()

Returns the duration in milliseconds.

hashCode

public int hashCode()