GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeMomentsPlayerStyle - iOS

The BlazeMomentsPlayerStyle struct represents the style configuration for a moment.

Properties

headingText

var headingText: BlazeMomentsPlayerHeadingTextStyle

The heading text style configuration for the moment.

bodyText

var bodyText: BlazeMomentsPlayerBodyTextStyle

The body text style configuration for the moment.

buttons

var buttons: BlazeMomentsPlayerButtonsStyle

The 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 (isVisibleForAds defaults to false).

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 = true

seekBackward - Skip backward 10 seconds

momentsPlayerStyle.buttons.seekBackward.color = UIColor.white
momentsPlayerStyle.buttons.seekBackward.width = 34
momentsPlayerStyle.buttons.seekBackward.height = 34
momentsPlayerStyle.buttons.seekBackward.isVisible = true

chips

var chips: BlazeMomentsPlayerChipsStyle

The chips style for the moments.

backgroundColor

var backgroundColor: UIColor = .black

The background color of the moments player's view.

cta

var cta: BlazeMomentsPlayerCtaStyle

The CTA (Call to Action) button style for the moments.

headerGradient

var headerGradient: BlazeMomentsPlayerHeaderGradientStyle

The header gradient style for the moments view.

footerGradient

var footerGradient: BlazeMomentsPlayerFooterGradientStyle

The footer gradient style for the moments view.

firstTimeSlide

var firstTimeSlide: BlazeMomentsPlayerFirstTimeSlideStyle

The style configuration for the first-time slide screen.

seekBar

var seekBar: BlazeMomentsPlayerSeekBarStyle

The seek bar style configuration for the moments player..

bottomComponentsAlignment

var bottomComponentsAlignment: BottomComponentsAlignment

This 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: BlazePlayerDisplayMode

The 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: BlazeMomentsTabsConfigurations

Configuration for moments tabs container behavior and styling.

captions

var captions: BlazeCaptionsStyle

The 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 = 48

BottomComponentsAlignment

ValueDescription
relativeToContainerIndicates that the CTA and the rest of the elements will be placed relative to the screen's bottom anchor.
relativeToPlayerIndicates that the CTA and the rest of the elements will be placed relative to the player's bottom anchor.
fitCTABelowPlayerIndicates 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

ValueDescription
fixedRatio_9_16Maintains 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.
resizeAspectFillCenterCropExpands the video to cover the entire container, cropping excess content as necessary to maintain the aspect ratio, centered within the container.

Did this page help you?