videojs-record: Upgrading to version 3.4.2 resulted in react build using webpack to throw `videojs is not defined`

Description

Upgrading to version 3.4.2 resulted in react build using webpack to throw videojs is not defined

Steps to reproduce

Use version 3.4.2 in react app then build just like in the documentation (https://github.com/collab-project/videojs-record/wiki/Webpack#webpack-config)

Results

Expected

Succesfully build

Actual

Throws an error when using react app

Error output

animation-display.js:34 Uncaught (in promise) ReferenceError: videojs is not defined at eval (animation-display.js:34) at Object../src/js/controls/animation-display.js (videojs.record.js?3966:147) at __webpack_require__ (videojs.record.js?3966:37) at eval (videojs.record.js:8) at Object../src/js/videojs.record.js (videojs.record.js?3966:339) at __webpack_require__ (videojs.record.js?3966:37) at eval (videojs.record.scss:1) at Object.0 (videojs.record.js?3966:350) at __webpack_require__ (videojs.record.js?3966:37) at eval (videojs.record.js?3966:101) at eval (videojs.record.js?3966:104) at webpackUniversalModuleDefinition (videojs.record.js?3966:10) at eval (videojs.record.js?3966:17)....

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

videojs-record version: 3.4.2 video.js version: 7.4.1

browsers

Chrome and Firefox tested

OSes

OSX

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Yes thanks so much and for this great module! Will read codes so I can help sometime.