Class 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

      Constructor Description
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static WebVTTDocument parse​( stream, java.lang.String encoding)
      The main parser for WebVTT cue files pre KitKat.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebVTTParser

        public WebVTTParser()
    • Method Detail

      • parse

        public static WebVTTDocument parse​( stream,
                                           java.lang.String encoding)
        The main parser for WebVTT cue files pre KitKat.
        stream - the input stream containing caption data
        encoding - the string encoding used, mostly UTF-8
        a populated WebVTTDocument with the caption texts.
        Throws: - Things to work on in the future: X-TIMESTAMP-MAP parsing (MPEGTS parsing for HLS syncing with PES timing data) Region and Styling parsing