hensm / fx_cast

Chromecast Web Sender SDK implementation for Firefox
https://hensm.github.io/fx_cast/
MIT License
1.87k stars 63 forks source link

zoom (recording) support? #221

Closed jlevon closed 1 year ago

jlevon commented 2 years ago

version 0.2.0 - any chance of supporting Zoom recording casting?

hensm commented 2 years ago

I'm not too familiar with Zoom. Is this a Zoom feature or just screen mirroring?

If it's a Zoom feature, I can look into fixing any incompatibilities, but mirroring is much trickier to do properly because of API limitations and cross-platform differences. I think it's just straight up broken right now because of some canvas tainting issues in Firefox.

jlevon commented 2 years ago

I don't think it's screen mirroring. If it's useful I can probably record a small sample and share the link here.

hensm commented 2 years ago

That would be helpful, thanks.

jlevon commented 2 years ago

I tried but it's not easily doable to share due to policies on the pro account. The video itself is just an

hensm commented 2 years ago

I think you lost the end of that comment.

I managed to find a picture of a shared recording page and it looks like a regular video player. There is support for casting basic HTML5 media, though I'm guessing Zoom has some access restrictions that make that a non-starter. In any case, it's difficult to say without a live example.

jlevon commented 2 years ago

sorry, quoting issue. Yes, the page appears to be just a video element with an mp4 link. I don't know what would or wouldn't trigger the ability to cast, I know basically nothing about what that looks like.

hensm commented 2 years ago

Oh, that might work then. Try the "Cast..." menu item in the context menu on the video, might have to hold shift to bring up the browser context menu if they override it. It'll probably fail to stream on the chromecast if they restrict the direct mp4 link to authenticated accounts, though.

jlevon commented 2 years ago

TIL about the shift context menu! Unfortunately that doesn't work, it starts the chromecast connection but then nothing shows. Presumably cookie related like you mention, so I suppose there's nothing that can be done.

If I try "save video", it only saves a zero-byte HTML file too.

hensm commented 2 years ago

The only solution I can think of would be to capture a stream of the video and feed it into the screen mirroring connection. It's not really proper media casting since it's just a live stream of whatever the media element is doing, but probably better than nothing.

Currently re-working the mirroring stuff, so I might look into that. Chromecast receivers seem to have really bad WebRTC performance though, haven't fully investigated why.

hensm commented 1 year ago

Tested out that mirroring idea, same problem as canvas streams where there's no data on the other end of the connection. No idea why, couldn't figure it out. Used to work, but something changed on either Chrome or Firefox's end that broke it.

WIP code is here anyway in case there's ever a fix: https://github.com/hensm/fx_cast/commit/d6de5dae63d85579b2b6bea071fb0984d2d96564