public final class Mp4WebvttParser extends Object implements SubtitleParser
SubtitleParser
for Webvtt embedded in a Mp4 container file.Constructor and Description |
---|
Mp4WebvttParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
canParse(String mimeType)
Checks whether the parser supports a given subtitle mime type.
|
com.google.android.exoplayer.text.webvtt.Mp4WebvttSubtitle |
parse(byte[] bytes,
int offset,
int length)
Parses a
Subtitle from the provided byte[] . |
public boolean canParse(String mimeType)
SubtitleParser
canParse
in interface SubtitleParser
mimeType
- A subtitle mime type.public com.google.android.exoplayer.text.webvtt.Mp4WebvttSubtitle parse(byte[] bytes, int offset, int length) throws ParserException
SubtitleParser
Subtitle
from the provided byte[]
.parse
in interface SubtitleParser
bytes
- The array holding the subtitle data.offset
- The offset of the subtitle data in bytes.length
- The length of the subtitle data in bytes.ParserException
- If a problem occurred parsing the subtitle data.