SourceLiveConfig
@objcMembers
@objc(BMPSourceLiveConfig)
public class SourceLiveConfig : NSObject
Contains config values regarding the behaviour when playing live streams.
-
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.maxTimeShiftreturns0in 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.timeShiftto0will end up at the player’s live edge, which istargetLatencyaway from the stream’s real live edge. This value should always be positive.Related APIs:
- To automatically preserve the configured latency set
automaticallyPreservesLatencytotrue. We recommend enabling
PlaybackConfig.isAutoplayEnabledto 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-10seconds 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
falseDeclaration
Swift
public var automaticallyPreservesLatency: Bool
SourceLiveConfig Class Reference