TweaksConfig
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
Properties
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.
Constantly aggregated and weighted bandwidth samples are summed up to this weight limit to calculate an bandwidth estimation. Remaining samples (i.e. that would lead to exceeding the limit) are dropped from memory as they are not relevant anymore.
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.
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.
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.
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.
Specifies whether ExoPlayer debug logs shall be printed to the logcat console for debugging purposes.
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.
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.
A cache instance that is used by the player in read-only mode. Ignored when playing back OfflineSourceConfigs.
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.
Specifies for which HTTP status codes the player should fall back to a different resource if a fallback is available.
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"
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.
The minimum duration in seconds of buffered data required for the selected track to switch to one of higher quality.
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
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.
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.
Enables reusing the IMA AdsLoader
across multiple ads and playback sessions for improved ad startup time performance.
Specifies whether default positioning values should be assumed when parsing TTML regions in case of unsupported TTML features. Default is true
.
The frequency in seconds the TimeChanged will be fired.
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
.
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
.
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.