BlazePlayerButtonStyle
The BlazeStoryPlayerButtonStyle class represents the configuration for a story button.
Properties
width
width?: numberThe width of the button.
height
height?: numberThe height of the button.
color
color?: string // HexThe tint color of the button.
isVisible
isVisible?: booleanIndicates whether the button is visible.
image
customImage?: BlazePlayerItemButtonImageStatesCustom image for the button states.
isVisibleForAds
isVisibleForAds: booleanIndicates whether the button is visible for ads.
scaleType
scaleType?: BlazeScaleTypeIndicates the image BlazeScaleType
Note, thescaleTypeprop is for use on Android only,in iOS center in default
glassBackground
glassBackground?: BlazeGlassBackgroundStateControls whether the button renders a Liquid Glass background on iOS 26 and later. It applies to Moments, Story, and Videos player buttons, including Moments and Story custom action buttons, and overrides the global BlazeSDK.setLiquidGlassEnabled(enabled) setting (off by default) for this button. Read more here.
Defaults:
- Moments:
'automatic'forshare,like,captions,seekForward, andseekBackward;'off'for every other button and for custom action buttons. - Stories:
'off'for every button, so the global setting alone does not add glass to Story buttons. Set'on'on the button instead. - Videos:
'automatic'forplayPause,previous,next,seekForward, andseekBackward;'off'for every other button.
Note, theglassBackgroundprop is for use on iOS only. On Android it has no effect.
BlazeGlassBackgroundState
On iOS versions earlier than 26, no glass renders, whatever the value.
| Value | Description |
|---|---|
'automatic' | Follows BlazeSDK.setLiquidGlassEnabled for elements that already carry a translucent background by default. |
'on' | Renders glass regardless of the global setting. |
'off' | Never renders glass. |
Initialization
The BlazeStoryButton can be initialized with custom values for its properties or with the default values:
interface BlazePlayerButtonStyle {
width?: number;
height?: number;
color?: string;
isVisible?: boolean;
scaleType?: BlazeButtonScaleType;
isVisibleForAds?: boolean;
customImage?: BlazePlayerItemButtonImageStates;
glassBackground?: BlazeGlassBackgroundState;
}Default buttons Styles
| Parameter | mute | exit | share |
|---|---|---|---|
| width | 48 | 48 | 48 |
| height | 48 | 48 | 48 |
| color | WHITE | WHITE | WHITE |
| isVisible | true | true | true |
| scaleType | BlazeScaleType.FIT_XY | BlazeScaleType.FIT_XY | BlazeScaleType.FIT_XY |
Updated about 1 month ago
