videojs/videojs-contrib-hls

videojs-contrib-hls + Parcel fails

jonlambert opened this issue · 1 comments

Description

Attempting to use videojs-contrib-hls with Parcel fails.

Sources

Is a certain source or a certain segment affected? please provide a public (accesible over the internet) link to it below.

Steps to reproduce

  1. Clone https://github.com/jonlambert/hls-videojs-parcel-issue
  2. cd into directory
  3. Run yarn install
  4. Run ./node_modules/parcel/bin/parcel.js index.html
  5. Open browser, see error in console.

Results

Expected

Plugin fails with error.

Error output

Uncaught ReferenceError: __webpack_modules__ is not defined
    at Object.parcelRequire.62 (index.js:80)
    at newRequire (repro.fb7c94d9.js:48)
    at localRequire (repro.fb7c94d9.js:54)
    at Object.parcelRequire.97.global/window (flash-source-buffer.js:46)
    at newRequire (repro.fb7c94d9.js:48)
    at localRequire (repro.fb7c94d9.js:54)
    at Object.parcelRequire.65.global/document (flash-media-source.js:28)
    at newRequire (repro.fb7c94d9.js:48)
    at localRequire (repro.fb7c94d9.js:54)
    at Object.parcelRequire.29.global/window (videojs-contrib-media-sources.js:16)

Additional Information

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

videojs-contrib-hls version

what version of videojs-contrib-hls does this occur with?
videojs-contrib-hls 5.14.1

videojs version

what version of videojs does this occur with?
n/a

Browsers

what browsers are affected? please include browser and version for each

  • Chrome
  • Possibly others...

Platforms

what platforms are affected? please include operating system and version or device and version for each

  • macOS
  • Possibly others...

Other Plugins

n/a

Other JavaScript

are you using any other javascript libraries or frameworks on the page? if so please list them below.

  • Parcel

I would suggest using https://github.com/videojs/http-streaming (if using videojs 6.x) or just videojs 7 alone, those are more compatible with webpack