public static class TypedSource.Builder extends Object
Modifier and Type | Field and Description |
---|---|
protected DRMConfiguration |
drm |
protected boolean |
experimentalRendering |
protected Boolean |
hlsDateRange |
protected Double |
liveOffset |
protected Boolean |
lowLatency |
protected boolean |
nativeUiRendering |
protected String |
src |
protected SsaiDescription |
ssai |
protected String |
timeServer |
protected SourceType |
type |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TypedSource |
build()
Builds the TypedSource.
|
TypedSource.Builder |
drm(DRMConfiguration drm)
Sets the DRM configuration.
|
TypedSource.Builder |
hlsDateRange(boolean hlsDateRange)
Sets whether the logic to expose date ranges parsed from HLS manifests is enabled.
|
TypedSource.Builder |
liveOffset(Double liveOffset)
Sets the live point from the end of the manifest, in seconds.
|
TypedSource.Builder |
lowLatency(Boolean lowLatency)
Sets whether the source should be played in the low-latency-mode of the player.
|
TypedSource.Builder |
setExperimentalRenderingEnabled(boolean experimentalRenderingEnabled)
Deprecated.
Superseded by
setNativeRenderingEnabled(boolean) .
Sets whether experimental rendering is enabled. |
TypedSource.Builder |
setNativeRenderingEnabled(boolean nativeRenderingEnabled)
Sets whether native video rendering is enabled.
|
TypedSource.Builder |
setNativeUiRenderingEnabled(boolean nativeUiRenderingEnabled)
Sets whether native ui rendering is enabled.
|
TypedSource.Builder |
src(String src)
Sets the source.
|
TypedSource.Builder |
ssai(SsaiDescription ssai)
Sets the Server-side ad insertion description.
|
TypedSource.Builder |
timeServer(String timeServer)
Sets the URL of a time server used by the player to synchronise the time in DASH sources.
|
TypedSource.Builder |
type(SourceType type)
Sets the type of the source.
|
static TypedSource.Builder |
typedSource()
Creates a builder for a simple TypedSource.
|
static TypedSource.Builder |
typedSource(String src)
Creates a builder for a simple TypedSource object containing the given URL as source.
|
protected String src
protected DRMConfiguration drm
protected SourceType type
protected Double liveOffset
protected boolean experimentalRendering
protected boolean nativeUiRendering
protected SsaiDescription ssai
protected Boolean hlsDateRange
protected String timeServer
protected Boolean lowLatency
public static TypedSource.Builder typedSource()
public static TypedSource.Builder typedSource(String src)
src
- The source URL. (NonNull)public TypedSource.Builder src(String src)
src
- The source URL. (NonNull)public TypedSource.Builder drm(DRMConfiguration drm)
drm
- The DRMConfiguration
. (NonNull)public TypedSource.Builder type(SourceType type)
type
- The SourceType
. (NonNull)
- For all possibilities, see SourceType
.
public TypedSource.Builder liveOffset(Double liveOffset)
liveOffset
- the live point from the end of the manifest, in seconds. (Nullable)- If set as null, the live point offset will be 3 target durations.
@Deprecated public TypedSource.Builder setExperimentalRenderingEnabled(boolean experimentalRenderingEnabled)
setNativeRenderingEnabled(boolean)
.
Sets whether experimental rendering is enabled.experimentalRenderingEnabled
- Whether experimental rendering is enabled.public TypedSource.Builder setNativeRenderingEnabled(boolean nativeRenderingEnabled)
nativeRenderingEnabled
- Whether native video rendering is enabled.- Should only be used in discussion with the THEO support team as it can introduce additional limitations when used incorrectly. - This flag has no impact on battery or rendering efficiency, only on the supported codec set.
public TypedSource.Builder setNativeUiRenderingEnabled(boolean nativeUiRenderingEnabled)
nativeUiRenderingEnabled
- Whether native ui rendering is enabled.- Only has effect ifTHEOplayerConfig.isChromeless()
is true. - Only has effect ifTypedSource.isNativeRenderingEnabled()
is true.
public TypedSource.Builder ssai(SsaiDescription ssai)
ssai
- The Server-side ad insertion description. (NonNull)public TypedSource.Builder hlsDateRange(boolean hlsDateRange)
hlsDateRange
- Whether the logic to expose date ranges parsed from HLS manifests is enabled.
- If not set, TypedSource.isHlsDateRange()
will be null.
public TypedSource.Builder timeServer(String timeServer)
timeServer
- The URL of a time server. (Nullable)- 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 useSourceDescription.Builder.timeServer(String)
.
public TypedSource.Builder lowLatency(Boolean lowLatency)
lowLatency
- Whether the source should be played in the low-latency-mode of the player. (Nullable)- This setting must be `true` when using Low-Latency CMAF with ABR.
public TypedSource build()