BlazeCaptionsStyle - Android
BlazeCaptionsStyle represents the visual style for closed captions in Stories, Moments, and Videos players. Use it to configure the captions font, text size, and on-screen position.
You can configure captions from the captions property exposed by the player style:
playerStyle.captions.fontResId = R.font.my_caption_font
playerStyle.captions.textSize = 18f
playerStyle.captions.positioning.xPosition = BlazeCaptionsXPosition.Center
playerStyle.captions.positioning.yPosition = BlazeCaptionsYPosition.Bottom
Font resourcesCustom caption fonts support binary font files such as
.ttfand.otfinres/font. XML font-family resources and downloadable fonts fall back to the default captions font.
Properties
fontResId
@FontRes
var fontResId: Int?The local Android font resource used for captions. When this value is null, captions use the default font.
textSize
var textSize: FloatThe caption text size in sp. The SDK applies the system font scale so the rendered captions respect Android accessibility text-size settings.
positioning
var positioning: BlazeCaptionsPositioningThe horizontal and vertical position of the captions box within the player. See BlazeCaptionsPositioning.
Updated 22 days ago
