silvermine / videojs-chromecast

MIT License
148 stars 75 forks source link

Not working with latest versions? #87

Open izupet opened 3 years ago

izupet commented 3 years ago

I try to enable chromecast plugin but seems like it does not work or I am missing something. Here is JSFiddle

It does not work if I load plugin through player options neither if I load it dynamically. But player's activePlugins_ property shows like plugin is successfully registered.

ziddey commented 3 years ago

Need to follow the instructions more closely.

  1. You're missing the cast framework:
    <script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
  2. You didn't define the techOrder:
    techOrder: ['chromecast', 'html5']

Also it won't work in jsfiddle's sandbox:

Uncaught DOMException: Failed to construct 'PresentationRequest': The document is sandboxed and lacks the 'allow-presentation' flag.

chrome_x1Uw5j2zQp

izupet commented 3 years ago

I added missing script and defined the techOrder as suggested but I still can't make it work - JSFiddle - I tried this JSFiddle example on real server without success.

ziddey commented 3 years ago

copied your fiddle and it works fine on my end. only issue I'm seeing is that after casting, I need to hit play again to start playback on the chromecast.

AltFreq07 commented 1 year ago

I added missing script and defined the techOrder as suggested but I still can't make it work - JSFiddle - I tried this JSFiddle example on real server without success.

Manage to get this working? Currently having a similar issue