SourceLiveConfig
@objcMembers
@objc(BMPSourceLiveConfig)
public class SourceLiveConfig : NSObject, @unchecked Sendable
Contains config values regarding the behaviour when playing live streams.
Note
DisablePlayerConfig.tweaksConfig.isCustomHlsLoadingEnabled
when intending to play HLS-LL streams
below iOS and tvOS 17. Due to platform limitations, HLS-LL streams are not supported there while
this property is enabled.
-
The minimum buffer depth of a stream needed to enable time shifting.
When the internal value for the maximal possible timeshift is lower than this value, timeshifting should be disabled. That means
Player.maxTimeShift
returns0
in that case. This value should always be non-positive value.Default value is
-40
.Declaration
Swift
public var minTimeshiftBufferDepth: TimeInterval
-
The target latency in seconds, i.e. the distance from the stream’s real live edge to be maintained by the player during playback.
This defines the live edge as seen by the player, e.g. a
Player.timeShift
to0
will end up at the player’s live edge, which istargetLatency
away from the stream’s real live edge. This value should always be positive.Related APIs:
- To automatically preserve the configured latency set
automaticallyPreservesLatency
totrue
. We recommend enabling
PlaybackConfig.isAutoplayEnabled
to achieve the best possible latency on stream startup.
Note
The system works on a best effort basis but there is no guarantee that the target latency will be always reached exactly. This is especially the case for lower values.
Default value is
nan
, meaning that the default system behaviour is maintained.Declaration
Swift
public var targetLatency: TimeInterval
- To automatically preserve the configured latency set
-
Specifies if the player should try to automatically restore the previous playback position after a stall.
If set to
true
, the player will time shift to the last playback position after a stall ended (does not have to be the configuredtargetLatency
). For example, when the player stalls after callingplayer.timeShift = -10
, it will try to restore the-10
seconds time shift automatically.Note
If the network cannot deliver media quickly enough playback may stall endlessly.Does not have any effect for VOD assets. Default value is
false
Declaration
Swift
public var automaticallyPreservesLatency: Bool