Class TimeOffset

com.yandex.mobile.ads.video.models.vmap

java.lang.Object ⇽ TimeOffset

public class TimeOffset

This class contains information about the time for displaying an ad break.

The timeOffset parameter value can be set in different ways:
  • Time in hh:mm:ss or hh:mm:ss.mmm format, where .mmm is the number of milliseconds. The parameter value specifies the offset from the start of the video timeline to the start of the ad break.

  • The percentage in the n% format, where n is the percentage of the timeline of the video that will be played before the start of the ad break.

  • Start/end — Specifies that the ad break should be played before or after the video.

  • Position — Specifies when to play the ad break if the time for playing the ad break is unknown, such as during live streaming. The order of each ad break is set in the #n format, where n is an integer (starting from 1). 1 means that the ad break should be played at the first opportunity, 2 — at the second opportunity, and so on.

Constructors

TimeOffset(@NonNull final Parcel in)

Methods

int describeContents()
String getRawValue()

Returns the timeOffset parameter's raw value (received from the server).

void writeToParcel(@NonNull final Parcel dest, final int flags)

Fields

final Parcelable.Creator< TimeOffset > CREATOR

Constructor Detail

TimeOffset

protected TimeOffset (@NonNull final Parcel in)

Method Detail

describeContents

public int describeContents ()

getRawValue

public String getRawValue ()

Returns the timeOffset parameter's raw value (received from the server).

This parameter specifies when the ad break (AdBreak object) should be displayed.

Returns:

The timeOffset parameter's raw value.

writeToParcel

public void writeToParcel (@NonNull final Parcel dest, final int flags)

Field Detail

CREATOR

public static CREATOR = new Parcelable.Creator<TimeOffset>() { @Override public TimeOffset createFromParcel(@NonNull final Parcel source) { return new TimeOffset(source); } @Override public TimeOffset[] newArray(final int size) { return new TimeOffset[size]; } }