Package com.brightcove.player.captioning
Class WebVTTParser
- java.lang.Object
-
- com.brightcove.player.captioning.WebVTTParser
-
public class WebVTTParser extends java.lang.Object
Implementation of a parser for WebVTT style captions. This parser is not complete, and is loosely based off of the current WebVTT parser in the Google ExoPlayer project.- See Also:
- WebVTT specification
-
-
Constructor Summary
Constructors Constructor Description WebVTTParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WebVTTDocument
parse(java.io.InputStream stream, java.lang.String encoding)
The main parser for WebVTT cue files pre KitKat.
-
-
-
Method Detail
-
parse
public static WebVTTDocument parse(java.io.InputStream stream, java.lang.String encoding) throws java.io.IOException
The main parser for WebVTT cue files pre KitKat.- Parameters:
stream
- the input stream containing caption dataencoding
- the string encoding used, mostly UTF-8- Returns:
- a populated WebVTTDocument with the caption texts.
- Throws:
java.io.IOException
- Things to work on in the future: X-TIMESTAMP-MAP parsing (MPEGTS parsing for HLS syncing with PES timing data) Region and Styling parsing
-
-