Class TypedSource
-
- All Implemented Interfaces:
public class TypedSource
The Typed Source API.
This represents a media resource characterized by a URL to the resource and optionally information about the resource.
This optional information can be DRM parameters for that specific source.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
TypedSource.Builder
The builder for TypedSource.
-
Field Summary
Fields Modifier and Type Field Description private final Boolean
isHlsDateRange
private final Boolean
isLowLatency
private final String
src
private final DRMConfiguration
drm
private final SourceType
type
private final Map<String, String>
headers
private final Double
liveOffset
private final SsaiDescription
ssai
private final Boolean
hlsDateRange
private final String
timeServer
private final Boolean
lowLatency
private final LatencyConfiguration
latencyConfiguration
private final HlsPlaybackConfiguration
hls
private final DashPlaybackConfiguration
dash
private final CMCDTransmissionMode
cmcdTransmissionMode
private final PlaybackPipeline
playbackPipeline
-
Constructor Summary
Constructors Constructor Description TypedSource(String src, DRMConfiguration drm, SourceType type, Map<String, String> headers, Double liveOffset, SsaiDescription ssai, Boolean hlsDateRange, String timeServer, Boolean lowLatency, LatencyConfiguration latencyConfiguration, HlsPlaybackConfiguration hls, DashPlaybackConfiguration dash, CMCDTransmissionMode cmcdTransmissionMode, PlaybackPipeline playbackPipeline)
-
Method Summary
Modifier and Type Method Description final Boolean
getIsHlsDateRange()
final Boolean
getIsLowLatency()
final String
getSrc()
The source URL of the manifest or video file to be played. final DRMConfiguration
getDrm()
The DRMConfiguration which specifies valid DRM parameters for this source. SourceType
getType()
The MIME type of the source. final Map<String, String>
getHeaders()
The headers of the source. final Double
getLiveOffset()
The live point from the end of the manifest, in seconds. SsaiDescription
getSsai()
The configuration of the selected server-side ad insertion integrations. final Boolean
isHlsDateRange()
Whether the logic to expose date ranges parsed from HLS manifests is enabled. final String
getTimeServer()
The URL of the time server. final Boolean
isLowLatency()
Whether the source should be played in the low-latency-mode of the player. final LatencyConfiguration
getLatencyConfiguration()
The latency configuration for this source. final HlsPlaybackConfiguration
getHls()
The configuration for controlling playback of an HLS stream. final DashPlaybackConfiguration
getDash()
The configuration for controlling playback of an DASH stream. final CMCDTransmissionMode
getCmcdTransmissionMode()
The transmission mode to be used for Common Media Client Data (CTA-5004). final PlaybackPipeline
getPlaybackPipeline()
The playback pipeline to use for this stream. Boolean
equals(Object other)
Integer
hashCode()
TypedSource
copy(String src, DRMConfiguration drm, SourceType type, Map<String, String> headers, Double liveOffset, SsaiDescription ssai, Boolean hlsDateRange, String timeServer, Boolean lowLatency, LatencyConfiguration latencyConfiguration, HlsPlaybackConfiguration hls, DashPlaybackConfiguration dash, CMCDTransmissionMode cmcdTransmissionMode, PlaybackPipeline playbackPipeline)
Creates a new TypedSource with the same properties as this source, optionally replacing specific properties with the given values. -
-
Constructor Detail
-
TypedSource
TypedSource(String src, DRMConfiguration drm, SourceType type, Map<String, String> headers, Double liveOffset, SsaiDescription ssai, Boolean hlsDateRange, String timeServer, Boolean lowLatency, LatencyConfiguration latencyConfiguration, HlsPlaybackConfiguration hls, DashPlaybackConfiguration dash, CMCDTransmissionMode cmcdTransmissionMode, PlaybackPipeline playbackPipeline)
-
-
Method Detail
-
getIsHlsDateRange
final Boolean getIsHlsDateRange()
-
getIsLowLatency
final Boolean getIsLowLatency()
-
getDrm
final DRMConfiguration getDrm()
The DRMConfiguration which specifies valid DRM parameters for this source. (Nullable)
-
getType
SourceType getType()
The MIME type of the source. (Nullable)
For all possibilities, see SourceType.
Example:
'application/dash+xml' for MPEG-DASH sources.
'video/mp4' for single MP4 files.
-
getHeaders
final Map<String, String> getHeaders()
The headers of the source.
- Returns:
The headers of the source. (Nullable)
- Since:
v7.12.0
-
getLiveOffset
final Double getLiveOffset()
The live point from the end of the manifest, in seconds. (Nullable)
Will return null if the live point offset is 3 target durations.
-
getSsai
SsaiDescription getSsai()
The configuration of the selected server-side ad insertion integrations. (Nullable)
-
isHlsDateRange
final Boolean isHlsDateRange()
Whether the logic to expose date ranges parsed from HLS manifests is enabled. (Nullable)
Can be null if this property is not set.
If not set, the internal behaviour is similar to 'false'.
-
getTimeServer
final String getTimeServer()
The URL of the time server. (Nullable)
The time server should return time in ISO-8601 format.
Only applies to the current source.
- Since:
v2.72.0
-
isLowLatency
final Boolean isLowLatency()
Whether the source should be played in the low-latency-mode of the player. (Nullable)
Can be null if this property is not set.
Only applicable to live content.
- Since:
v2.72.0
-
getLatencyConfiguration
final LatencyConfiguration getLatencyConfiguration()
The latency configuration for this source.
Ignored for VOD playback.
-
getHls
final HlsPlaybackConfiguration getHls()
The configuration for controlling playback of an HLS stream.
Can be null if this property is not set.
- Since:
v4.0.0
-
getDash
final DashPlaybackConfiguration getDash()
The configuration for controlling playback of an DASH stream.
Can be null if this property is not set.
- Since:
v5.2.0
-
getCmcdTransmissionMode
final CMCDTransmissionMode getCmcdTransmissionMode()
The transmission mode to be used for Common Media Client Data (CTA-5004).
Only supported with the Media3 integration.
- Since:
v8.13.0
-
getPlaybackPipeline
final PlaybackPipeline getPlaybackPipeline()
The playback pipeline to use for this stream.
PlaybackPipeline.MEDIA3: Use Jetpack Media3 to play this stream. Requires the Media3 integration.
PlaybackPipeline.LEGACY: Use the legacy pipeline to play this stream. (Deprecated)
Default:
null
, which lets the player decide which pipeline to use. In THEOplayer 8.x, this will use PlaybackPipeline.LEGACY. Starting with THEOplayer 9.0, this will use PlaybackPipeline.MEDIA3.
- Since:
v8.13.0
-
copy
TypedSource copy(String src, DRMConfiguration drm, SourceType type, Map<String, String> headers, Double liveOffset, SsaiDescription ssai, Boolean hlsDateRange, String timeServer, Boolean lowLatency, LatencyConfiguration latencyConfiguration, HlsPlaybackConfiguration hls, DashPlaybackConfiguration dash, CMCDTransmissionMode cmcdTransmissionMode, PlaybackPipeline playbackPipeline)
Creates a new TypedSource with the same properties as this source, optionally replacing specific properties with the given values.
-
-
-
-