HlsMediaPlaylist.Interstitial


public final class HlsMediaPlaylist.Interstitial


An interstitial data range.

See RFC 8216bis, appendix D.2.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation HlsMediaPlaylist.Interstitial.CueTriggerType

The cue trigger type.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation HlsMediaPlaylist.Interstitial.NavigationRestriction

The navigation restriction identifier.

@Retention(value = RetentionPolicy.SOURCE)
@StringDef(value = )
@Documented
@Target(value = TYPE_USE)
public annotation HlsMediaPlaylist.Interstitial.SnapType

The snap identifier.

Constants

static final String

Cue trigger type indicating to trigger the interstitial only once.

static final String

Cue trigger type indicating to trigger the interstitial after playback of the primary asset.

static final String

Cue trigger type indicating to trigger the interstitial before playback of the primary asset.

static final String

Navigation restriction identifier indicating to enforce playback of the interstitial if the user attempts to seek beyond the interstitial start position.

static final String

Navigation restriction identifier indicating to prevent seeking or changing the playback speed during the interstitial being played.

static final String

Snap identifier indicating to locate the segment boundary closest to the scheduled resumption point of the interstitial.

static final String

Snap identifier indicating to locate the segment boundary closest to the startDateUnixUs.

Public fields

final @Nullable Uri

The asset list URI.

final @Nullable Uri

The asset URI.

final ImmutableList<HlsMediaPlaylist.ClientDefinedAttribute>

The attributes defined by a client.

final List<@HlsMediaPlaylist.Interstitial.CueTriggerType String>

The trigger cue types.

final long

The optional duration, in microseconds.

final long

The optional end time, in microseconds.

final boolean

Whether the endDateUnixUs of the interstitial is equal to the start startTimeUs of the following interstitial.

final String

The required ID.

final long

The optional planned duration, in microseconds.

final long

The playout limit indicating the limit of the playback time of the interstitial.

final ImmutableList<@HlsMediaPlaylist.Interstitial.NavigationRestriction String>

The navigation restrictions.

final long

The offset from startTimeUs indicating where in the primary asset to resume playback after completing playback of the interstitial.

final ImmutableList<@HlsMediaPlaylist.Interstitial.SnapType String>

The snap types.

final long

The required start time, in microseconds.

Public constructors

Interstitial(
    String id,
    @Nullable Uri assetUri,
    @Nullable Uri assetListUri,
    long startDateUnixUs,
    long endDateUnixUs,
    long durationUs,
    long plannedDurationUs,
    List<@HlsMediaPlaylist.Interstitial.CueTriggerType String> cue,
    boolean endOnNext,
    long resumeOffsetUs,
    long playoutLimitUs,
    List<@HlsMediaPlaylist.Interstitial.SnapType String> snapTypes,
    List<@HlsMediaPlaylist.Interstitial.NavigationRestriction String> restrictions,
    List<HlsMediaPlaylist.ClientDefinedAttribute> clientDefinedAttributes
)

Creates an instance.

Public methods

boolean
int

Constants

CUE_TRIGGER_ONCE

public static final String CUE_TRIGGER_ONCE = "ONCE"

Cue trigger type indicating to trigger the interstitial only once.

CUE_TRIGGER_POST

public static final String CUE_TRIGGER_POST = "POST"

Cue trigger type indicating to trigger the interstitial after playback of the primary asset.

CUE_TRIGGER_PRE

public static final String CUE_TRIGGER_PRE = "PRE"

Cue trigger type indicating to trigger the interstitial before playback of the primary asset.

public static final String NAVIGATION_RESTRICTION_JUMP = "JUMP"

Navigation restriction identifier indicating to enforce playback of the interstitial if the user attempts to seek beyond the interstitial start position.

public static final String NAVIGATION_RESTRICTION_SKIP = "SKIP"

Navigation restriction identifier indicating to prevent seeking or changing the playback speed during the interstitial being played.

SNAP_TYPE_IN

public static final String SNAP_TYPE_IN = "IN"

Snap identifier indicating to locate the segment boundary closest to the scheduled resumption point of the interstitial.

SNAP_TYPE_OUT

public static final String SNAP_TYPE_OUT = "OUT"

Snap identifier indicating to locate the segment boundary closest to the startDateUnixUs.

Public fields

assetListUri

public final @Nullable Uri assetListUri

The asset list URI. Required if assetUri is null.

assetUri

public final @Nullable Uri assetUri

The asset URI. Required if assetListUri is null.

clientDefinedAttributes

public final ImmutableList<HlsMediaPlaylist.ClientDefinedAttributeclientDefinedAttributes

The attributes defined by a client. For informational purpose only.

cue

public final List<@HlsMediaPlaylist.Interstitial.CueTriggerType Stringcue

The trigger cue types.

durationUs

public final long durationUs

The optional duration, in microseconds. TIME_UNSET if not present.

endDateUnixUs

public final long endDateUnixUs

The optional end time, in microseconds. TIME_UNSET if not present.

endOnNext

public final boolean endOnNext

Whether the endDateUnixUs of the interstitial is equal to the start startTimeUs of the following interstitial. false if not present.

id

public final String id

The required ID.

plannedDurationUs

public final long plannedDurationUs

The optional planned duration, in microseconds. TIME_UNSET if not present.

playoutLimitUs

public final long playoutLimitUs

The playout limit indicating the limit of the playback time of the interstitial.

restrictions

public final ImmutableList<@HlsMediaPlaylist.Interstitial.NavigationRestriction Stringrestrictions

The navigation restrictions.

resumeOffsetUs

public final long resumeOffsetUs

The offset from startTimeUs indicating where in the primary asset to resume playback after completing playback of the interstitial. TIME_UNSET if not present. If not present, the value is considered to be the duration of the interstitial.

snapTypes

public final ImmutableList<@HlsMediaPlaylist.Interstitial.SnapType StringsnapTypes

The snap types.

startDateUnixUs

public final long startDateUnixUs

The required start time, in microseconds.

Public constructors

Interstitial

public Interstitial(
    String id,
    @Nullable Uri assetUri,
    @Nullable Uri assetListUri,
    long startDateUnixUs,
    long endDateUnixUs,
    long durationUs,
    long plannedDurationUs,
    List<@HlsMediaPlaylist.Interstitial.CueTriggerType String> cue,
    boolean endOnNext,
    long resumeOffsetUs,
    long playoutLimitUs,
    List<@HlsMediaPlaylist.Interstitial.SnapType String> snapTypes,
    List<@HlsMediaPlaylist.Interstitial.NavigationRestriction String> restrictions,
    List<HlsMediaPlaylist.ClientDefinedAttribute> clientDefinedAttributes
)

Creates an instance.

Public methods

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()