-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove unnecessary references to manifest #1848
Remove unnecessary references to manifest #1848
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if we do any refactoring around ES5 code it should be converted into ES6 syntax. Remove Var and use Let and Const at the very minimum. I will send out and email today with some details around this ask.
src/dash/models/DashManifestModel.js
Outdated
|
||
for (var i = 0; i < ln; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to refactor this kind of stuff we would want to move to es6. This is a style that we decided on.
7979b49
to
8d2c1ee
Compare
b37db06
to
b04ba0d
Compare
f814b5d
to
d3d285a
Compare
d3d285a
to
6dda058
Compare
4b2c80e
to
91c56d8
Compare
… on DashAdaptor singleton. Then, getStreamsInfo function doesn't need manifest as parameter : manifest has already been added like an attribute on each period.
…Controller doesn't need manifestModel as attribute
…ld has one for the MediaPlayer need.
update equality test between objects => use JSON.stringify function instead of === (test done on reference)
91c56d8
to
f9aefc3
Compare
The main idea behind this Pull Request is to centralize the access to manifestModel object. When a manifest is downloaded, the callback 'onManifestUpdated' is called. I suggest to update Periods array in DashAdapter class. The manifest is added to each period object. So, we don't need, in each file, to set manifest as parameter. There is an exception : it's for getTracksForTypeFromManifest and getStreamsFromManifest functions of MediaPlayer. Those functions could be called for an unplayed stream.