BlazeMomentsPlayerCustomActionButton
The BlazeMomentsPlayerCustomActionButton struct represents the configuration for a custom action button
in the Blaze Moments 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
BlazeMomentsPlayerButtonStyleproperty
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 = BlazeMomentsPlayerCustomActionButton(
customParams: params
)
// Override styling properties
customButton.style.width = 40
customButton.style.height = 40Properties
customParams
var customParams: BlazePlayerCustomActionButtonParamsCustom 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: BlazeMomentsPlayerButtonStyleThe visual and behavioral style configuration for the button.
Updated about 2 months ago
Did this page help you?
