BlazeStoryPlayerButtonsStyle - React Native

The BlazeStoryPlayerButtonsStyle class represents the configuration for the story buttons.

Properties

mute

 mute?: BlazePlayerButtonStyle = {...}

The mute button style.

exit

 exit?: BlazePlayerButtonStyle = {...}

The exit button style.

share

 share?: BlazePlayerButtonStyle = {...}

The share button style.

captions

 captions?: BlazePlayerButtonStyle = {...}

The closed-captions (CC) toggle button style.

Unlike the other buttons, this one is hidden by default: isVisible defaults to false, so set isVisible: true to show it. The button only appears on content that carries captions, and appears disabled when the content's captions are not available.

Not to be confused with the player-level captions style, which controls the caption text itself. See BlazeStoryPlayerStyle.

customActionButtons

customActionButtons?: [] | [BlazeCustomActionButton] | [BlazeCustomActionButton, BlazeCustomActionButton]

The custom action buttons of the Story player. At most two, and each customParams.id must be unique. Native rejects a third button or a repeated id, with a crash on iOS and an IllegalArgumentException on Android. From React Native SDK 2.0.1, a list of three or more buttons no longer compiles.

An empty list removes the custom action buttons, including those set in the default player style. Omit the field to keep them.

A tap reaches onTriggerCustomActionButton of the widget delegate for a player opened from a widget, and of the player entry point delegate otherwise. See onTriggerCustomActionButton.

BlazeCustomActionButton:

FieldTypeDescription
customParams.idstringThe button id, unique within the list. Reported as buttonId.
customParams.namestringThe button name. Reported as buttonName.
customParams.appMetadataRecord<string, string | number | boolean>Optional. Metadata your app attaches to the button. Reported as appMetadata.
customParams.visibilityConditionVisibilityConditionOptional. Shows the button only when the condition holds.
styleBlazePlayerButtonStyleOptional. The button style.

From React Native SDK 2.0.1, a visibilityCondition of type and or or with an empty conditions list reaches native, which shows the button for an empty and and hides it for an empty or. Before, both showed it.

Initialization

interface BlazeStoryPlayerButtonsStyle {
  mute?: BlazePlayerButtonStyle;
  exit?: BlazePlayerButtonStyle;
  share?: BlazePlayerButtonStyle;
  captions?: BlazePlayerButtonStyle;
  customActionButtons?: [] | [BlazeCustomActionButton] | [BlazeCustomActionButton, BlazeCustomActionButton];
}

Did this page help you?