manelpb / videojs-qualityselector

Simple plugin that displays a dropdown with a list of possible videos based on its resolution, also changes the source when the user selects a desired option
MIT License
19 stars 12 forks source link

Webpack/babel/reactjs not working #2

Open MTRNord opened 7 years ago

MTRNord commented 7 years ago

I use a reactjs webpack setup. I import videojs via npm and get the following error:

C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:151
_videoJs2["default"].plugin('qualityselector', qualityselector);
                    ^
TypeError: Cannot read property 'plugin' of undefined
    at Object.<anonymous> (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:151:21)
    at Object.1 (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:158:4)
    at s (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:7:636)
    at e (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:7:807)
    at C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:7:825
    at a (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:7:88)
    at Object.<anonymous> (C:\Users\marce\Documents\dev\ff-stream-web\node_modules\videojs-qualityselector\dist\videojs-qualityselector.js:7:338)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
C:\Users\marce\Documents\dev\ff-stream-web\tools\runServer.js:73
          throw new Error(`Server terminated unexpectedly with code: ${code} signal: ${signal}`);
          ^

Error: Server terminated unexpectedly with code: 1 signal: null
    at ChildProcess.server.once (C:/Users/marce/Documents/dev/ff-stream-web/tools/runServer.js:53:17)
    at ChildProcess.g (events.js:286:16)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
error Command failed with exit code 1.
manelpb commented 6 years ago

Can you share your webpack config file? So I could test it better

MTRNord commented 6 years ago

Well give me some time I actually need to search that code first :) I will upload it to github and link it asap

MTRNord commented 6 years ago

@manelpb project is up at https://github.com/MTRNord/ff-stream-web (it is from a template as you see)