-
- All Implemented Interfaces:
public class TypedSource.Builder
The builder for TypedSource.
-
-
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 TypedSource.Builder
drm(@NonNull() DRMConfiguration drm)
Sets the DRM configuration. TypedSource.Builder
type(@NonNull() SourceType type)
Sets the type of the source. TypedSource.Builder
liveOffset(@Nullable() Double liveOffset)
Sets the live point from the end of the manifest, in seconds. 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
ssai(@NonNull() SsaiDescription ssai)
Sets the Server-side ad insertion description. TypedSource.Builder
hlsDateRange(boolean hlsDateRange)
Sets whether the logic to expose date ranges parsed from HLS manifests is enabled. TypedSource.Builder
timeServer(@Nullable() String timeServer)
Sets the URL of a time server used by the player to synchronise the time in DASH sources. TypedSource.Builder
lowLatency(@Nullable() Boolean lowLatency)
Sets whether the source should be played in the low-latency-mode of the player. TypedSource.Builder
hls(@Nullable() HlsPlaybackConfiguration hlsPlaybackConfiguration)
Sets the configuration for controlling playback of an HLS stream. TypedSource.Builder
dash(@Nullable() DashPlaybackConfiguration dashPlaybackConfiguration)
Sets the configuration for controlling playback of an DASH 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.
-
-
Method Detail
-
drm
@NonNull() TypedSource.Builder drm(@NonNull() DRMConfiguration drm)
Sets the DRM configuration.
- Parameters:
drm
- The DRMConfiguration.
-
type
@NonNull() TypedSource.Builder type(@NonNull() SourceType type)
Sets the type of the source.
- For all possibilities, see SourceType.
- Parameters:
type
- The SourceType.
-
liveOffset
@NonNull() TypedSource.Builder liveOffset(@Nullable() 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.
-
setNativeRenderingEnabled
@NonNull() TypedSource.Builder setNativeRenderingEnabled(boolean nativeRenderingEnabled)
Sets 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.
Default: false
- Parameters:
nativeRenderingEnabled
- Whether native video rendering is enabled.
-
setNativeUiRenderingEnabled
@NonNull() TypedSource.Builder setNativeUiRenderingEnabled(boolean nativeUiRenderingEnabled)
Sets whether native ui rendering is enabled.
- Only has effect if isChromeless is true.
- Only has effect if isNativeRenderingEnabled is true.
Default: true
- Parameters:
nativeUiRenderingEnabled
- Whether native ui rendering is enabled.
-
ssai
@NonNull() TypedSource.Builder ssai(@NonNull() SsaiDescription ssai)
Sets the Server-side ad insertion description.
- Parameters:
ssai
- The Server-side ad insertion description.
-
hlsDateRange
@NonNull() TypedSource.Builder hlsDateRange(boolean hlsDateRange)
Sets whether the logic to expose date ranges parsed from HLS manifests is enabled.
- If not set, isHlsDateRange will be null.
- Parameters:
hlsDateRange
- Whether the logic to expose date ranges parsed from HLS manifests is enabled.
-
timeServer
@NonNull() TypedSource.Builder timeServer(@Nullable() 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 timeServer.
- Parameters:
timeServer
- The URL of a time server.
-
lowLatency
@NonNull() TypedSource.Builder lowLatency(@Nullable() 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.
-
hls
@NonNull() TypedSource.Builder hls(@Nullable() HlsPlaybackConfiguration hlsPlaybackConfiguration)
Sets the configuration for controlling playback of an HLS stream.
- Parameters:
hlsPlaybackConfiguration
- The HLS playback configuration.
-
dash
@NonNull() TypedSource.Builder dash(@Nullable() DashPlaybackConfiguration dashPlaybackConfiguration)
Sets the configuration for controlling playback of an DASH stream.
- Parameters:
dashPlaybackConfiguration
- The DASH playback configuration.
-
build
@NonNull() TypedSource build()
Builds the TypedSource.
-
-
-
-