BlazeVideosPlayerStatusIndicatorStyle
BlazeVideosPlayerStatusIndicatorStyle configures the status indicator chip (LIVE / UPCOMING / ENDED) shown in the Videos player for live streams. It is available on BlazeVideosPlayerStyle.statusIndicator.
Style structs have no public initializer. Get the base style fromBlazeVideosPlayerStyle.base(), modify the properties you need, and apply it (for example, withBlaze.shared.setDefaultVideosPlayerStyle(_:)). See Live streaming for the feature overview.
var playerStyle = BlazeVideosPlayerStyle.base()
playerStyle.statusIndicator.streamStates.liveStreamState.backgroundColor = .systemRed
playerStyle.statusIndicator.streamStates.liveStreamState.text = "ON AIR"
Blaze.shared.setDefaultVideosPlayerStyle(playerStyle)Properties
isVisible
var isVisible: BoolWhether the status indicator is visible. Default: true.
padding
var padding: NSDirectionalEdgeInsetsThe padding between the chip text and its container. Default: top: 4, leading: 8, bottom: 4, trailing: 8.
streamStates
var streamStates: BlazeVideosPlayerStatusIndicatorStreamStatesStyleThe per-state chip styling. BlazeVideosPlayerStatusIndicatorStreamStatesStyle groups three BlazeVideosPlayerStatusIndicatorStateStyle objects:
liveStreamState— while a stream is broadcasting.upcomingStreamState— while a stream is scheduled but not started.endedStreamState— once a stream has finished.
BlazeVideosPlayerStatusIndicatorStateStyle
Each stream state is a BlazeVideosPlayerStatusIndicatorStateStyle:
| Property | Type | Description |
|---|---|---|
textStyle | BlazeVideosPlayerTextStyle | Text size, color, and font of the chip label. |
isVisible | Bool | Whether this state's chip is shown. |
backgroundColor | UIColor | Chip background color. |
backgroundImage | UIImage? | Optional chip background image. |
text | String | The chip label text. |
cornerRadius | CGFloat | Chip corner radius. |
cornerRadiusRatio | CGFloat? | 0.0–1.0 ratio that computes the final corner radius, overriding cornerRadius. |
borderColor | UIColor | Chip border color. |
borderWidth | CGFloat | Chip border width. |
BlazeVideosPlayerTextStyle exposes textSize: CGFloat, textColor: UIColor, and font: UIFont?.
Default values
| State | text | backgroundColor | text color | text size | cornerRadiusRatio |
|---|---|---|---|---|---|
liveStreamState | LIVE | #FF3131 | #F0F0F0 | 12 | 0.5 |
upcomingStreamState | UPCOMING | #FFFFFF | #4E5053 | 12 | 0.5 |
endedStreamState | ENDED | #404040 | #F0F0F0 | 12 | 0.5 |
Style-level defaults: isVisible = true, padding = (4, 8, 4, 8). All states default to borderWidth = 0 with a .clear border.
Updated about 1 month ago
