GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeStoryPlayerCustomActionButton

The BlazeStoryPlayerCustomActionButton struct represents the configuration for a custom action button
in the Blaze Story Player UI. This style defines how a custom action button appears and behaves, including
its visual presentation and associated appMetadata.

Custom action buttons allow developers to add their own functionality to the player interface while maintaining
a consistent look and feel with the standard player controls.

Overview

A custom action button consists of:

  • A unique identifier (id) to distinguish it from other custom buttons
  • Metadata key-value pairs that can be used to store additional information
  • Visual styling via the BlazeStoryPlayerButtonStyle property

Example Usage:

// Create custom button parameters
var params = BlazePlayerCustomActionButtonParams(
    id: "add-to-favorites",
    appMetadata: ["analyticsEvent": "add_item_to_favorites", "favorites_type": "teams"]
)

// Create the custom action button with parameters and style
let customButton = BlazeStoryPlayerCustomActionButton(
     customParams: params
)

// Override styling properties
customButton.style.width = 40
customButton.style.height = 40

Properties

customParams

var customParams: BlazePlayerCustomActionButtonParams

Custom parameters that can be defined for the button

These parameters include a unique identifier and appMetadata that can be used
when handling interactions with the button.

style

var style: BlazeStoryPlayerButtonStyle

The visual and behavioral style configuration for the button.


Did this page help you?