Constructor
new TextStyle()
Creates a TextStyle object.
Note that although this API is based on FCC guidelines, we cannot guarantee that your application is in compliance with this or any other guideline.
- Source:
Members
-
(static, non-null) EdgeStyles :Array.<!Array.<number>>
-
Defined in FCC 12-9, paragraph 111. The styles to achieve these effects are not specified anywhere. Each inner array represents a shadow, and is composed of RGB values for the shadow color, followed by pixel values for x-offset, y-offset, and blur.
Type:
- Array.<!Array.<number>>
Properties:
Name Type Description NONEArray.<!Array.<number>> RAISEDArray.<!Array.<number>> DEPRESSEDArray.<!Array.<number>> UNIFORMArray.<!Array.<number>> DROPArray.<!Array.<number>> - Source:
-
(static, non-null) StandardColors :Array.<number>
-
Defined in FCC 12-9, paragraph 111, footnote 448. Each value is an array of the three RGB values for that color.
Type:
- Array.<number>
Properties:
Name Type Description WHITEArray.<number> BLACKArray.<number> REDArray.<number> GREENArray.<number> BLUEArray.<number> YELLOWArray.<number> MAGENTAArray.<number> CYANArray.<number> - Source:
-
(static) StandardOpacities :number
-
Defined in FCC 12-9, paragraph 111.
Type:
- number
Properties:
Name Type Description OPAQUEnumber SEMI_HIGHnumber SEMI_LOWnumber TRANSPARENTnumber - Source:
-
backgroundColor :shaka.player.TextStyle.StandardColors
-
Type:
- Source:
-
backgroundOpacity :shaka.player.TextStyle.StandardOpacities
-
Type:
- Source:
-
fontColor :shaka.player.TextStyle.StandardColors
-
Type:
- Source:
-
fontEdge :shaka.player.TextStyle.EdgeStyles
-
Type:
- Source:
-
fontOpacity :shaka.player.TextStyle.StandardOpacities
-
Type:
- Source:
-
fontSize :string
-
Font size, such as 50%, 75%, 100%, 200%, or 300%.
Type:
- string
- Source:
Methods
-
load()
-
Load TextStyle settings from localStorage. Does nothing if no TextStyle data has been stored.
- Source:
- See:
-
- {shaka.player.TextStyle.store}
-
(private) loadFrom_(objnon-null)
-
Parameters:
Name Type Description objObject - Source:
-
store()
-
Store this TextStyle's settings in localStorage. Overwrites any previously-stored settings.
- Source:
- See:
-
- {shaka.player.TextStyle.load}
-
toCSS() → {string}
-
Compute the CSS text necessary to represent this TextStyle. Output does not contain any selectors.
- Source:
Returns:
- Type
- string
-
(private) toRGBA_(color, opacity) → {string}
-
Parameters:
Name Type Description colorshaka.player.TextStyle.StandardColors opacityshaka.player.TextStyle.StandardOpacities - Source:
Returns:
- Type
- string