You can set the format, such as font, size, color, edge, and opacity for closed-caption text.
Wait for the MediaPlayer
to be at least in the PREPARED state.
For more information about the states, see Wait for a valid state.
Create a TextFormat
instance.
You can provide all the closed-caption styling parameters now or set them later.
new TextFormat(
font,
fontColor,
edgeColor,
fontEdge,
backgroundColor,
fillColor,
size,
fontOpacity,
backgroundOpacity,
fillOpacity,
bottomInset
safeArea) → {AdobePSDK.TextFormat}
(Optional) Get the current closed-caption style settings with MediaPlayer.ccStyle
.
The return value is an instance of the TextFormat
interface.
If no style was previously set, it returns a TextFormat object with default values for each attribute:
ccStyle :AdobePSDK.TextFormat
To change the style settings, use MediaPlayer.ccStyle
, passing an instance of the TextFormat
interface.
You can use this method even if the current media stream has no closed captions.
ccStyle :AdobePSDK.TextFormat
Setting the closed-caption style is asynchronous, so it might take a few seconds for the changes to appear on the screen.