m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.96k stars 449 forks source link

Chromecast Support #209

Open spencerhughes opened 1 year ago

spencerhughes commented 1 year ago

Is it possible to cast the video feed to Chromecast natively? I was hoping to use Neko to watch movies with friends, but many of my clients don't have much other than a Chromecast hooked up to their TVs, and aren't very technically savvy. I don't know how big of an ask this is, but I appreciate your consideration.

m1k1o commented 1 year ago

This must be somehow implemented on the client, since server might be on a different network (VPS ). Don't know what support does have Chromecast for WebRTC or what would be the API.

Maybe sharing directly a Tab would work? https://support.google.com/chromecast/answer/3228332?hl=en&co=GENIE.Platform%3DDesktop

spencerhughes commented 1 year ago

So there are two main issues with casting the tab rather than the video itself:

  1. Casting a tab is only possible in Chrome, not in other browsers.
  2. Casting a tab requires the casting device to stream to the Chromecast, so I believe it can't leave the wifi network/turn off/etc. (I'm not 100% sure about this one)

I believe Chromecast does support WebRTC, but I could be wrong. I googled around a bit and found this, might be helpful: https://github.com/shokimble/cast-canvas

I can also take a look and see what I can get working if you're open to pull requests :)

m1k1o commented 1 year ago

Yes, PR would be great.

I tried earlier (maybe a year ago) opening page directly on Chromecast using catt and therefore implemented ?cast for neko (it hides chat and all other controls, leaves only video on fullscreen) but my chromecast could not really handle the page. It had huge delay.