-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
undefined "info" object in DashParser when manifest contains no periods #618
Comments
@steve-o, are you loading a DASH manifest from YouTube? |
@joeyparrish I copied the manifest and retargeted each BaseURL to a local copy of each resource. I presume there maybe something in there off-standard that may break the player, but it does not look too unusual: |
There's a typo in your manifest: <Period,duration That comma should be a space. |
Ooh, thank you. Still looks like a bug in that function though as |
Can you be more specific? I can't reproduce your error in our demo app since your content is not available cross-origin. If there's a bug, we'd love to fix it. Please provide repro or submit a pull request. |
Working on trying to fix that, there are two lines matching the undefined object: https://github.com/google/shaka-player/blob/master/lib/dash/dash_parser.js#L659 The only scope for 'var info' is in the 'for' loop on line 613, unless I am missing something? Is there a globally scoped version? |
Odd... that does look wrong. I'm not sure why you get this error and I do not. Looking at the code, you would expect this error to occur on every manifest. |
JavaScript has an odd definition of variable scopes, it uses something called hoisting. The variable is actually "defined" at the beginning of the function. So at the end of the method it still has the last value stored (from the last Period). This error only appears when there are no periods and the variable is still set to |
Logically, If there are no periods, we should throw a specific error that says so, instead of dereferencing We will fix both of these issues. All of that said, when your manifest has valid Periods, your problem goes away. |
Before this, an empty manifest (no periods) would result in a TypeError from the containsInband computation. This corrects the computation and introduces an explicit error for empty manifests. Closes #618 Change-Id: Ie9b740dbfa4ffcafbf99541bf03fa68cfae2bf88
2.0.1-debug and 2.0.0.
Yes.
master
?Yes.
Custom app derived from introduction tutorial, i.e.
http://shaka-player-demo.appspot.com/docs/api/tutorial-basic-usage.html
Hosted here against the appspot hosting: https://junko.hk/chome/debug.html
Idea was to use tutorial together with DASH manifest and files from YouTube on a new clean HTTPS server.
Simple 40s clip on YouTube: https://www.youtube.com/watch?v=94BNgmNYoH8
n/a
Video to load without errors or at least report some form of legible error.
Two errors:
at shaka.dash.DashParser.parsePeriods_ (https://shaka-player-demo.appspot.com/lib/dash/dash_parser.js:658:27)
at shaka.dash.DashParser.parseManifest_ (https://shaka-player-demo.appspot.com/lib/dash/dash_parser.js:517:33)
at shaka.dash.DashParser. (https://shaka-player-demo.appspot.com/lib/dash/dash_parser.js:410:21)
The text was updated successfully, but these errors were encountered: