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.
Field Summary
public static final VideoProgressUpdate | VIDEO_TIME_NOT_READY | Value to use for cases when progress is not yet defined, such as video initialization. |
Public Constructor Summary
VideoProgressUpdate(long currentTimeMs, long durationMs)
Constructs a progress update object.
|
Public Method Summary
boolean |
equals(Object obj)
|
float |
getCurrentTime()
This method is deprecated.
Use
getCurrentTimeMs as a replacement.
|
long |
getCurrentTimeMs()
Returns the current time in milliseconds.
|
float |
getDuration()
This method is deprecated.
Use
getDurationMs as a replacement.
|
long |
getDurationMs()
Returns the duration in milliseconds.
|
int |
hashCode()
|
Inherited Method Summary
Fields
public static final VideoProgressUpdate VIDEO_TIME_NOT_READY
Value to use for cases when progress is not yet defined, such as video initialization.
Public Constructors
public VideoProgressUpdate (long currentTimeMs, long durationMs)
Constructs a progress update object.
Parameters
currentTimeMs | progress into video being played in milliseconds. |
---|---|
durationMs | total video duration in milliseconds. |
Public Methods
public boolean equals (Object obj)
Parameters
obj |
---|
public float getCurrentTime ()
This method is deprecated.
Use getCurrentTimeMs
as a replacement.
Returns the current playback progress within a video in seconds.
public long getCurrentTimeMs ()
Returns the current time in milliseconds.
public float getDuration ()
This method is deprecated.
Use getDurationMs
as a replacement.
Returns the video duration in seconds.
public long getDurationMs ()
Returns the duration in milliseconds.