TweaksConfig

@objcMembers
@objc(BMPTweaksConfig)
public final class TweaksConfig : NSObject, @unchecked Sendable

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.

  • If enabled, HLS playlists will be parsed and additional features and events are enabled. This includes:

    • MetadataEvents carrying segment-specific metadata for custom HLS tags, like #EXT-X-SCTE35
    • MetadataParsedEvents carrying segment-specific metadata for custom HLS tags, like #EXT-X-SCTE35
    • DrmDataParsedEvents when a #EXT-X-KEY is found
    • Player.availableVideoQualities includes additional information

    Default is false.

    Declaration

    Swift

    public var isNativeHlsParsingEnabled: Bool
  • If enabled, playlists will be downloaded by the Bitmovin Player SDK instead of AVFoundation. This enables additional features and events, like DownloadFinishedEvents for playlist downloads.

    If set to false, enabling nativeHlsParsingEnabled won’t have any effect.

    Note

    Due to platform limitations, HLS Low Latency streams are not supported below iOS and tvOS 17 while this property is enabled. Disable custom HLS loading when intending to play HLS-LL streams below iOS and tvOS 17.

    Default is true.

    Declaration

    Swift

    public var isCustomHlsLoadingEnabled: Bool
  • The frequency in seconds PlayerListener#onTimeChanged is called with TimeChangedEvents. Default is 1. Minimum is 0.025.

    Declaration

    Swift

    public var timeChangedInterval: TimeInterval
  • When duration for subtitle tracks mismatch between the HLS manifest and the subtitle track, this can cause the player to get stalled or prevent it from rendering subtitles after seeking. This can be avoided by deselecting subtitles during seeking and reselecting them afterwards.

    If set to true, active subtitle track will be deselected before seeking and reselected when seeking finished. No subtitle change related events will be fired. If set to false, no changes are applied to subtitle selection on seeking.

    Default is false.

    Declaration

    Swift

    @available(*, deprecated, message: "This tweak is deprecated and will be removed without replacement in an upcoming minor version!")
    public var disableSubtitleTracksWhileSeeking: Bool
  • The threshold which will be applied when seeking to the end in seconds. This value will be used to calculate the maximum seekable time when calling player.seek(time:) or player.playlist.seek(source:time:), so the maximum value will be duration - seekToEndThreshold.

    This is useful if the duration of the segments does not match the duration specified in the manifest. In this case, if we try to seek to the end, AVPlayer could get stuck and might stall forever Therefore increasing this value could help.

    Default is 0.5.

    Declaration

    Swift

    public var seekToEndThreshold: TimeInterval
  • Specifies the player behaviour when Player.play is called. Default is PlaybackStartBehaviour.relaxed.

    Declaration

    Swift

    public var playbackStartBehaviour: PlaybackStartBehaviour
  • Specifies the player behaviour when stalling should be exited. Default is UnstallingBehaviour.relaxed.

    Declaration

    Swift

    public var unstallingBehaviour: UnstallingBehaviour
  • If set to true, the timing of initial subtitle handling will be delayed until the Source is ready to start playback. This can be helpful when having a live stream with a growing DVR window and a default subtitle track. In this case, there might be an AVPlayer race-condition that happens occasionally which results in AVPlayer starting playback at the beginning of the DVR window instead if at the live-edge.

    In other cases, setting this to true does not have any positive effect.

    Default is false.

    Declaration

    Swift

    public var delayInitialSubtitleSelection: Bool
  • Specify the behaviour for Ads when casting.

    • If set to false, the player will delay advertisements playback while casting and play them play them once casting has stopped. In case of VMAP ads, only the last missed ad break will be played by the Google IMA SDK. In case of playback finishing during casting, no advertisements will be played when stopping casting.
    • If set to true, the player will discard advertisements played-over or skipped-over while casting.

    In-progress advertisement when casting starts is always skipped.

    Default is false.

    Declaration

    Swift

    @available(tvOS, unavailable)
    public var discardAdsWhileCasting: Bool { get set }
  • Determines whether AVKit should update Now Playing information automatically when using System UI.

    • If set to false, the automatic updates of Now Playing Info sent by AVKit are disabled. This prevents interference with manual updates you may want to perform.
    • If set to true, the default behaviour is maintained, allowing AVKit to handle Now Playing updates.

    Note

    When NowPlayingConfig.isNowPlayingInfoEnabled is true, this flag is automatically treated as false.

    Default is true.

    Declaration

    Swift

    @available(tvOS, unavailable)
    @available(*, deprecated, message: "To enable the Now Playing information use `NowPlayingConfig.isNowPlayingInfoEnabled`")
    public var updatesNowPlayingInfoCenter: Bool { get set }
  • Minimum buffer level, in seconds, required for transitioning into the playing state. Has to be set to a value greater or equal to 0.

    • If set to 0, this tweak is disabled and no minimum buffer level is enforced.
    • If set to a value greater than 0, the playback will change to the playing state only when the forward buffer reaches a level greater than the set value.

    Note

    This tweak can be useful to fix an eventual continuous flickering of stall events (getting StallStartedEvent and StallEndedEvent rapidly one after each other), which may be caused by AVPlayer switching states abruptly for some reason (for example when losing network and reaching an empty buffer on progressive audio-only streams).

    Default is 0 (disabled).

    Declaration

    Swift

    public var enforcedMinimumBufferLevelForPlayback: TimeInterval
  • If enabled, the player will use date-based time shifting for HLS Live streams where #EXT-X-PROGRAM-DATE-TIME is available and SourceLiveConfig.targetLatency is set. This improves reaching target latency for HLS Low Latency streams.

    Default is false.

    Declaration

    Swift

    public var dateBasedTimeShiftingForLiveStreams: Bool
  • Declaration

    Swift

    override public init()