Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream interrupted if TTML <div> is empty #506

Closed
ewosleger opened this issue Sep 3, 2016 · 2 comments
Closed

Stream interrupted if TTML <div> is empty #506

ewosleger opened this issue Sep 3, 2016 · 2 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@ewosleger
Copy link

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

. Not until the promo is over and main content starts playing does the proper embedded TTML data begins to be streamed.

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

element is empty.
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!

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Sep 3, 2016
@joeyparrish joeyparrish added this to the v2.0.0 milestone Sep 3, 2016
@joeyparrish joeyparrish changed the title TtmlTextParser.js: Stream interupted if TTML \<div> doesn't have attributes or children. Stream interrupted if TTML <div> is empty Sep 4, 2016
@ismena
Copy link
Contributor

ismena commented Sep 6, 2016

@ewosleger Ahh, I've been hoping to fix this before you have a chance to open the issue :)

The fix is out, please let us know if you have any questions.

@ewosleger
Copy link
Author

Everything appears to be working correctly. Thanks for the quick collaboration.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants