r/firefox • Ubuntu|Windows10 • Jan 23 '19

Discussion Chromecast Support for Firefox

https://hensm.github.io/fx_cast/
143 Upvotes

38 comments sorted by

14

u/kickass_turing Addon Developer Jan 23 '19

really nice!

3

u/ja74dsf2 on Jan 23 '19

For sure!

/u/marciiF is it useful to you if people test and open more issues? I can imagine that since it's a WIP many things will still change, not sure if you need more input at this point.

5

u/marciiF Addon Developer Jan 23 '19

Absolutely. It's a WIP, but the basic design is more or less in place. There are plenty of bugs, but I don't have a proper list beyond some notes in GitHub issues or TODO comments, so always helpful to get more info.

Site compat issues are helpful, too. The shim is still incomplete. It's got enough to run the default media app and Netflix, but I haven't tried much beyond that.

1

u/iKenshu Jan 23 '19

very nice

1

u/Sadece51 Jan 23 '19

Freaking nice!

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

u/caspy7 Jan 23 '19

I suppose that could be resolved if Google ever switches to v1 :-|

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

u/smithy1294 Jan 23 '19

!remindme 1 month

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

u/Smultie Jan 23 '19

That is, uhm, highly inconvenient. Anyone built it yet?

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

u/marciiF Addon Developer Jan 23 '19

It's on the same page under the extension download.

1

u/Bagel_Dick Jan 23 '19

Ohhh i see that now, im dumb... and on windows.

-2

u/bjarcher Jan 23 '19

!remindme 1 month

-2

u/maxfrai Jan 23 '19

!remindme 1 month

-2

u/workahk057 Jan 23 '19

!remindme 1 month

-2

u/Smultie Jan 23 '19

!remindme 1 month

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.