Class TypedSource.Builder
-
- All Implemented Interfaces:
public class TypedSource.Builder
The builder for TypedSource.
-
-
Field Summary
Fields Modifier and Type Field Description protected DRMConfiguration
drm
protected SourceType
type
protected Map<String, String>
headers
protected Double
liveOffset
protected SsaiDescription
ssai
protected Boolean
hlsDateRange
protected String
timeServer
protected Boolean
lowLatency
protected LatencyConfiguration
latencyConfiguration
protected HlsPlaybackConfiguration
hls
protected DashPlaybackConfiguration
dash
protected CMCDTransmissionMode
cmcdTransmissionMode
protected PlaybackPipeline
playbackPipeline
protected String
src
-
Constructor Summary
Constructors Constructor Description TypedSource.Builder(String src)
Creates a builder for a simple TypedSource object containing the given URL as source.
-
Method Summary
Modifier and Type Method Description final TypedSource.Builder
drm(DRMConfiguration drm)
Sets the DRM configuration. final TypedSource.Builder
type(SourceType type)
Sets the type of the source. final TypedSource.Builder
headers(Map<String, String> headers)
Sets the headers to be added to all requests associated with this source. final TypedSource.Builder
liveOffset(Double liveOffset)
Sets the live point from the end of the manifest, in seconds. TypedSource.Builder
ssai(SsaiDescription ssai)
Sets the Server-side ad insertion description. final TypedSource.Builder
hlsDateRange(Boolean hlsDateRange)
Sets whether the logic to expose date ranges parsed from HLS manifests is enabled. final TypedSource.Builder
timeServer(String timeServer)
Sets the URL of a time server used by the player to synchronise the time in DASH sources. final TypedSource.Builder
lowLatency(Boolean lowLatency)
Sets whether the source should be played in the low-latency-mode of the player. final TypedSource.Builder
latencyConfiguration(LatencyConfiguration latencyConfiguration)
Sets the latency configuration for this source. final TypedSource.Builder
hls(HlsPlaybackConfiguration hlsPlaybackConfiguration)
Sets the configuration for controlling playback of an HLS stream. final TypedSource.Builder
dash(DashPlaybackConfiguration dashPlaybackConfiguration)
Sets the configuration for controlling playback of an DASH stream. final TypedSource.Builder
cmcdTransmissionMode(CMCDTransmissionMode cmcdTransmissionMode)
Sets the transmission mode to be used for Common Media Client Data (CTA-5004). final TypedSource.Builder
playbackPipeline(PlaybackPipeline playbackPipeline)
Sets the playback pipeline to use for this stream. TypedSource
build()
Builds the TypedSource. -
-
Constructor Detail
-
TypedSource.Builder
TypedSource.Builder(String src)
Creates a builder for a simple TypedSource object containing the given URL as source.- Parameters:
src
- The source URL of the manifest or video file to be played.
-
-
Method Detail
-
drm
final TypedSource.Builder drm(DRMConfiguration drm)
Sets the DRM configuration.
- Parameters:
drm
- The DRMConfiguration.
-
type
final TypedSource.Builder type(SourceType type)
Sets the type of the source.
For all possibilities, see SourceType.
- Parameters:
type
- The SourceType.
-
headers
final TypedSource.Builder headers(Map<String, String> headers)
Sets the headers to be added to all requests associated with this source.
Only supported for MP3 & MP4 sources.
- Parameters:
headers
- The headers of this source.- Since:
v7.12.0
-
liveOffset
final TypedSource.Builder liveOffset(Double liveOffset)
Sets the live point from the end of the manifest, in seconds.
If set as null, the live point offset will be 3 target durations.
- Parameters:
liveOffset
- the live point from the end of the manifest, in seconds.
-
ssai
TypedSource.Builder ssai(SsaiDescription ssai)
Sets the Server-side ad insertion description.
- Parameters:
ssai
- The Server-side ad insertion description.
-
hlsDateRange
final TypedSource.Builder hlsDateRange(Boolean hlsDateRange)
Sets whether the logic to expose date ranges parsed from HLS manifests is enabled.
If not set, TypedSource.hlsDateRange will be null.
- Parameters:
hlsDateRange
- Whether the logic to expose date ranges parsed from HLS manifests is enabled.
-
timeServer
final TypedSource.Builder timeServer(String timeServer)
Sets the URL of a time server used by the player to synchronise the time in DASH sources.
The time server should return time in ISO-8601 format.
Overrides the time server provided the DASH manifest's
<UTCTiming>
.Only this source will use the time server. Alternatively, for all sources use SourceDescription.Builder.timeServer.
- Parameters:
timeServer
- The URL of a time server.- Since:
v2.72.0
-
lowLatency
final TypedSource.Builder lowLatency(Boolean lowLatency)
Sets whether the source should be played in the low-latency-mode of the player.
This setting must be
true
when using Low-Latency CMAF with ABR.
Default: false
- Parameters:
lowLatency
- Whether the source should be played in the low-latency-mode of the player.- Since:
v2.72.0
-
latencyConfiguration
final TypedSource.Builder latencyConfiguration(LatencyConfiguration latencyConfiguration)
Sets the latency configuration for this source.
Ignored for VOD playback.
- Parameters:
latencyConfiguration
- The source's latency configuration.
-
hls
final TypedSource.Builder hls(HlsPlaybackConfiguration hlsPlaybackConfiguration)
Sets the configuration for controlling playback of an HLS stream.
- Parameters:
hlsPlaybackConfiguration
- The HLS playback configuration.- Since:
v4.0.0
-
dash
final TypedSource.Builder dash(DashPlaybackConfiguration dashPlaybackConfiguration)
Sets the configuration for controlling playback of an DASH stream.
- Parameters:
dashPlaybackConfiguration
- The DASH playback configuration.- Since:
v5.2.0
-
cmcdTransmissionMode
final TypedSource.Builder cmcdTransmissionMode(CMCDTransmissionMode cmcdTransmissionMode)
Sets the transmission mode to be used for Common Media Client Data (CTA-5004).
Default: CMCDTransmissionMode.DISABLED, i.e. transmitting Common Media Client Data (CMCD) is disabled.
- Parameters:
cmcdTransmissionMode
- The transmission mode to be used for Common Media Client Data (CTA-5004).- Since:
v8.13.0
-
playbackPipeline
final TypedSource.Builder playbackPipeline(PlaybackPipeline playbackPipeline)
Sets the playback pipeline to use for this stream.
- Parameters:
playbackPipeline
- The playback pipeline.- Since:
v8.13.0
-
build
TypedSource build()
Builds the TypedSource.
-
-
-
-