silvermine / videojs-quality-selector

MIT License
180 stars 55 forks source link

Error thrown when using es6 import #67

Closed mberende closed 9 months ago

mberende commented 3 years ago

using the latest version of videojs and latest version of the plugin. my code looks like this

import videojs from 'video.js'; import QualitySelector from "@silvermine/videojs-quality-selector"; QualitySelector(videojs);

The error I am getting:

class.js:5 Uncaught TypeError: Cannot set property 'Class' of undefined at class.js:5 at Object../node_modules/class.extend/lib/class.js (class.js:62) at webpack_require__ (bootstrap:19) at Object../node_modules/@silvermine/videojs-quality-selector/src/js/util/SafeSeek.js (SafeSeek.js:3) at webpack_require (bootstrap:19) at Object../node_modules/@silvermine/videojs-quality-selector/src/js/index.js (index.js:7) at __webpack_require (bootstrap:19) ......

axten commented 3 years ago

Found out that the problem is strict mode. atm this plugin cannot be used when using your bundle as an es6+ module in the browser ( Githubissues.

  • Githubissues is a development platform for aggregating issues.