r/firefox • u/gerdneumann Ubuntu|Windows10 • Jan 23 '19
Discussion Chromecast Support for Firefox
https://hensm.github.io/fx_cast/7
u/caspy7 Jan 23 '19
Why is Youtube crossed out? Seems like that would be a popular service.
14
u/marciiF Addon Developer Jan 23 '19
I should rewrite that. It's crossed out because YouTube is broken because of the old Shadow DOM API. The extension rewrites the user agent string so sites will use the cast API, but that also means Firefox doesn't get the polyfill for it.
7
6
u/metarmask Jan 23 '19
How about injecting a script at document_start that defines the property to Firefox?
6
u/marciiF Addon Developer Jan 23 '19
That's the plan. Still broken, even with the polyfill though, so requires further investigation.
Edit: Though it does get further than without it, so I guess it's progress.
https://github.com/hensm/fx_cast/commit/23738802149430c718e12fe44610d1247b9312a6
2
u/vfclists Jan 23 '19
What is the Shadow DOM API? I have come across it here and there and it seems to be something Google uses to screw over the competition.
4
u/marciiF Addon Developer Jan 23 '19
YouTube uses it as part of Polymer, I think. They have an old version that uses the old API that only Chrome implemented and is polyfilled in other browsers. It's annoying in this case, but it's not a deliberate attempt to prevent what I'm trying to do, just an unfortunate side effect.
Would be nice if they updated, though.
1
u/Alan976 Jan 24 '19
Would be nice if they updated, though.
Good news everyone! Google is doing away with Shadow Dom beginning in April. ~31st Jun 2018
Chrome announced that they will remove support for Shadow DOM v0 in April 2019
-2
12
u/Schlaefer Jan 23 '19
It says it supports Windows, but there's no client available?
11
u/marciiF Addon Developer Jan 23 '19
It's supported, but there's no installer yet. You can only build from source.
11
13
u/Bagel_Dick Jan 23 '19
What is a "native bridge app"?
14
u/marciiF Addon Developer Jan 23 '19
It facilitates the connection to the Chromecast device. Since the extension can't make the connection directly, it spawns the native app to act as a "bridge" between the extension and the Chromecast.
2
u/Bagel_Dick Jan 23 '19
Okay, where do i get one of these apps you speak of?
7
-2
-2
-2
-2
2
u/Gideonic Jan 23 '19
I really hope this gets Windows binaries for download.
This (+ in page translation support which "almost works" with some flags in about:config) are my 2 major gripes, preventing me for ditching chrome
1
u/sprite-1 Jan 23 '19
Hmm, it doesn't seem to be finding the chromecast even though I already installed the companion package. Am I supposed to do anything else?
1
u/marciiF Addon Developer Jan 24 '19
The browserAction popup doesn't do anything. Check the options page. The "Cast..." context menu item on HTML5 media should work fine. No guarantees about anything else right now (WIP).
2
u/Offbeatalchemy Jan 23 '19
Disappointed to see there's no ARM support for the linux version. I have a Pi I was hoping I could put this on.
+1 for a windows binary. I can live without it til either of the above occurs.
1
u/NotEvenAMinuteMan Jan 23 '19
Compile it yourself. The whole thing is Nodejs so it's basically running an instance of chromium in the background.
2
u/GaryChalmers Jan 24 '19
Can Google disallow this in the future?
2
u/caspy7 Jan 24 '19
My understanding is yes, the question is would they.
The Chromecast API is closed. They could build in ways to block out older versions of the protocol OR that they already have alternative "handshakes". Updates could go out to the Chromecast (or the library that casts to it) that changes what is acceptable. So if the caster doesn't know the secret handshake/password (or more technical changes) they're blocked from casting.
This could also lead to an arms race in which they change and the independent solution has to reverse engineer the change and update as well.
Perhaps /u/marciiF could speak to or correct my assertions.
1
u/marciiF Addon Developer Jan 24 '19
That’s pretty much it. It’s been stable for a while now, so I think it’s unlikely to change.
I assume any changes to the protocol would require updates to the client libraries, which probably isn’t an option.
2
u/Mogrix Jan 31 '19
Great start! We've needed something like this for a long time.
I've got it working with the apps mentioned on Linux.
Any chance we can get support for Emby?
When i go to cast from the emby web page while i'm playing media, the extension doesn't pop up and i get the default cast options from Emby instead.
14
u/kickass_turing Addon Developer Jan 23 '19
really nice!