GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeVideosPlayerBackToLiveButtonStyle

BlazeVideosPlayerBackToLiveButtonStyle configures the live badge in the Videos player. The badge reads "Live" while the viewer is watching at the live edge and becomes a tappable "Back to Live" control once the viewer scrubs behind the live edge. It is available on BlazeVideosPlayerStyle.backToLiveButton.

📘

Style structs have no public initializer. Get the base style from BlazeVideosPlayerStyle.base(), modify the properties you need, and apply it (for example, with Blaze.shared.setDefaultVideosPlayerStyle(_:)). See Live streaming for the feature overview.

var playerStyle = BlazeVideosPlayerStyle.base()
playerStyle.backToLiveButton.playbackStates.behindLiveState.text = "Go Live"
Blaze.shared.setDefaultVideosPlayerStyle(playerStyle)

Properties

margins

var margins: NSDirectionalEdgeInsets

The badge margins relative to the player container. Default: top: 8, leading: 16, bottom: 0, trailing: 0.

padding

var padding: NSDirectionalEdgeInsets

The padding between the badge content and its container. Default: top: 4, leading: 8, bottom: 4, trailing: 8.

playbackStates

var playbackStates: BlazeVideosPlayerBackToLiveButtonPlaybackStatesStyle

The per-state badge styling. BlazeVideosPlayerBackToLiveButtonPlaybackStatesStyle groups two BlazeVideosPlayerBackToLiveButtonStateStyle objects:

  • atLiveEdgeState — a passive "Live" indicator shown while at the live edge.
  • behindLiveState — a tappable "Back to Live" control shown while behind live.

BlazeVideosPlayerBackToLiveButtonStateStyle

Each playback state is a BlazeVideosPlayerBackToLiveButtonStateStyle:

PropertyTypeDescription
textStyleTextStyleFont, text size, and color of the badge label (font: UIFont?, textSize: CGFloat, textColor: UIColor).
textStringThe badge label text.
isVisibleBoolWhether the badge is shown in this state.
backgroundColorUIColorBadge background color.
cornerRadiusCGFloatBadge corner radius.
cornerRadiusRatioCGFloat?0.0–1.0 ratio that computes the final corner radius, overriding cornerRadius.
borderColorUIColorBadge border color.
borderWidthCGFloatBadge border width.
iconIconStyle?The leading dot icon (icon: UIImage, iconTint: UIColor?, iconSize: CGSize).

Default values

Statetextdot tint
atLiveEdgeStateLive#FF3131
behindLiveStateBack to Live#8E8E8E

Shared defaults for both states: textStyle.textSize = 14, textStyle.textColor = #F0F0F0, backgroundColor = #010101 at 50% opacity, cornerRadiusRatio = 0.5 (pill shape), borderWidth = 0 with a .clear border, and an 8×8 dot icon.


Did this page help you?