BlazeMomentsPlayerStyle - iOS
The BlazeMomentsPlayerStyle struct represents the style configuration for a moment.
Properties
headingText
var headingText: BlazeMomentsPlayerHeadingTextStyleThe heading text style configuration for the moment.
bodyText
var bodyText: BlazeMomentsPlayerBodyTextStyleThe body text style configuration for the moment.
buttons
var buttons: BlazeMomentsPlayerButtonsStyleThe buttons style for the moments.
Seek Controls
Note: Seek buttons are only visible when the content duration is 20 seconds or longer. For shorter content, the buttons are automatically hidden regardless of their visibility setting. Each press seeks by 10 seconds. Seek buttons are hidden during ad playback (
isVisibleForAdsdefaults tofalse).
seekForward - Skip forward 10 seconds
momentsPlayerStyle.buttons.seekForward.color = UIColor.white
momentsPlayerStyle.buttons.seekForward.width = 34
momentsPlayerStyle.buttons.seekForward.height = 34
momentsPlayerStyle.buttons.seekForward.isVisible = trueseekBackward - Skip backward 10 seconds
momentsPlayerStyle.buttons.seekBackward.color = UIColor.white
momentsPlayerStyle.buttons.seekBackward.width = 34
momentsPlayerStyle.buttons.seekBackward.height = 34
momentsPlayerStyle.buttons.seekBackward.isVisible = truechips
var chips: BlazeMomentsPlayerChipsStyleThe chips style for the moments.
backgroundColor
var backgroundColor: UIColor = .blackThe background color of the moments player's view.
cta
var cta: BlazeMomentsPlayerCtaStyleThe CTA (Call to Action) button style for the moments.
headerGradient
var headerGradient: BlazeMomentsPlayerHeaderGradientStyleThe header gradient style for the moments view.
footerGradient
var footerGradient: BlazeMomentsPlayerFooterGradientStyleThe footer gradient style for the moments view.
firstTimeSlide
var firstTimeSlide: BlazeMomentsPlayerFirstTimeSlideStyleThe style configuration for the first-time slide screen.
seekBar
var seekBar: BlazeMomentsPlayerSeekBarStyleThe seek bar style configuration for the moments player..
bottomComponentsAlignment
var bottomComponentsAlignment: BottomComponentsAlignmentThis parameter determines how the components are vertically aligned within its container, particularly in relation to the player view or the container itself.
playerDisplayMode
var playerDisplayMode: BlazePlayerDisplayModeThe display mode of the video within the player.
Default is .fixedRatio_9_16, which maintains the video's 9:16 aspect ratio and fits it within the player's container, potentially adding letterboxing if needed.
tabsConfigurations
var tabsConfigurations: BlazeMomentsTabsConfigurationsConfiguration for moments tabs container behavior and styling.
captions
var captions: BlazeCaptionsStyleThe closed-captions style configuration for the moments player. Controls the caption font and the position of the captions box within the player. See BlazeCaptionsStyle.
Usage
Start with a preset - BlazeMomentsPlayerStyle.base() and override the necessary properties.
Example
var momentsPlayerStyle = BlazeMomentsPlayerStyle.base()
momentsPlayerStyle.cta.height = 48BottomComponentsAlignment
| Value | Description |
|---|---|
relativeToContainer | Indicates that the CTA and the rest of the elements will be placed relative to the screen's bottom anchor. |
relativeToPlayer | Indicates that the CTA and the rest of the elements will be placed relative to the player's bottom anchor. |
fitCTABelowPlayer | Indicates that the CTA will try to fit in the space between the player and the bottom of the screen. If there's no space it will fallback to relativeToPlayer. In both cases the rest of the elements will be placed relative to the player's bottom anchor. |
BlazePlayerDisplayMode
| Value | Description |
|---|---|
fixedRatio_9_16 | Maintains the video's original 9:16 aspect ratio, fitting it within the container. This may result in letterboxing if the container's aspect ratio differs. |
resizeAspectFillCenterCrop | Expands the video to cover the entire container, cropping excess content as necessary to maintain the aspect ratio, centered within the container. |
Updated 11 days ago
