clappr / clappr-level-selector-plugin

Clappr Level Selector Plugin
MIT License
76 stars 56 forks source link

External undefined plugin on core array #65

Closed navjotss closed 6 years ago

navjotss commented 6 years ago

Hi Team,

I compiled the level sector code on my local machine (ubuntu 16.0 ) with node 9.5.0. After made change in web config file according to the latest version(all webpack.config.js,package.json and levelsector.js file are added in code folder). only level-selector.js file generated in dist file. I used it with clappr.js file and got below error. Tried console.log(JSON.stringify(externalPlugins));

Got this response {"0":{"core":[{"default":{}}]},"1":"1"}

After that i use level selector cdn link Got this response {"0":{"core":[null]},"1":"1"} code.zip

clappr.js:11422 Uncaught ReferenceError: external undefined plugin on core array
    at clappr.js:11422
    at Array.forEach (<anonymous>)
    at clappr.js:11420
    at Array.forEach (<anonymous>)
    at Loader.validateExternalPluginsType (clappr.js:11419)
    at new Loader (clappr.js:11349)
    at Player.get (clappr.js:6763)
    at CoreFactory.get (clappr.js:8764)
    at CoreFactory.create (clappr.js:8793)
    at Player.attachTo (clappr.js:7007)
leandromoreira commented 6 years ago

how are you configuring the clappr? can you paste it here?

// something similar to 
Clappr.new({
 // config
})
navjotss commented 6 years ago
window.onload = function() {
  var player = new Clappr.Player({
    source: 'http://www.streambox.fr/playlists/test_001/stream.m3u8',
    parentId: '#player-wrapper',

    plugins: {
      core: [LevelSelector]
    },

    width: 640, height: 360,
    hideMediaControl: false,
    autoPlay: true
  });
}
leandromoreira commented 6 years ago

Please, try:

    plugins: [LevelSelector],
navjotss commented 6 years ago

Using this player start working but level selector not shown in player. I tried compile code again and it start working for that we need to update some code in node_modules folder. node-sass version because it is not compatible with ubuntu 16 64bit. true-case-path folder.

anesuc commented 2 years ago

Sorry to bump this but some plugins require to be in core, so there ends up being a conflict. Any solutions to this?