VideoProgressUpdate

public final class VideoProgressUpdate extends Object

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 currentTimeMillis, long durationMillis)
Constructs a progress update object.

Public Method Summary

float
float

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 currentTimeMillis, long durationMillis)

Constructs a progress update object. Note that times should be set in milliseconds.

Parameters
currentTimeMillis progress into video being played.
durationMillis total video duration.

Public Methods

public float getCurrentTime ()

Returns
  • Current playback progress within a video in seconds.

public float getDuration ()

Returns
  • Video duration in seconds.

Send feedback about...

IMA DAI SDK for Android
Need help? Visit our support page.