Class TypedSource
-
- All Implemented Interfaces:
public class TypedSourceThe 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 classTypedSource.BuilderThe builder for TypedSource.
-
Field Summary
Fields Modifier and Type Field Description public final Stringsrcpublic final DRMConfigurationdrmpublic final SourceTypetypepublic final Map<String, String>headerspublic final DoubleliveOffsetpublic final SsaiDescriptionssaipublic final StringtimeServerpublic final LatencyConfigurationlatencyConfigurationpublic final HlsPlaybackConfigurationhlspublic final DashPlaybackConfigurationdash
-
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)
-
Method Summary
Modifier and Type Method Description StringgetSrc()The source URL of the manifest or video file to be played. DRMConfigurationgetDrm()The DRMConfiguration which specifies valid DRM parameters for this source. SourceTypegetType()The MIME type of the source. Map<String, String>getHeaders()The headers of the source. DoublegetLiveOffset()The live point from the end of the manifest, in seconds. SsaiDescriptiongetSsai()The configuration of the selected server-side ad insertion integrations. StringgetTimeServer()Returns the URL of the time server. LatencyConfigurationgetLatencyConfiguration()Returns the latency configuration for this source. HlsPlaybackConfigurationgetHls()Returns the configuration for controlling playback of an HLS stream. DashPlaybackConfigurationgetDash()Returns the configuration for controlling playback of an DASH stream. BooleanisHlsDateRange()Returns whether the logic to expose date ranges parsed from HLS manifests is enabled. BooleanisLowLatency()Returns whether the source should be played in the low-latency-mode of the player. static TypedSourcereplaceSource(TypedSource originalSource, String sourceUrl)booleanequals(Object o)inthashCode()-
-
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)
-
-
Method Detail
-
getSrc
@NonNull() String getSrc()
The source URL of the manifest or video file to be played. (NonNull)
-
getDrm
@Nullable() DRMConfiguration getDrm()
The DRMConfiguration which specifies valid DRM parameters for this source.
- Returns:
The DRMConfiguration. (Nullable)
-
getType
@Nullable() SourceType getType()
The MIME type of the source.
- For all possibilities, see SourceType.
Example:
- 'application/dash+xml' for MPEG-DASH sources.
- 'video/mp4' for single MP4 files.
- Returns:
The SourceType. (Nullable)
-
getHeaders
@Nullable() Map<String, String> getHeaders()
The headers of the source.
- Returns:
The headers of the source. (Nullable)
- Since:
v7.12.0
-
getLiveOffset
@Nullable() Double getLiveOffset()
The live point from the end of the manifest, in seconds.
- Will return null if the live point offset is 3 target durations.
- Returns:
The live point from the end of the manifest, in seconds. (Nullable)
-
getSsai
@Nullable() SsaiDescription getSsai()
The configuration of the selected server-side ad insertion integrations.
- Returns:
The SSAI configuration. (Nullable)
-
getTimeServer
@Nullable() String getTimeServer()
Returns 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
-
getLatencyConfiguration
@Nullable() LatencyConfiguration getLatencyConfiguration()
Returns the latency configuration for this source.
- Ignored for VOD playback.
-
getHls
@Nullable() HlsPlaybackConfiguration getHls()
Returns the configuration for controlling playback of an HLS stream.
- Can be null if this property is not set.
- Since:
v4.0.0
-
getDash
@Nullable() DashPlaybackConfiguration getDash()
Returns the configuration for controlling playback of an DASH stream.
- Can be null if this property is not set.
- Since:
v5.2.0
-
isHlsDateRange
@Nullable() Boolean isHlsDateRange()
Returns 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'.
-
isLowLatency
@Nullable() Boolean isLowLatency()
Returns 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
-
replaceSource
static TypedSource replaceSource(TypedSource originalSource, String sourceUrl)
-
hashCode
int hashCode()
-
-
-
-