clappr / clappr-chromecast-plugin

Chromecast support for clappr
BSD 3-Clause "New" or "Revised" License
38 stars 19 forks source link

plugin errors out for clappr v0.4.1+ #45

Open phloxic opened 3 years ago

phloxic commented 3 years ago

It still seems to work with 0.4.0, afterwards:

Uncaught TypeError: this.core is undefined
    get chromecast.js:53
    e chromecast.js:68
    value clappr-core.esm.js:6567
    value clappr-core.esm.js:6566
    value clappr-core.esm.js:6551
    value clappr-core.esm.js:7201
inside83 commented 3 years ago

I'm getting this Uncaught TypeError: Cannot read property 'options' of undefined at e.get (chromecast.js:53) at new e (chromecast.js:68) at clappr-core.esm.js:6659 at Array.forEach (<anonymous>) at n.value (clappr-core.esm.js:6658) at n.value (clappr-core.esm.js:6643) at n.value (clappr-core.esm.js:7294) at n.value (clappr-core.esm.js:7280) at new n (clappr-core.esm.js:7265) at _test_player_3df9941bdf88fec84ef6627a00b99fd4.html:13 Did you manage to solve it?

phloxic commented 3 years ago

@inside83 - yes, I get the same as you with v0.4.3.

inside83 commented 3 years ago

I managed to get it to work by copying and adjusting the demo. Main difference being this

    window.onload = function() {
        var player = new Clappr.Player({
        .
        .
        .
inside83 commented 3 years ago

@blacktrash I feel so stupid now. I was working with clappr and not @clappr/player branch. I too can now confirm that chromecast plugin does not, indeed, work with versions 0.4.1, 0.4.2 or 0.4.3.

I'm getting:

Uncaught TypeError: Cannot read property 'options' of undefined
    at e.get (chromecast.js:53)
    at new e (chromecast.js:68)
    at clappr-core.esm.js:6659
    at Array.forEach (<anonymous>)
    at n.value (clappr-core.esm.js:6658)
    at n.value (clappr-core.esm.js:6643)
    at n.value (clappr-core.esm.js:7294)
    at n.value (clappr-core.esm.js:7280)
    at new n (clappr-core.esm.js:7265)
    at window.onload (_test_player.html:55)

in 0.4.3 version

code0nwheels commented 3 years ago

Any update on this?

Cabji commented 1 week ago

Hi everyone, Ihavebeen playing around with clappr and clappr-chromecast today. I found that since v0.4.0 of clappr, addons are required to delcare their version support.

See https://github.com/clappr/clappr-core/releases/tag/0.4.0 for details, bullet point starting "Plugins are now required ..."

I am getting these errors in dev tools console:

from clappr-core.esm.js:3148 [warn][Loader] missing version information for chromecast

and (from tempermonkey 'userscript') Failed to load Chromecast plugin: TypeError: Cannot read properties of undefined (reading 'options') at e.get (chromecast.js:53:36) at new e (chromecast.js:68:30) at clappr-core.esm.js:6494:22 at Array.forEach () at e.value (clappr-core.esm.js:6493:31) at e.value (clappr-core.esm.js:6479:12) at e.value (clappr-core.esm.js:7075:37) at window.onload (userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:71:20) window.onload @ userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:74 load (anonymous) @ userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:42 (anonymous) @ userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:78 wt @ VM160:9 (anonymous) @ userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:1 window.fm2rnevf6.f @ userscript.html?name=Clappr-Chromecast-Injector.user.js&id=7ea50067-2420-4eda-a853-0d3d93a2a132:1 wt @ VM160:9 o.setMessageListener.o @ VM160:80 (anonymous) @ VM160:82 v @ VM160:77 yt @ VM157 content.js:8 f @ VM157 content.js:68 d @ VM157 content.js:71 (anonymous) @ VM157 content.js:71 wn @ VM157 content.js:14 send @ VM157 content.js:70 b @ VM157 content.js:55 (anonymous) @ VM157 content.js:56 (anonymous) @ VM157 content.js:1

i've no real idea of how to add this to the main code of the addon, hoping someone else that knows how sees this and its as simple as i hope to update it.