Stream interrupted if TTML <div> is empty #506
Labels
status: archived
Archived and locked; will not be updated
type: bug
Something isn't working correctly
Milestone
Note: submitting issue as per earlier correspondence.
We have some assets that have promos without TTML data in the TTML
These assets throw the following error:
( I am using uncompiled.js, latest beta btw, for the error verboseness)
Error code shaka.util.Error {
"category": 2,
"code": 2001,
"data": [],
"message": "Shaka Error TEXT.INVALID_TEXT_CUE ()",
"stack": "shaka.util.Error@http://localhost:8881/common/shaka/lib/util/error.js:77:13\nshaka.media.TtmlTextParser.parseCue_@http://localhost:8881/common/shaka/lib/media/ttml_text_parser.js:223:11\nshaka.media.TtmlTextParser@http://localhost:8881/common/shaka/lib/media/ttml_text_parser.js:81:17\nshaka.media.Mp4TtmlParser@http://localhost:8881/common/shaka/lib/media/mp4_ttml_parser.js:44:12\nshaka.media.TextEngine.prototype.appendBuffer/<@http://localhost:8881/common/shaka/lib/media/text_engine.js:126:16\n”
}
approx.: Line 212: cueElement.getAttribute('begin'), rateInfo);
Our asset during the intro promo doesn’t have any embedded data in the TTML
Because line 222: if (start == null || end == null)
This cause the error to be throw since neither start nor end are assigned values until the promo is over and main content begins playback.
Proving my theory,
At the beginning of the method shaka.media.TtmlTextParser.parseCue_
I added the simple check:
if(cueElement.hasAttribute('begin') == false)
Return;
TTML Data:
TTML element that throws errors.
Notice the
Begin, end and dur attributes are not present and therefore null.
This is the very first TTML element the parser method receives from an asset that has been behaving correctly:
(THUNDER RUMBLING)
(GRUNTS)
Dinner's ready, kids!
The text was updated successfully, but these errors were encountered: