From 30d32b17017e78db3d9b270b683bfc5ba5dde0ba Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Thu, 24 Aug 2017 11:27:03 -0700 Subject: [PATCH] Add support for MP4+TTML in HLS Previously, our HLS implementation only supported WebVTT, because that seemed to be the only supported format in HLS. Now, we add support for other formats by extending the MIME and codec guessing system to text streams. We also add a parser registration for HLS's new "stpp.TTML.im1t" codec string. Closes #986 Change-Id: I0a58ca4650675ff0546e36edf4114290f7931239 --- lib/hls/hls_parser.js | 244 ++++++++++++++++++++++++-------- lib/text/mp4_ttml_parser.js | 3 + test/hls/hls_parser_unit.js | 270 ++++++++++++++++++++++++++++++++++-- 3 files changed, 444 insertions(+), 73 deletions(-) diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index bc2deb4928..a6c6b1a158 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -60,6 +60,12 @@ shaka.hls.HlsParser = function() { /** @private {!Object.} */ this.mediaTagsToStreamInfosMap_ = {}; + /** + * The key is a string of the form "