Closed tonihuotari closed 6 years ago
I'm not sure I follow the question. The method is documented as "Whether the top-level type of mimeType is text.", which is not true for application/ttml+xml
, whose top-level type is application
.
What is it that you're actually trying to do? What does it mean to "check validity" of a text track?
That basically answers the question; MimeType.isText alone is not enough to determine if a track can be used as a subtitle.
You probably want MimeTypes.getTrackType(mimeType) == C.TRACK_TYPE_TEXT
.
Issue description
After parsing of text-tracks for simulcast DASH streams we get text-tracks with mimeType == 'application/ttml+xml' which is according to DASH standards. Check page 141 for timed text mimeType table: http://dashif.org/wp-content/uploads/2017/09/DASH-IF-IOP-v4.1-clean.pdf
This might be more of a question than a bug: Can MimeTypes.isText() be used for checking validity of text tracks?
Reproduction steps
Start stream: http://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd
Or alternatively add this to stream manifest:
After ExoPlayer has parsed the text-track the mimeType is
application/ttml+xml
--> MimeTypes.isText(
application/ttml+xml
) == falseLink to test content
http://irtdashreference-i.akamaihd.net/dash/live/901161/bfs/manifestARD.mpd
Version of ExoPlayer being used
ExoPlayer 2.6.0
Device(s) and version(s) of Android being used
Not relevant
A full bug report captured from the device
Not relevant