docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCssStyle.html
Package com.google.android.exoplayer2.text.webvtt
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classWebvttCssStyleextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Style object of a CSS style block in a WebVTT file.
See the Apply CSS properties section of the W3C specification
Nested Classes | Modifier and Type | Class | Description |
| --- | --- | --- |
| static interface | WebvttCssStyle.FontSizeUnit |
Deprecated.
Font size unit enum.
|
| static interface | WebvttCssStyle.StyleFlags |
Deprecated.
Style flag enum. |
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static int | FONT_SIZE_UNIT_EM |
Deprecated.
|
| static int | FONT_SIZE_UNIT_PERCENT |
Deprecated.
|
| static int | FONT_SIZE_UNIT_PIXEL |
Deprecated.
|
| static int | STYLE_BOLD |
Deprecated.
|
| static int | STYLE_BOLD_ITALIC |
Deprecated.
|
| static int | STYLE_ITALIC |
Deprecated.
|
| static int | STYLE_NORMAL |
Deprecated.
|
| static int | UNSPECIFIED |
Deprecated.
|
Constructors | Constructor | Description |
| --- | --- |
| WebvttCssStyle() |
Deprecated.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| int | getBackgroundColor() |
Deprecated.
|
| boolean | getCombineUpright() |
Deprecated.
|
| int | getFontColor() |
Deprecated.
|
| String | getFontFamily() |
Deprecated.
|
| float | getFontSize() |
Deprecated.
|
| @com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.FontSizeUnit int | getFontSizeUnit() |
Deprecated.
|
| @com.google.android.exoplayer2.text.span.TextAnnotation.Position int | getRubyPosition() |
Deprecated.
|
| int | getSpecificityScore(String id, String tag, Set<String> classes, String voice) |
Deprecated.
Returns a value in a score system compliant with the CSS Specificity rules.
|
| @com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.StyleFlags int | getStyle() |
Deprecated.
Returns the style or UNSPECIFIED when no style information is given.
|
| boolean | hasBackgroundColor() |
Deprecated.
|
| boolean | hasFontColor() |
Deprecated.
|
| boolean | isLinethrough() |
Deprecated.
|
| boolean | isUnderline() |
Deprecated.
|
| WebvttCssStyle | setBackgroundColor(int backgroundColor) |
Deprecated.
|
| WebvttCssStyle | setBold(boolean bold) |
Deprecated.
|
| WebvttCssStyle | setCombineUpright(boolean enabled) |
Deprecated.
|
| WebvttCssStyle | setFontColor(int color) |
Deprecated.
|
| WebvttCssStyle | setFontFamily(String fontFamily) |
Deprecated.
|
| WebvttCssStyle | setFontSize(float fontSize) |
Deprecated.
|
| WebvttCssStyle | setFontSizeUnit(@com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.FontSizeUnit int unit) |
Deprecated.
|
| WebvttCssStyle | setItalic(boolean italic) |
Deprecated.
|
| WebvttCssStyle | setLinethrough(boolean linethrough) |
Deprecated.
|
| WebvttCssStyle | setRubyPosition(@com.google.android.exoplayer2.text.span.TextAnnotation.Position int rubyPosition) |
Deprecated.
|
| void | setTargetClasses(String[] targetClasses) |
Deprecated.
|
| void | setTargetId(String targetId) |
Deprecated.
|
| void | setTargetTagName(String targetTag) |
Deprecated.
|
| void | setTargetVoice(String targetVoice) |
Deprecated.
|
| WebvttCssStyle | setUnderline(boolean underline) |
Deprecated.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public static final int UNSPECIFIED
Deprecated. See Also:Constant Field Values
-
public static final int STYLE_NORMAL
Deprecated. See Also:Constant Field Values
-
public static final int STYLE_BOLD
Deprecated. See Also:Constant Field Values
-
public static final int STYLE_ITALIC
Deprecated. See Also:Constant Field Values
-
public static final int STYLE_BOLD_ITALIC
Deprecated. See Also:Constant Field Values
-
public static final int FONT_SIZE_UNIT_PIXEL
Deprecated. See Also:Constant Field Values
-
public static final int FONT_SIZE_UNIT_EM
Deprecated. See Also:Constant Field Values
-
public static final int FONT_SIZE_UNIT_PERCENT
Deprecated. See Also:Constant Field Values
-
public WebvttCssStyle()
Deprecated.
-
public void setTargetId([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")targetId)
Deprecated.
-
public void setTargetTagName([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")targetTag)
Deprecated.
-
public void setTargetClasses([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")[] targetClasses)
Deprecated.
-
public void setTargetVoice([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")targetVoice)
Deprecated.
-
public int getSpecificityScore(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")id,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")tag,[Set](https://developer.android.com/reference/java/util/Set.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> classes,
@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")voice)
Deprecated.
Returns a value in a score system compliant with the CSS Specificity rules.
The score works as follows:
- Id match adds 0x40000000 to the score.
- Each class and voice match adds 4 to the score.
- Tag matching adds 2 to the score.
- Universal selector matching scores 1.
See also CSS Cascading.
Parameters:id - The id of the cue if present, null otherwise.tag - Name of the tag, null if it refers to the entire cue.classes - An array containing the classes the tag belongs to. Must not be null.voice - Annotated voice if present, null otherwise.Returns:The score of the match, zero if there is no match.
-
public @com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.StyleFlags int getStyle()
Deprecated.
Returns the style or UNSPECIFIED when no style information is given.
Returns:UNSPECIFIED, STYLE_NORMAL, STYLE_BOLD, STYLE_BOLD or STYLE_BOLD_ITALIC.
-
public boolean isLinethrough()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setLinethrough(boolean linethrough)
Deprecated.
-
public boolean isUnderline()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setUnderline(boolean underline)
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setBold(boolean bold)
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setItalic(boolean italic)
Deprecated.
-
@Nullable
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")getFontFamily()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setFontFamily(@Nullable[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")fontFamily)
Deprecated.
-
public int getFontColor()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setFontColor(int color)
Deprecated.
-
public boolean hasFontColor()
Deprecated.
-
public int getBackgroundColor()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setBackgroundColor(int backgroundColor)
Deprecated.
-
public boolean hasBackgroundColor()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setFontSize(float fontSize)
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setFontSizeUnit(@com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.FontSizeUnit int unit)
Deprecated.
-
public @com.google.android.exoplayer2.text.webvtt.WebvttCssStyle.FontSizeUnit int getFontSizeUnit()
Deprecated.
-
public float getFontSize()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setRubyPosition(@com.google.android.exoplayer2.text.span.TextAnnotation.Position int rubyPosition)
Deprecated.
-
public @com.google.android.exoplayer2.text.span.TextAnnotation.Position int getRubyPosition()
Deprecated.
-
@CanIgnoreReturnValue
public[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")setCombineUpright(boolean enabled)
Deprecated.
-
public boolean getCombineUpright()
Deprecated.