Package com.castlabs.android.player.models.hls

# Class HlsInterstitial

java.lang.Object
com.castlabs.android.player.models.hls.HlsInterstitial

public final class HlsInterstitial extends Object
Represents an HLS interstitial content that can be inserted into the main content stream. This class contains information about the interstitial content including its associated assets, duration and timing information.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `HlsInterstitial.Asset`
  Represents a media asset contained in an interstitial.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final Uri`
  `assetListUrl`
  Optional URI pointing to a playlist of assets making up this interstitial.
  `final Uri`
  `assetUrl`
  Optional URI pointing to a single media asset for this interstitial.
  `final String`
  `cue`
  The cue identifier describing when this interstitial should play.
  `final int`
  `duration`
  The duration of the interstitial in milliseconds, or `-1` if unknown.
  `final String`
  `id`
  The unique identifier for this interstitial.
  `final long`
  `resumeOffsetUs`
  The offset in microseconds where playback should resume after the interstitial
  `final long`
  `startOffsetUs`
  The start offset of the interstitial relative to the start of the playlist in microseconds

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `HlsInterstitial(Uri assetListUrl, Uri assetUrl, String id, String cue, int duration, long resumeOffsetUs, long startOffsetUs)`
  Creates a new HLS interstitial with the specified parameters.

- ## Method Summary

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### assetListUrl

    @Nullable public final Uri assetListUrl
    Optional URI pointing to a playlist of assets making up this interstitial.

  - ### assetUrl

    @Nullable public final Uri assetUrl
    Optional URI pointing to a single media asset for this interstitial.

  - ### id

    @NonNull public final String id
    The unique identifier for this interstitial.

  - ### cue

    @Nullable public final String cue
    The cue identifier describing when this interstitial should play.

  - ### duration

    public final int duration
    The duration of the interstitial in milliseconds, or `-1` if unknown.

  - ### resumeOffsetUs

    public final long resumeOffsetUs
    The offset in microseconds where playback should resume after the interstitial

  - ### startOffsetUs

    public final long startOffsetUs
    The start offset of the interstitial relative to the start of the playlist in microseconds

- ## Constructor Details

  - ### HlsInterstitial

    public HlsInterstitial(@Nullable Uri assetListUrl, @Nullable Uri assetUrl, @NonNull String id, @Nullable String cue, int duration, long resumeOffsetUs, long startOffsetUs)
    Creates a new HLS interstitial with the specified parameters.
    Parameters:
      `assetListUrl` - Optional URI to a list of assets describing this interstitial.
      `assetUrl` - Optional URI to a single asset for immediate playback.
      `id` - The unique identifier for this interstitial.
      `cue` - Optional cue value (for example `PRE`, `POST`, `ONCE`).
      `duration` - The duration in milliseconds, or `-1` if unspecified.
      `resumeOffsetUs` - Resume offset measured in microseconds, or `C.TIME_UNSET`.
      `startOffsetUs` - Start offset relative to the playlist start in microseconds.