-
Notifications
You must be signed in to change notification settings - Fork 128
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
Rewrite to ES6 #38
Rewrite to ES6 #38
Conversation
5a4871a
to
88e4a20
Compare
Ah I now see the Safari 9 issue has been repoted as #22 |
The autoplay error is (partly) a bug in Dash.js I believe. I created Dash-Industry-Forum/dash.js#1027 because I could reproduce the problem with only Dash.js. |
Hmmm also the quality switching seems to be in Dash.js. I tried the reference player 2.0 (locally) and it also seems to load higher qualities way slower. This already seems to be broken in dash.js 1.6 and I've created an issue for that: Dash-Industry-Forum/dash.js#1028 |
I haven't had time to look through this PR yet, but it's great that you're working on it - thank you! We'll be sure to look it over and provide help/thoughts ASAP. |
Glad to help :)! |
Awesome thanks for doing this! |
Btw #36 is already applied here too, as I accidentally worked of that code. But I guess that's not a big problem because we needed to do that manually otherwise anyway as it will never merge probably. |
OK, dash.js 2.0 is released and I've integrated it into this PR. Although they do not publish on NPM, we can use the tar.gz from the 2.0 release, which I did. The following problems are still valid:
UglifyJS does not hang anymore and all other points where dash.js related and they have fixed these. So if we can answer the above things I think this PR is good :). |
c14aed5
to
57ee665
Compare
I fixed the merge conflict by rebasing, but it might have did something to 5226706, not sure |
I fixed the linting errors, but had to comment out some stuff from karma.config.js |
Not sure why the tests fail.... |
My last pushes add the dash.js license and use a modified dash.js NPM package which does not use I created Dash-Industry-Forum/dash.js#1173 to see whether they want to publish to NPM themselves and/or change the main file. |
Another thing I'm having difficulties with now is that I do not know of any way of disabling dash.js debug output. This can normally be done by calling a method on the mediaplayer after creating it but before initializing it it seems. But not sure how we should handle this then if we want to have this as an option. |
Looks like you can:
|
Ah nice, will try this tomorrow :) |
|
||
# Require firefox 43.0 for MSE | ||
addons: | ||
firefox: "43.0" |
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.
Looks likes Travis has a latest
option https://docs.travis-ci.com/user/firefox/
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.
Yeah, is latest always what we want? I can change it then
OK I tried applying the suggestions. However I can not get it to work because somehow things go wrong with I have no clue how to fix that. |
You should pin sinon to |
* upstream/master: Set dash.js 1.6.0 as a dependency
OK now I really give up :( |
btw dash.js is now published on NPM, so we can replace the tar.gz with a version. |
You can keep pushing your changes to this PR while I try to figure out what the issue with Travis/Firefox is. |
Will this also support Video.js 4.12.15, or only 5.x? |
This will only support videojs 5.x. |
@nickygerritsen I've opened a PR (#49) to separate the dash.js API updates from the ES6/browserification. I think we should not bundle dash.js into the contrib-dash plugin but rather use the global |
@forbesjo this makes sense. When that is merged I will do some magic in this PR to fix related stuff :) |
@nickygerritsen I've updated this plugin to use dash.js 2.0 and to use browserify in two other PRs, would you be able to rebase this PR? |
Yes but probably next week or the week after |
* upstream/master: Make the browserify shim a dependency Added Browserify support 2.1.0 Update contrib-dash for dash.js 2.0
OK pushed something that should at least merge everything. My rebase skills are not that good :( |
Another option would be to just re-do my changes somewhat manually on top of the current master. |
I'll grab your changes and do some rebase magic. |
Any luck on the rebase? |
Instead of rebasing (it's a very messy experience), I'll open an ES6 only PR and leave the generatorification for another day. Closing this PR. |
Hi all!
Note: below text was the original text. Now that dash.js 2.0 is released, this PR is no WIP anymore.
This is a WIP to rewrite the whole plugin to use ES6 and browserify.
As a basis I started with the generator in a new directory and just moved code in it until it worked.
There are still some things that need to change and/or that are not working. Some of them I could really use some help with. Remarks:
dash.js
2.x, which also uses ES6. They say it will be released this month so I don't see a big problem with this.dash.js
repo, so I could push a prerelease version of the ES6 code npm. Thus the plugin now depends ondash-es6-tmp
, which we can change back again afterdash.js
2.x is final.MediaPlayer
onwindow
and do not export it. It might make sense to create a PR for them to export it inall.js
so we can import it and not usewindow
. Agreed?{}
now. So that's what I'm doing too.spec.js
testfile, as I can't seem to find examples on how this is done nowadays.--compress
is given. No clue why but I have removed it and now it works.player.play()
the video does not play either. I tried callingplay
on the mediaplayer and then it does work. Maybe something they changed in the new Dash.js?index.html
withnpm run start
it takes about a minute here. I'm not sure if this is Dash.js related or this plugin.useVideoJSDebug
andgetWidevineProtectionData
if they exist, but I can not find anyplace they are defined. So I added them back but no clue what they are for.useVideoJSDebug
?Although there are quite some problems, I think this is a good beginning for this plugin to become ES6'ified :).
So @forbesjo / @dmlap / @imbcmdth any suggestions for these problems?