Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: Cannot set property 'Class' of undefined at class.js:5 #102

Open
KevinBoeing opened this issue Jul 2, 2021 · 3 comments

Comments

@KevinBoeing
Copy link

Hey I am working on a PWA with Angular Version 10 and Ionic.
When I am trying to implement the ChromeCast Plugin I receive the following Error

image

Does anybody know how to fix that error?
I did everything as in the ReadMe.

@dwassing
Copy link

dwassing commented Jul 2, 2021

Sounds like the plugin cannot find your player instance. Likely something is wrong with your initialization. Can you provide your code or a reduced example?

@FerralBunny
Copy link

FerralBunny commented Feb 2, 2022

Hello, I actually just came across this same exact error but I'm using ReactJs16 and Webpack4.

Installed with

yarn add @silvermine/videojs-chromecast
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>

Imported with

import videojs from 'video.js';
import chromecast from '@silvermine/videojs-chromecast';
import '@silvermine/videojs-chromecast/dist/silvermine-videojs-chromecast.css';

Initialised with

chromecast(videojs);

I believe this error comes from the class.extend package. Locally, I updated @silvermine/videojs-chromecast to use an almost identical package https://www.npmjs.com/package/class-extend and I believe the problem was resolved.

However, I see there is already a PR to upgrade @silvermine/videojs-chromecast to use ES6 Classes, removing the need for class.extend altogether. Hopefully this PR will be released soon.

I hope this helps.

Kind regards

@kontrollanten
Copy link
Contributor

class.extend is removed in the latest master. Can you try the latest master and see if it works?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants