videojs / videojs-contrib-hls

HLS library for video.js
http://videojs.github.io/videojs-contrib-hls/
Other
2.84k stars 792 forks source link

videojs-contrib-hls + Parcel fails #1403

Closed jonlambert closed 6 years ago

jonlambert commented 6 years ago

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

Platforms

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

Other Plugins

n/a

Other JavaScript

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

forbesjo commented 6 years ago

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