TTMLParser

open class TTMLParser

Implementation of a parser which understands much of the DFXP TTML specification (though not all). Specifically, these items are recognized:

  • Region element definitions
  • Style element definitions
  • Basic body structure with with P tags wrapped in top-level divs which contain spans, br's and unspanned text

See also

<a href="http://www.w3.org/TR/ttaf1-dfxp/">http://www.w3.org/TR/ttaf1-dfxp/</a>

Types

Link copied to clipboard
open class Attributes
All XML attributes recognized in a TTML document.
Link copied to clipboard
open class Namespaces
Namespaces specified by TTML specification.
Link copied to clipboard
open class Tags
All tags recognized in a TTML document.

Functions

Link copied to clipboard
open fun parseTimeValue(value: String): Int
Parses a string representing a time code position within a video following the format: HH:MM:ss.
Link copied to clipboard
open fun parseTimeValueLong(value: String): Long
Parses a string representing a time code position within a video following the format: HH:MM:ss.
Link copied to clipboard
open fun parseXml(reader: Reader): TTMLDocument
open fun parseXml(inputStream: InputStream, encoding: String): TTMLDocument
Parses the given java.io.InputStream using the specified encoding.