flowplayer / flowplayer-hlsjs

Flowplayer HLS.js plugin
MIT License
81 stars 35 forks source link

webpack builds report errors in debug mode #23

Closed phloxic closed 8 years ago

phloxic commented 8 years ago

In Chrome, with hlsjs.debug turned on:

[error] > error while initializing DemuxerWorker, fallback on DemuxerInline

This does not happen when a copy of dist/hls.min.js is loaded.

@nnarhinen - for the moment I will revert again to concatenating hls.min.js into the packed flowplayer.hlsjs.min.js

phloxic commented 8 years ago

Additionally the error depends on node and/or npm version used:

phloxic commented 8 years ago

See also: https://github.com/flowplayer/work/issues/1173#issuecomment-185645968

phloxic commented 8 years ago

Until solved keep webpack build in separate branch.

phloxic commented 8 years ago

Additionally: With node v5.6.0 / npm v3.6.0 the undefined Hls prevents the plugin from working at all, the error is not confined to hlsjs.debug: true.

nnarhinen commented 8 years ago

The error for isSupported is because we are doing require('hls.js')['default'] which is not needed anymore. Pushed a commit for this

nnarhinen commented 8 years ago

The other error is already reported in dailymotion/hls.js#187 and dailymotion/hls.js#188

phloxic commented 8 years ago

Sorry, that was a desperate leftover from one of my tests before I split out the feature/webpack branch again. However, the issue with hlsjs.debug '[error] > error while initializing DemuxerWorker, fallback on DemuxerInline' persists with node v4.3.1 / npm v2.14.12 - I'll check whether the other ones were already caused by re-adding .default for testing. It certainly doesn't look 100% reliable.

nnarhinen commented 8 years ago

As I said: the [error] > error while initializing DemuxerWorker, fallback on DemuxerInline' are dailymotion/hls.js#187 and dailymotion/hls.js#188

nnarhinen commented 8 years ago

I'll see if it's something we can fix

nnarhinen commented 8 years ago

Please try again

phloxic commented 8 years ago

I now loaded

 "dependencies": {                                                                                                     
    "hls.js": "git://github.com/dailymotion/hls.js#workerify"                                                           
  }

And, as I'm currently testing node v5.6.0 there's the same problem with Hls.isSupported not being a function. Downgrading node again because I need it at 4.x for www

phloxic commented 8 years ago

Will try your patch now.

phloxic commented 8 years ago

@nnarhinen - your patch works with node v5.6.0 in a quick test - Hls.isSupported does not error out anymore. Now for node v4.

phloxic commented 8 years ago

@nnarhinen - seems to work with node v4 too. Great. Running some more tests. Then this can be merged.

phloxic commented 8 years ago

Looking good. Thanks a lot @nnarhinen.