-
-
Notifications
You must be signed in to change notification settings - Fork 315
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
Play button doesn't work with video.js 6.2.0 and webpack #149
Comments
It works in Firefox (53) now but not in Chrome (60), closed this too soon (only worked around css issues). |
@alsar can you confirm it's working now with the latest master and video.js 6.2.0 or newer? |
@thijstriemstra With 6.2.0 i get an |
With 6.1.0 it works now in both Firefox and Chrome. |
@alsar really, it works with 6.1.0 but not with 6.2.0? |
Yes, is looks that way. |
what os/version of firefox/chrome? I can't reproduce that.. |
Linux with Firefox 54 and Chromium 58. Maybe it's an Webpack problem. |
Getting same issue with
Just tested, it works if I use video.js like: "video.js": "6.1.0", |
What line does this error occur on? Can someone post a screenshot or stacktrace? (with unminified versions) |
This fix in a different plugin could be related: videojs/videojs-youtube@ad7275c#diff-41489607c076711cf7440b328fb7a065R37. |
Also tested on OSX with Chrome 60.0.3112.40, still cannot reproduce. |
@thijstriemstra I could get down to the root of the problem. video.js switched from https://github.com/videojs/video.js/blob/v6.1.0/src/js/video.js#L727 So the fix to this is as I understand it to switch to ES6 imports or to change the require to But I'm not really an expert regarding this subject. Explanations of this problem: |
Thanks for the research @alsar! There's also a webpack guide now but that doesn't mention anything related: https://github.com/videojs/video.js/blob/master/docs/guides/webpack.md Hmm, @gkatsev should we use |
@alsar I assume you (will) have the same issue with https://github.com/collab-project/videojs-wavesurfer when recording audio-only? |
Hm... when making the changes in 6.2.0 I tested to make sure that it works without requiring es6: https://github.com/videojs/videojs-bundler-sample |
Though, thinking about it some more, what version of webpack is used? We're outputting both CJS and ESM outputs and specify a |
This sounds confusing to me, can you elaborate?
@alsar what version are you using? |
A new release of this plugin (in short term) would pin video.js to anything < 6.2.0. |
Actually, I think it's exactly module field issue. Just remembered I had to do: https://github.com/videojs/videojs-bundler-sample/blob/master/src-es5/webpack.config.js#L9-L11
What I meant is that in videojs-bundler-sample, we require video.js directly in that project and we don't have a dependency also require video.js. It sounds to me like if any module isn't using ESM, things could cause an issue. :( |
wtf is ESM. sorry. |
it's ok. ESM is short for ES modules or Ecmascript modules. That is the |
I'm using Webpack 3 now. Had the same problem with version 2. Webpack with ES6 by default uses |
I will:
|
video.js will be using webpack 3.1.0 soon it looks like (when this travis build succeeds I suppose): videojs/video.js#4470 |
I opened videojs/video.js#4580 cc @gkatsev |
They committed a fix at videojs/video.js@5e23048. You can give that a try @alsar or wait till they release it. |
I tested it quickly with the newsest video.js release that ships with the fix. "video.js": "6.2.8",
"videojs-record": "1.7.0", but I get an error with webpack |
@gkatsev any idea? |
@perminder-klair can you give it a try with 6.2.8 or newer? |
I got the same "Error: plugin 'record' does not exist" with video.js 6.2.8 and videojs-record 1.7.0. I tried to low versions of video.js and videojs-record, but still get the same error. Do you guys know any workaround to make it workable for now? Thanks. |
@gavfu you tried video.js 6.1.0? |
@thijstriemstra �yes,I'm trying to use it in an electron app, with webpack 2.2.1。
|
@gavfu have you tried an older version of webpack, e.g. 1.x.x? I'm currently refactoring the plugins to ES6 and webpack build so this should get fixed eventually. |
@thijstriemstra Not yet, webpack 1.x is deprecated so I'd rather not to downgrade to it. May I know roughly when will the new version plugin be released? Meanwhile, if there are any workable combinations of video.js + videojs-record found, I'm willing to try that... |
Without webpack it works fine so your only option is to downgrade for now I think. |
I'll try and see, thanks thijstriemstra. :) |
@gavfu You can alias Use something like this in your webpack config: resolve: {
alias: {
'video.js': path.resolve(__dirname, '../../node_modules/video.js/dist/video.js')
}
} This is a quick workaround until this issue is resolved. |
Also see #167 for v2.0 (with better build system/ES6 etc) that will also resolve this ticket. |
- (videojs-)wavesurfer >= 2.0 (only) support - video.js >= 6.0 (only) support - new build system (using babel/browserify, with tests for webpack, fixes #149) - modules/es6 (fixes #167) - advanced video.js plugin - support for the video.js fluid option (fixes #166) - React example (fixes #171) - replace usage of URL.createObjectURL(stream) (fixes #169)
@alsar @gavfu @perminder-klair 2.0.0 PR was merged to master branch (containing a fix for this ticket), any help testing before I release 2.0.0 would be appreciated! |
@thijstriemstra Please tell me some solution for this. |
Description
Playing the recorded video doesn't work with video.js
6.0.0~6.2.0When you record a video and then press the play button noting happens.
Steps to reproduce
Install video.js ~6.2.0
Results
Expected
Should play the video.
Error output
Additional Information
versions
videojs
what version of videojs does this occur with?
video.js 6.2.0
videojs-record 1.6.1
browsers
what browser are affected?
Tested in Firefox and Chrome
OSes
what platforms (operating systems and devices) are affected?
Linux
The text was updated successfully, but these errors were encountered: