Class HlsInterstitial
java.lang.Object
com.castlabs.android.player.models.hls.HlsInterstitial
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 ClassesModifier and TypeClassDescriptionstatic final classRepresents a media asset contained in an interstitial. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal UriOptional URI pointing to a playlist of assets making up this interstitial.final UriOptional URI pointing to a single media asset for this interstitial.final StringThe cue identifier describing when this interstitial should play.final intThe duration of the interstitial in milliseconds, or-1if unknown.final StringThe unique identifier for this interstitial.final longThe offset in microseconds where playback should resume after the interstitialfinal longThe start offset of the interstitial relative to the start of the playlist in microseconds -
Constructor Summary
ConstructorsConstructorDescriptionHlsInterstitial(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
-
Field Details
-
assetListUrl
Optional URI pointing to a playlist of assets making up this interstitial. -
assetUrl
Optional URI pointing to a single media asset for this interstitial. -
id
The unique identifier for this interstitial. -
cue
The cue identifier describing when this interstitial should play. -
duration
public final int durationThe duration of the interstitial in milliseconds, or-1if unknown. -
resumeOffsetUs
public final long resumeOffsetUsThe offset in microseconds where playback should resume after the interstitial -
startOffsetUs
public final long startOffsetUsThe 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 examplePRE,POST,ONCE).duration- The duration in milliseconds, or-1if unspecified.resumeOffsetUs- Resume offset measured in microseconds, orC.TIME_UNSET.startOffsetUs- Start offset relative to the playlist start in microseconds.
-