videojs / videojs-contrib-quality-levels

Other
154 stars 52 forks source link

TypeError: Cannot read properties of undefined (reading 'merge') #145

Closed otnansirk closed 1 year ago

otnansirk commented 1 year ago

Description

How to fix this error undefined merge after I install and import this package on my videojs project ?

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. Install package videojs-contrib-quality-levels
  2. Import on component witch import videojs
  3. And then an error will appear

Results

Expected

Want to show quality selector

Actual

TypeError: Cannot read properties of undefined (reading 'merge')

Error output

Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'merge')

Call Stack Player.qualityLevels node_modules/videojs-contrib-quality-levels/dist/videojs-contrib-quality-levels.js (303:0) Player.basicPluginWrapper [as qualityLevels] nodemodules/video.js/dist/video.es.js (27331:0) VhsHandler.setupQualityLevels node_modules/video.js/dist/video.es.js (54516:0) VhsHandler.src node_modules/video.js/dist/video.es.js (54410:0) Object.handleSource node_modules/video.js/dist/video.es.js (54697:0) _Tech.setSource node_modules/video.js/dist/video.es.js (9828:0) new Html5 nodemodules/video.js/dist/video.es.js (19853:0) Player.loadTech nodemodules/video.js/dist/video.es.js (23020:0) Player.src node_modules/video.js/dist/video.es.js (25460:0)

versions

videojs

"video.js": "^7.18.1",
"videojs-contrib-quality-levels": "^4.0.0",

browsers

All browser show error

OSes

All affected

mister-ben commented 1 year ago

videojs-contrib-quality-levels 4 supports does not support Video.js 7. See changelog. You can either update Video.js to 8, or downgrade quality-levels to ^3.

otnansirk commented 1 year ago

Thanks @mister-ben solved with your suggestion