Back to Exoplayer

WebvttCueParser (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/text/webvtt/WebvttCueParser.html

latest3.0 KB
Original Source

Package com.google.android.exoplayer2.text.webvtt

Class WebvttCueParser


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classWebvttCueParserextends[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.

Parser for WebVTT cues. (https://w3c.github.io/webvtt/#cues)

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static Pattern | CUE_HEADER_PATTERN | Deprecated. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | WebvttCueParser() | Deprecated. |

Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static WebvttCueInfo | parseCue​(ParsableByteArray webvttData, List<WebvttCssStyle> styles) | Deprecated.

Parses the next valid WebVTT cue in a parsable array, including timestamps, settings and text. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

CUE_HEADER_PATTERN

public static final[Pattern](https://developer.android.com/reference/java/util/regex/Pattern.html "class or interface in java.util.regex")CUE_HEADER_PATTERN

Deprecated.

Constructor Detail

- 

WebvttCueParser

public WebvttCueParser()

Deprecated.

Method Detail

- 

parseCue

@Nullable
public static[WebvttCueInfo](WebvttCueInfo.html "class in com.google.android.exoplayer2.text.webvtt")parseCue​([ParsableByteArray](../../util/ParsableByteArray.html "class in com.google.android.exoplayer2.util")webvttData,[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[WebvttCssStyle](WebvttCssStyle.html "class in com.google.android.exoplayer2.text.webvtt")> styles)

Deprecated.

Parses the next valid WebVTT cue in a parsable array, including timestamps, settings and text. Parameters:webvttData - Parsable WebVTT file data.styles - List of styles defined by the CSS style blocks preceding the cues.Returns:The parsed cue info, or null if no valid cue was found.