BlazeStoriesPlaybackConfiguration - iOS
The stories player's playback behavior can be customized using the BlazeStoriesPlaybackConfiguration on the global BlazeSDK.setDefaultStoriesPlaybackConfiguration method, or for specific widgets utilizing the storiesPlaybackConfiguration property.
Presets
BlazeStoriesPlaybackConfiguration.base()
Returns a BlazeStoriesPlaybackConfiguration instance with default values.
static func base() -> BlazeStoriesPlaybackConfigurationDefault configuration:
bufferingSpinnerDelay:1.0secondsads:.base()(pre-roll disabled)
Configuration Properties
ads
Ads playback options for the stories player, of type BlazeStoriesAdsPlaybackConfiguration.
ads.enablePreroll
Whether an ad on the first page location plays as a pre-roll.
When enabled, the fixed-position ad on the first unread page is respected instead of skipped, so it plays as a pre-roll on the first page the viewer interacts with. When disabled, that ad is skipped and playback starts on the first content page. See Ad configuration for the concept.
- Default:
false(pre-roll disabled — existing behavior is unchanged) - Type:
Bool
var playbackConfig = BlazeStoriesPlaybackConfiguration.base()
playbackConfig.ads.enablePreroll = true
// Apply globally
Blaze.shared.setDefaultStoriesPlaybackConfiguration(playbackConfig)
// Or per widget
let widgetView = BlazeStoriesWidgetRowView(layout: layout)
widgetView.storiesPlaybackConfiguration = playbackConfigbufferingSpinnerDelay
The delay in seconds before the buffering spinner becomes visible during playback.
If the player finishes buffering before this threshold elapses, the spinner is never shown — preventing a spinner flash on fast connections.
- Default:
1.0seconds - Type:
TimeInterval - Min:
0(spinner appears immediately on buffering)
// Get the base configuration and customize it
var playbackConfig = BlazeStoriesPlaybackConfiguration.base()
playbackConfig.bufferingSpinnerDelay = 0.5
// Apply globally
Blaze.shared.setDefaultStoriesPlaybackConfiguration(playbackConfig)
// Or per widget
let widgetView = BlazeStoriesWidgetRowView(layout: layout)
widgetView.storiesPlaybackConfiguration = playbackConfigUpdated 22 days ago
