TweaksConfig

data class TweaksConfig(var timeChangedInterval: Double = DEFAULT_TIME_CHANGED_EVENT_INTERVAL, var languagePropertyNormalization: Boolean = true, var localDynamicDashWindowUpdateInterval: Double? = null, var useFiletypeExtractorFallbackForHls: Boolean = false, var useDrmSessionForClearPeriods: Boolean = false, var useDrmSessionForClearSources: Boolean = false, var shouldApplyTtmlRegionWorkaround: Boolean = true, var devicesThatRequireSurfaceWorkaround: List<DeviceDescription> = emptyList(), var enableImageMediaPlaylistThumbnailParsingForLive: Boolean = false, var discardAdsWhileCasting: Boolean = false, var preferSoftwareDecodingForAds: Boolean = false, var preferSoftwareDecoding: Boolean = false, var allowChunklessPreparationForHls: Boolean = false, var allowChunklessPreparationForHlsStreamingAds: Boolean = true, var enableFrameAboutToBeRenderedEvent: Boolean = false, var minForwardBufferLevelForQualityIncrease: Double? = null, var maxForwardBufferLevelForQualityDecrease: Double? = null, var bandwidthFractionAvailableToUse: Float? = null, var enableMainContentDecodingDuringAds: Boolean = true, var enableMainContentVideoCodecInitializationFallback: Boolean = true, var enableMainContentAudioCodecInitializationFallback: Boolean = true, var enableAdContentVideoCodecInitializationFallback: Boolean = true, var enableAdContentAudioCodecInitializationFallback: Boolean = true, var assumeEmsgMetadataForHlsChunklessPreparations: Boolean = false, var forceReuseVideoCodecReasons: Set<ForceReuseVideoCodecReason> = emptySet(), var releasePlayerTimeout: Double? = null, var detachSurfaceTimeout: Double? = null, var disableAudioTracksWhileInBackground: Boolean = false, var disableVideoTracksWhileInBackground: Boolean = false, var loadErrorFallbackConfig: LoadErrorFallbackConfig? = null, var reuseAdsLoaderAcrossImaAds: Boolean = false, val bandwidthMeterType: BandwidthMeterType = BandwidthMeterType.Default()) : Parcelable

This configuration is used as an incubator for experimental features. Tweaks are not officially supported and are not guaranteed to be stable, i.e. their naming, functionality and API can change at any time within the tweaks or when being promoted to an official feature and moved into its final configuration namespace.

Constructors

Link copied to clipboard
constructor(timeChangedInterval: Double = DEFAULT_TIME_CHANGED_EVENT_INTERVAL, languagePropertyNormalization: Boolean = true, localDynamicDashWindowUpdateInterval: Double? = null, useFiletypeExtractorFallbackForHls: Boolean = false, useDrmSessionForClearPeriods: Boolean = false, useDrmSessionForClearSources: Boolean = false, shouldApplyTtmlRegionWorkaround: Boolean = true, devicesThatRequireSurfaceWorkaround: List<DeviceDescription> = emptyList(), enableImageMediaPlaylistThumbnailParsingForLive: Boolean = false, discardAdsWhileCasting: Boolean = false, preferSoftwareDecodingForAds: Boolean = false, preferSoftwareDecoding: Boolean = false, allowChunklessPreparationForHls: Boolean = false, allowChunklessPreparationForHlsStreamingAds: Boolean = true, enableFrameAboutToBeRenderedEvent: Boolean = false, minForwardBufferLevelForQualityIncrease: Double? = null, maxForwardBufferLevelForQualityDecrease: Double? = null, bandwidthFractionAvailableToUse: Float? = null, enableMainContentDecodingDuringAds: Boolean = true, enableMainContentVideoCodecInitializationFallback: Boolean = true, enableMainContentAudioCodecInitializationFallback: Boolean = true, enableAdContentVideoCodecInitializationFallback: Boolean = true, enableAdContentAudioCodecInitializationFallback: Boolean = true, assumeEmsgMetadataForHlsChunklessPreparations: Boolean = false, forceReuseVideoCodecReasons: Set<ForceReuseVideoCodecReason> = emptySet(), releasePlayerTimeout: Double? = null, detachSurfaceTimeout: Double? = null, disableAudioTracksWhileInBackground: Boolean = false, disableVideoTracksWhileInBackground: Boolean = false, loadErrorFallbackConfig: LoadErrorFallbackConfig? = null, reuseAdsLoaderAcrossImaAds: Boolean = false, bandwidthMeterType: BandwidthMeterType = BandwidthMeterType.Default())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Specifies whether the player should try to prepare HLS streams without downloading media segments. This is generally possible if the #EXT-X-STREAM-INF tag contains the CODECS attribute and may speed up startup time.

Specifies whether the player should try to prepare HLS streaming ads without downloading media segments.

When using allowChunklessPreparationForHls the player is unable to determine the timed metadata type present in the HLS stream. By default, the player assumes that the timed metadata is of type ID3. If the timed metadata is known to be of type event message (EMSG), this property can be set to true. If there is no timed metadata in the stream, this property has no effect.

Link copied to clipboard

The fraction of the available bandwidth that the selection should consider available for use. Setting to a value less than 1 is recommended to account for inaccuracies in the bandwidth estimator.

Link copied to clipboard

Specifies the bandwidth meter and configuration the player should use.

Link copied to clipboard

The timeout for detaching a surface from the player. In seconds. If null, the timeout falls back to the default value of 2.0. Please note, this value might change in future releases.

Link copied to clipboard

Some devices have an incorrect implementation of MediaCodec.setOutputSurface. This leads to failure when the surface changes. To prevent failure, the codec will be released and re-instantiated in those scenarios.

Link copied to clipboard

Disables the audio tracks when the app is backgrounded by calling Player.onStop or PlayerView.onStop. Audio tracks are re-enabled when the app is foregrounded by calling Player.onStart or PlayerView.onStart. This is a workaround that can be applied to prevent the player from crashing on devices that are known to not clean up audio resources properly when backgrounding the app.

Link copied to clipboard

Disables the video tracks when the app is backgrounded by calling Player.onStop or PlayerView.onStop. Video tracks are re-enabled when the app is foregrounded by calling Player.onStart or PlayerView.onStart.

Link copied to clipboard

Specifies whether ads are discarded when played over during casting. If disabled (=false) ads are postponed until the cast session is stopped. For IMA VMAP ads, the postponing still might drop single ads, except for the last one held back.

Specifies whether the player should fall back to another (potentially suboptimal) decoder for ad content audio playback, when the preferred decoder initialization fails.

Specifies whether the player should fall back to another (potentially suboptimal) decoder for ad content video playback, when the preferred decoder initialization fails.

Link copied to clipboard

Specifies whether the PlayerEvent.FrameAboutToBeRendered should be emitted or not.

Image Media Playlist thumbnails are not officially supported for live sources as the parsing is not optimised for dynamically updating manifests. If enableImageMediaPlaylistThumbnailParsingForLive is set to true, variant playlists for all EXT-X-IMAGE-STREAM-INF tags are downloaded and parsed anyway.

Specifies whether the player should fall back to another (potentially suboptimal) decoder for main content audio playback, when the preferred decoder initialization fails.

Link copied to clipboard

Specifies whether the active source should be decoded during ads playback.

Specifies whether the player should fall back to another (potentially suboptimal) decoder for main content video playback, when the preferred decoder initialization fails.

Link copied to clipboard
@Transient
var exoPlayerCache: Cache?

A cache instance that is used by the player in read-only mode. Ignored when playing back OfflineSourceConfigs.

Link copied to clipboard

When switching between video formats (eg: adapting between video qualities) the codec might be recreated due to several reasons. This behaviour can cause brief black screens when switching between video qualities as codec recreation can be slow.

Link copied to clipboard

Specifies if the language property on DASH Representations, HLS Renditions and SmoothStreaming QualityLevels is normalized. If enabled, language properties are normalized to IETF BCP 47 language tags. Examples: - "ENG" is normalized to "en" - "en_us" is normalized to "en-us" - "en-US-x-lvariant-POSIX" is normalized to "en-us-posix"

Link copied to clipboard

Specifies the behaviour for determining when the player should fall back to a different resource in case of a load error, given that a fallback resource is available. Even if the fallback config does not match the encountered error, a retry might be still applied.

Link copied to clipboard

The interval in which dynamic DASH windows are updated locally. I.e. The rate by which the playback window is moved forward on the timeline.

Link copied to clipboard

The maximum duration in seconds of buffered data required for the selected track to switch to one of lower quality.

Link copied to clipboard

The minimum duration in seconds of buffered data required for the selected track to switch to one of higher quality.

Link copied to clipboard

Specifies whether the player should prefer software decoding over hardware decoding for playback of the main content. To prefer software decoding for ads playback, see preferSoftwareDecodingForAds

Link copied to clipboard

Specifies whether the player should prefer software decoding over hardware decoding for ad playback. This only affects ads playback, the player will still prefer hardware decoding for the main content.

Link copied to clipboard

The timeout to release the player (triggered by Player.destroy). In seconds. If null, the timeout falls back to the default value of 0.5. Please note, this value might change in future releases.

Link copied to clipboard

Enables reusing the IMA AdsLoader across multiple ads and playback sessions for improved ad startup time performance.

Link copied to clipboard

Specifies whether default positioning values should be assumed when parsing TTML regions in case of unsupported TTML features. Default is true.

Link copied to clipboard

The frequency in seconds the TimeChanged will be fired.

Link copied to clipboard

Specifies whether a DRM session should be used for clear tracks of type video and audio. Using DRM sessions for clear content avoids the recreation of decoders when transitioning between clear and encrypted sections of content. Default is false.

Link copied to clipboard

Specifies whether a DRM session should be used for clear tracks of type video and audio in a clear source that follows after a DRM protected source. In addition, a DRM session will be used for clear periods in a DRM protected source. Using DRM sessions for clear content avoids the recreation of decoders when transitioning between clear and encrypted sections of content. Default is false.

Link copied to clipboard

Specifies if the player should always fall back to an extractor matching the file type, if no matching extractor was found. If the fallback is applied, this will ignore potential incompatibilities with streams and thus can result in unstable or failing playback.