BlazeStoryPlayerStyle - React Native

The BlazeStoryPlayerStyle class represents the style configuration for a story.

Properties

title

title?: BlazeStoryPlayerTitleTextStyle

The title style for the story.

subtitle

subtitle?: BlazeStoryPlayerSubtitleTextStyle

The style of the page title shown under the story title, for pages that have one. See BlazeStoryPlayerSubtitleTextStyle below.

The backend can force the subtitle hidden, and isVisible: true does not override that. Not related to firstTimeSlide.subtitle.

Changed in React Native SDK 1.21.0: the Stories player shows the page title under the story title by default on iOS and Android, for pages that have a title. Hide it with subtitle: { isVisible: false }.

lastUpdate

lastUpdate?: BlazeStoryPlayerLastUpdateTextStyle

The last update text style for the story.

buttons

buttons?: BlazeStoryPlayerButtonsStyle

The buttons style for the story.

chips

chips?: BlazeStoryPlayerChipsStyle

The chips style for the story.

backgroundColor

backgroundColor?: string

The background color of the story player's view.

cta

cta?: BlazeStoryPlayerCtaStyle

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

headerGradient

headerGradient?: BlazeStoryPlayerHeaderGradientStyle

The header gradient style over the story's view.

firstTimeSlide

firstTimeSlide?: BlazeStoryPlayerFirstTimeSlideStyle

The style configuration for the first-time slide screen.

progressBar

progressBar?: BlazeStoryPlayerProgressBarStyle

The progress bar style configuration for the story player.

captions

captions?: BlazeCaptionsStyle

The style of the closed-captions text shown over the player: its font and its position on screen.

To style or hide the CC toggle button instead, use buttons.captions. Read more here.

BlazeStoryPlayerSubtitleTextStyle

ValueDescription
fontThe BlazeFont of the subtitle text.
textSizeThe subtitle text size, in points on iOS and sp on Android. The default is 12.
textColorThe subtitle text color, as a hex string. The default is white.
isVisibleWhether the subtitle is shown. The default is true. The backend can force it hidden, and isVisible: true does not override that.

BlazeCaptionsStyle

ValueDescription
fontThe BlazeFont of the caption text.
textSizeThe caption text size, in sp. Android only — on iOS the size is part of font, so this field has no effect there.
positioningThe on-screen position of the captions box. See BlazeCaptionsPositioning below.

BlazeCaptionsPositioning

ValueDescription
xPositionHorizontal position of the captions box: Start, Center, or Custom. Use Custom together with xOffsetPercent. The default is Start.
xOffsetPercentOffset from the leading edge, as a percentage of the player width, clamped to 0-100. Used only when xPosition is Custom.
yPositionVertical position of the captions box: Top, Center, Bottom, or Custom. Use Custom together with yOffsetPercent. The default is Top.
yOffsetPercentOffset from the top edge, as a percentage of the player height, clamped to 0-100. Used only when yPosition is Custom.

Initialization

BlazeStoryPlayerStyle

interface BlazeStoryPlayerStyle {
  title?: BlazeStoryPlayerTitleTextStyle;
  subtitle?: BlazeStoryPlayerSubtitleTextStyle;
  lastUpdate?: BlazeStoryPlayerLastUpdateTextStyle;
  buttons?: BlazeStoryPlayerButtonsStyle;
  backgroundColor?: string;
  cta?: BlazeStoryCtaStyle;
  chips?: BlazeStoryPlayerChipsStyle;
  headerGradient?: BlazeStoryPlayerHeaderGradientStyle;
  firstTimeSlide?: BlazeStoryPlayerFirstTimeSlideStyle;
  progressBar?: BlazeStoryPlayerProgressBarStyle;
  captions?: BlazeCaptionsStyle;
}

Did this page help you?