Interface TextTrackStyle
-
- All Implemented Interfaces:
public interface TextTrackStyle
The text track style API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
TextTrackStyle.EdgeType
The edge type values for the text track.
public enum
TextTrackStyle.FontStyle
The font style values for the text track.
public enum
TextTrackStyle.FontFamily
The font family values for the text track.
-
Method Summary
Modifier and Type Method Description abstract void
setFontColor(int color)
Sets text font color abstract int
getFontColor()
Returns current font color abstract void
setBackgroundColor(int color)
Sets background color abstract int
getBackgroundColor()
Returns current background color abstract void
setWindowColor(int color)
Sets background color abstract int
getWindowColor()
Returns current window color abstract void
setEdgeColor(int color)
Sets edge color abstract int
getEdgeColor()
Returns current edge color abstract void
setEdgeType(TextTrackStyle.EdgeType type)
Sets edge type abstract TextTrackStyle.EdgeType
getEdgeType()
Returns current edge type abstract void
setFont(@NonNull() TextTrackStyle.FontFamily fontFamily, TextTrackStyle.FontStyle fontStyle)
Sets font family and font style from the FontFamily and FontStyle enums abstract void
setFont(@NonNull() String fontFile, TextTrackStyle.FontStyle fontStyle)
Sets font from the font file abstract TextTrackStyle.FontStyle
getFontStyle()
Returns current font style value from FontStyle enum abstract TextTrackStyle.FontFamily
getFontFamily()
Returns current font family value from FontFamily enum abstract String
getFontFile()
Returns name of the fonts file abstract void
setFontSize(int fontSize)
Sets font size in range 50% - 300% of default font size abstract int
getFontSize()
Returns current font size in range 50% - 300% of default font size abstract void
setMarginLeft(int marginLeft)
Sets text left margin in range 0% - 100% of subtitle view width abstract void
setMarginTop(int marginTop)
Sets text top margin in range 0% - 100% of subtitle view height abstract int
getMarginLeft()
Returns left margin value in range: 0% - 100% from subtitle view width abstract int
getMarginTop()
Returns top margin value in range: 0% - 100% from subtitle view height abstract void
reset()
Sets default values of colors, sizes, layout, styles of subtitles (from the subtitle description metadata) -
-
Method Detail
-
setFontColor
abstract void setFontColor(int color)
Sets text font color
- Parameters:
color
- - font color @see Colors
-
getFontColor
abstract int getFontColor()
Returns current font color
- Returns:
font color
-
setBackgroundColor
abstract void setBackgroundColor(int color)
Sets background color
- Parameters:
color
- - background color
-
getBackgroundColor
abstract int getBackgroundColor()
Returns current background color
- Returns:
background color
-
setWindowColor
abstract void setWindowColor(int color)
Sets background color
- Parameters:
color
- - window color
-
getWindowColor
abstract int getWindowColor()
Returns current window color
- Returns:
window color
-
setEdgeColor
abstract void setEdgeColor(int color)
Sets edge color
- Parameters:
color
- - edge color
-
getEdgeColor
abstract int getEdgeColor()
Returns current edge color
- Returns:
edge color
-
setEdgeType
abstract void setEdgeType(TextTrackStyle.EdgeType type)
Sets edge type
- Parameters:
type
- - edge type
-
getEdgeType
abstract TextTrackStyle.EdgeType getEdgeType()
Returns current edge type
- Returns:
edge type
-
setFont
abstract void setFont(@NonNull() TextTrackStyle.FontFamily fontFamily, TextTrackStyle.FontStyle fontStyle)
Sets font family and font style from the FontFamily and FontStyle enums
- Parameters:
fontFamily
- - font family valuefontStyle
- - font style value
-
setFont
abstract void setFont(@NonNull() String fontFile, TextTrackStyle.FontStyle fontStyle)
Sets font from the font file
- Parameters:
fontFile
- - font file namefontStyle
- - font style value
-
getFontStyle
@Nullable() abstract TextTrackStyle.FontStyle getFontStyle()
Returns current font style value from FontStyle enum
- Returns:
font style
-
getFontFamily
@Nullable() abstract TextTrackStyle.FontFamily getFontFamily()
Returns current font family value from FontFamily enum
- Returns:
font family
-
getFontFile
abstract String getFontFile()
Returns name of the fonts file
- Returns:
name of font file
-
setFontSize
abstract void setFontSize(int fontSize)
Sets font size in range 50% - 300% of default font size
- Parameters:
fontSize
- - font size value in range: 50% - 300% of default font size
-
getFontSize
abstract int getFontSize()
Returns current font size in range 50% - 300% of default font size
- Returns:
font style
-
setMarginLeft
abstract void setMarginLeft(int marginLeft)
Sets text left margin in range 0% - 100% of subtitle view width
- Parameters:
marginLeft
- - text left margin in range 0% - 100% of subtitle view width
-
setMarginTop
abstract void setMarginTop(int marginTop)
Sets text top margin in range 0% - 100% of subtitle view height
- Parameters:
marginTop
- - text top margin in range 0% - 100% of subtitle view height
-
getMarginLeft
abstract int getMarginLeft()
Returns left margin value in range: 0% - 100% from subtitle view width
- Returns:
left margin value
-
getMarginTop
abstract int getMarginTop()
Returns top margin value in range: 0% - 100% from subtitle view height
- Returns:
top margin value
-
reset
abstract void reset()
Sets default values of colors, sizes, layout, styles of subtitles (from the subtitle description metadata)
-
-
-
-