Hacker News new | past | comments | ask | show | jobs | submit login
Chromecast Support for Firefox (hensm.github.io)
431 points by Benjamin_Dobell on Jan 23, 2019 | hide | past | favorite | 114 comments



This is fantastic as Chromecast support was one thing keeping me from dropping Chrome entiredly. I have a real love/hate relationship with Chromecast. I love its minimalism and simplicity - you just pick something you want to 'cast' and off you go. Whether there's a handoff to stream directly to the TV or it's directly casting from the device is seamless (unless there are bandwidth issues with the latter). Videostream[1] works really well for video files.

However, recently it's got a lot worse. For some reason universal notifications of casting devices stopped coming up on my Pixel. That meant navigating back into the casting app, which may have lost its connection, or using the Google Home app to switch something off.

Also the fact that some content providers put annoying blocks on their apps (not just Amazon - some broadcasters in the UK prevent you from streaming live content), and all that means is you need to cast your tab/screen instead of using app-handoff (see bandwidth issues, above).

It's so close to the perfect streaming device that the ways in which it fails hurt that much more.

[1]: https://chrome.google.com/webstore/detail/videostream-for-go...


I wrote a library for casting things, called catt:

https://github.com/skorokithakis/catt/

It supports youtube-dl so you can just do `catt cast https://www.youtube.com/watch?v=dQw4w9WgXcQ` and it will work.


This looks great. I was using the awful "Videostream for Google Chromecast" chrome app which I found was pretty buggy.

I'll give this a shot...


I've been using it a lot and it works very well, but it's a cli app. You can get a Chrome/Firefox app that gives you a button on your browser bar and sends the URL to whatever page you want to catt, that's a good way to cast anything youtube-dl supports to a Chromecast.


It amazes me that Google hasn't made a similar pieces of software for viewing x video format... The fact you have to use weird 3rd party stuff just to watch a movie you downloaded is strange to me.

It would instantly make Chromecast 10x more useful. But Google is focused with keeping it for streaming sites and browser pages only for some reason.

If they want to keep people using the stuff that has ads on it, then you have to make sure it works for every other scenario too. Otherwise people will replace it entirely.


Videostream is great.


Try the latest version of VLC, which now supports Chromecast. Works better for me


anyone know how to get VLC or any other app to cast downloaded movies to a chromecast that does not have access to the internet?

Is there a way to setup an ad-hoc WLAN between the phone/tab/pc and the chromecast and cast downloaded content?


Thank for writing it! I use catt and I love it!


Thank you, I'm glad you find it useful!


What kills me about Chromecast now is that you _have_ to log in to a Google Account to manage any Chromecast devices. Previously you could manage them without signing in if you wanted to.


chrome://cast works fine for me on MacOS/Chrome 71 without being signed in to a Google account.


You need to sign in to a Google account to configure one, though. I think that's OPs hangup.


The latest version of VLC (3.# iirc) now supports Chromecast, under video > renderer menu. Works much more smoothly than Videostream in my experience


It's nice but it doesn't support sending subtitles to the Chromecast device.


>Chromecast support was one thing keeping me from dropping Chrome entirely

For me it's that and the printing UX. I use a printer almost every week and often open Chrome just for that purpose.


For me, it's Google Translate integration.


This is not quite as convenient, but if you have DuckDuckGo as your default search engine, you can put !translate at the beginning of the URL and it will redirect you.

If you don't want to use a third party, open the large version of the Firefox bookmarks manager (ctrl+shift+b) and make a new bookmark with URL https://translate.google.com/#view=home&op=translate&sl=auto... and keyword "translate". Then you can just put the word "translate" before a URL and it will take you to Google Translate directly.


Did you try extensions and not like them? https://www.google.com/search?client=firefox-b-1&q=firefox+t...


That's funny.

I print a lot, and I hate how Chrome does it. I use Safari (not Firefox) though.

What do you like about it?


Chrome shows me a preview of what's going to be printed and lets me fit to page or scale. Firefox gives a print dialog that doesn't even have a preview button.


In Firefox, if you select "Print..." from the hamburger-menu (not Ctrl+P), you get an interface similar to the one in Chrome. Not sure why it's not the default. (Or File -> Print Preview)


The thing that drives me crazy about print in Firefox is that it is very difficult to turn off headers and footers. I don't want to leak information about my intranet or local filesystem structure (URL field) but the option for turning these off is to jump into dialog, a tab, and change six dropdowns. It doesn't even remember your selection. Are these ever even useful, or just a waste of ink and a security hole?


Wtf! It never crossed my mind that that "Print" might be different from the "Print" in the File menu, or the "Print" triggered by "Ctrl-P". Why?!


I honestly think that UI was pulled from microsoft word/office. It's been about a decade since I've used microsoft products so I'm willing to be wrong, but my understanding was that the print button was a shortcut to print document now, and the file print would take you to a print dialog


That's exactly right. Ctrl+P or clicking the button in the toolbar has always been a "quick print" dialog, while going File->Print brings up all the options. I remember some applications skipping the dialog altogether on the second click and using the settings from your last print session.


But that's not what Firefox does!

Ctrl-P: quick print

File -> Print: Same quick print

Hamburger -> Print: Print with preview!


Maybe it's OS dependent? On my Mac all 3 of those do the same thing


Maybe. I'm using Firefox Developer Edition 65.0b12 (64-bit) on Debian.


Thank you! User of FF since ever, never used that menu item, looks very very good with the preview.


macOS has a nice native print dialog, so Chrome's custom one is an annoyance when you were happy with the system one.

If you're on Windows though, man is Chrome's custom print dialog an improvement.


Using the latest Firefox on High Sierra, the print dialog for me doesn't include a preview where I can see what changes when I change options. But then, I get the same print dialog from Firefox's hamburger menu, so maybe there's something different about my machine.

I'm not near my Ubuntu (bionic beaver) laptop at the moment. Hopefully the hamburger menu print option on Firefox is better there. That's often the one I'm printing from since it's for home.


> For some reason universal notifications of casting devices stopped coming up on my Pixel

You should be able to re-enable them; if you want to enable them just on your phone, you can go into Settings, then the "Google" category, then "cast media controls" and then toggle the setting there. If you want to enable them for the chromecast as a whole to all phones, you can go into the Home app, click on the device, click the "settings" gear on the top right, and then toggle the "Let others control your cast media" setting.

(My roommate has a Chromecast, and I had to disable the notifications on my phone because I occasionally accidentally paused or unpaused what he was watching)


Dunno about the parent, but I have the same issue and none of these things have fixed it.


That sucks; I'm sorry I don't have any other ideas to help


You can use LocalCast to cast any video from your phone or internet.


I assume it has to re-encode the content. Can you get any decent quality this way, as my gut feeling is that you need beefy CPU/GPU to maintain the framerate?


VLC on iOS will transcode any content that the Chromecast can't handle. It does suck down some CPU, but my iPhone 6 keeps up with it just fine. I can pick just about any file from my SMB share and stream it to the Chromcast from my phone. Still a bit buggy though.


Localcast does not transcode. If you've got MP4 video then it works well, otherwise the chromecast can't display it. Videostream managed by the parent comment on the PC does transcode and so is much more accepting.


I never seen a video in the browser not displaying on my chromecast yet. The chromecast can read a lot of encoding...


I would guess that the chromecast supports the same set of video formats that the video tag in Chrome does - H264, VP8 etc..

If you download a video encoded differently (e.g. DivX) and then try to play it using localcast, you can get issues.


MP4 is a container, not a codec. You probably meant h264?


Yes, you are being more precise where I was being vague. What I suppose I meant was that in practice, if it has a ".mp4" extension then it'll usually work, and if it doesn't then it usually won't.


Phones have hardware encoders, the same ones they use for recording video in your camera app.


>Also the fact that some content providers put annoying blocks on their apps

It's not so much a block as the fact that adding cast support needs explicit buy-in from the content provider and whatever else that entails since it's not some open protocol. And that's generally OK. We more or less moved from flash to standard videos. We'll, hopefully, also move from all these rubbish dongles to something sensible.


What's universal notifications?


This is wonderful, its such a shame that the cast protocol is proprietary, the devices have the best UX I've seen from a multimedia dongle. No more faffing around with crap 10' UI's and cheap remote controls.


It was surprising to me, but our TV's remote control is able to pauze/play/stop the Chromecast.

That's generally faster than using your phone.

Edit: FWIW it's a Sony TV.


That's just another application of HDMI CEC, just like controlling a DVD/Bluray player with your TV remote.


Is it just me who is bothered how every OEM has some weird and wonderful CEC rebrand? Sony calls theirs Bravia Sync for example.


It's to trick people into thinking they can only buy a Sony Blu-ray player to go along with their Sony TV to go along their Sony soundbar. I'm glad everyone's stuff gets along for the most part but the fake vendor lock-in is lame.


That was no surprise for me, after using XBMC/Kodi for a few years with CEC support through HDMI. It was so natural to just pause/resume from the remote control that now I'm surprised people didn't know about this.


Yeah I use CEC to control our Apple TV. Never understood why everyone was complaining about the new Apple TV touch remote - we just use the TV remote. And our TV is like 8 years old now.


I think any TV with HDMI-CEC should work. it's also how it turns on your TV and switches to the correct input before hand.

as an aside I think Google home users leverage this to turn on their TV, which I think is pretty cool


Yes, that took me far too long to learn.


On a related note, there is also PipeCast, an attempt for a general library to cast to devices such as the Chromecast (but afaik not limited to it), from the people behind NewPipe

https://github.com/TeamNewPipe/PipeCast


It doesn't seem very active sadly, their dev branch is even older than master, and master hasn't been updated in almost a year.

According to the documentation it only supports discovery anyway so, is it abandon-ware?


There is an open standard alternative to Chromecast, known as Miracast. I wonder if this supports it.


Miracast is not an alternative to Chromecast (officially called Google Cast nowadays). Miracast is a standard for wireless screen mirroring. If you play a Netflix show on your Miracast device, it plays on your phone, which then subsequently mirrors its own screen it to your Miracast display. This mirroring includes your entire phone UI and stuff like incoming notifications. At best, Miracast is an open standard alternative to Apple Airplay.

Chromecast is a standard for remote controlling video and audio devices. When you play a Netflix stream on a Chromecast display, you send it a video URL that the Chromecast dongle/box/built-in device plays independently. You can then pause/stop/rewind/fast-forward it from multiple devices in your network, none of which are playing the video themselves. Chromecast is immensely more useful and practical as a result. As a small detail, Chromecast additionally supports display mirroring but that's not why so many people use it.

There are no open alternatives for Chromecast. Some Kodi remote apps create a similar experience to stream video to Kodi. But the key of Chromecast's success is not its technical sophistication, but the fact that it has been adopted by a huge number of media services in their Android/iOS client apps. The reason for this is that it's (1) built using an easily available SDK from Google and (2) Chromecast devices enforce DRM, it's not possible (anymore) to cast to uncertified third party devices.


I thought DLNA was relatively open? That allows cross-network streaming + control of media players? Roku + PS3 implement this, and probably many more?

Though, figuring out which devices support which codecs has been an adventure ...


Ah yes, I thought DLNA was just for streaming but it also supports a "Digital Media Controller" spec for remote control devices that don't stream. So I suppose that ís an open Chromecast alternative.


Yeah well, open standards don't give any single company control.


> it's not possible (anymore) to cast to uncertified third party devices

That's my #1 gripe with it. The protocol is pretty freely available, but at the end there's a pretty strict authentication process requiring device keys stored in a secure enclave (is there a way of getting them out of there?).

One way to go would be shipping a modified version of the library not enforcing authentication, paving the way for unapproved devices (implementing the protocol is seemingly easy) - but it will likely not be adopted very widely.

Getting real Google Cast reception on your own device (I don't want to buy another hardware thing for something that is entirely software and that won't allow my custom software to run) will essentially involve breaking DRM.


I have a 1st gen chromecast which has root. It's been sitting in a wardrobe, but I suppose a clone could be made with some reverse engineering effort. I don't think the 1st gen ones had secure enclaves. They are pretty old at this point.


As far as I remember most apps (most prominent exception being YouTube) don't support that version of Chromecast anymore.


They should work, provided you let it update the software. However, the scene around rooting chromecasts died and I don't think you will retain root if you let it update. So you'll have to put it more effort to regain root, but in theory it should be possible.


Sounds like another cool project I wish I had time for.


DLNA handled media streaming.

Nevertheless, you'd have to ask Google why they effectively killed Miracast - it was supported in Android 4.2 and 5, then mysteriously removed in Android 6.

My old phone supported screen mirroring to my TV, I consider it a regression that my current one doesn't and I'd have to buy a dongle.


Under Android it's usually only one more press to "share" the media to something and that something can be a little helper app that talks to a Chromecast alternative (e.g. Kodi). So it is a worse user experience, but it's not totally dead.


Worth remembering that VLC 3 also does Chromecast. Different use-case I know but it is very handy.


They say that but I have never gotten it to actually find my chromecast. My goto for casting is now https://github.com/keredson/gnomecast which just works.


If you're using Linux it might be good to check if it's compiled in correctly. I use VLC with Chromecast on Android, it works well enough.


That's what I use to cast Youtube video.

CTRL+N -> Paste -> Enter

Good to go


VLC can stream Youtube videos??


Yup! Just "open network stream" (ctrl-n) and paste the URL in. It can even save or convert them.


Shamefully it doesn't support subtitles yet.


This is awesome. Chromecast is the main reason i still have chrome installed. I have to open up chrome, just for casting. At work, all of our conference rooms have Chromecasts in them, because it's the only cross platform (including linux), cable free solution. And is often even easier to use then hdmi because you don't have to mess with display settings. I would often open chrome, share the entire desktop, then go back to Firefox. This will be nice for my workflow.


Chromecast is Embrace/Extend/Extinguish at work. What happened to open streaming protocols?


Now can we please have chromecast support in Amazon prime app...

I can cast basically anything from my phone to my TV but not amazon prime. I need to use the Prime app on the TV.


Google and Amazon aren't friends, so their apps can't work together. Hooray for proprietary protocols!


Amazon is the reason why you can't cast their video on Chromecast. They have done everything in their power to thwart Google including taking down Chromecast for sale on the Amazon website.


Somehow Amazon and Apple ended up kissing and making up, so there is a chance...


This is the primary reason I'm not going to renew my Prime account.


What is Amazon's beef with Google?


I'm a little behind on the drama but Google killed youtube for firetv, amazon retaliated by dropping google home products.

Now it seems like they are feuding over nest like things too. Very interesting.


I always thought this was the other way around: Amazon dropped Google Home products in favor of their Alexa, so Google killed YouTube on FireTV to damage Amazon.

To be honest that was the reason for me to get a Playstation 4, so I could watch YouTube on my TV again. (And obviously for playing some games...)


I am using my old (physically damaged but functional) laptop behind a TV for this and more.

Works great with everything and you have full control of the content. Add a wireless keyboard (with trackpad) and you are done.

Games? Use Geforce now.


And another advantage of this approach is it allows you to lobotomize your "smart TV" so it can no longer track everything you say and do.


This is a good setup, too. My brother is using something like this and is quite happy with it.


> Amazon dropped Google Home products in favor of their Alexa

There was also Google breaking the ability for Amazon products to receive Chromecast streams.


Total "eye for an eye"-thing going on there, yeah.


It was definitely the other way round.


Amazing that the bookshop and search engine are fighting over how we watch TV.


You can't even cast Amazon Prime on Chromecast :(


I remember Chromecast was the only reason I still had to switch back from FF to Chrome when they released "new firefox". If this goes it would be a gamechanger.


Awesome. Stuff like this gives me hope of a Firefox renaissance where people don't regard it as something outdated that you better replace with Chrome but a real and viable alternative.


FYI, you can use Chromium instead of Chrome if you only have it installed for the Chromecast support. Chromium is open source and should be less Google-infested.

You can cast your entire desktop with Chromium and still use Firefox for browsing. I think it works well for anything besides heavy video streaming, because that probably requires native Firefox support that the linked project provides.


Does anyone know of any way of handling AirPlay from Firefox? All I see is a ticket opened 4 years ago with little to no activity: https://bugzilla.mozilla.org/show_bug.cgi?id=1171706


Well the method by which this Chromecast extension works is using the API for communicating with a desktop application.

It should be possible to do a similar thing for airplay.

Someone needs to find a library that can act as a Airplay Client and then build that into an extension

A quick Google shows this list of clients:

https://github.com/jamesdlow/open-airplay/blob/master/README...


As far as I know, there is no open source client that can do the encryption handshake required to send an AirPlay mirroring stream.


My understanding is that everytime someone figures out how to open up airplay, apple goes and "fixes" it.


VLC is on-track to add AirPlay support soon, so at least there will be an open source library they could use.


Makes me wondering if there are ways to turn any device as a chromecast sink.


No, it's locked down.


we need a video netcat.. netcast


Perhaps some kind of Video LAN server and Client


I hate that Firefox went all-in with WebExtensions and removed XUL/XPCOM. Having to download another sidecar app alongside your extension is crappy UX.


Kind of misleading as it requires a native application (the bridge).


That is not misleading at all. Many add-ons require such companion apps. Any add-on that wants to access the filesystem in a more broad way or needs to use raw sockets will need this type of native app to be present. There is a protocol for talking between the native app and the WebExtension called "Native Messaging":

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/Web...

Native Messaging allow an Add-on to launch a native application that follows its rules. Basically, the add-on needs to ask for nativeMessaging permission, as this one does in:

https://github.com/hensm/fx_cast/blob/master/ext/src/manifes...

And the native application needs to whitelist the add-on as someone who can call them, as seen in:

https://github.com/hensm/fx_cast/blob/master/app/bin/build.j...

You can see similar setups in many of the WebExtensions that are exploring the p2p/dweb/decentralization space.

PS: I am not the author, I checked the source and knew what to look for.


It would only be misleading if they didn't provide the bridge. They do, however, with links to multiple platforms right below the link to the extension.


This is cool, although Firefox for Android can already cast video to nearby Chromecasts. If I've got something in a tab that I want to cast, I usually send the tab to my phone first, then cast it.

I suppose this would be useful if you've only got an iPhone.


> Firefox for Android can already cast video to nearby Chromecast

This is less about Firefox itself casting video, and more about Android providing APIs to Chromecast. It's still Google doing the casting at the Android OS level; Firefox just leverages that.

I know this is a nitpick, but it's important to understand the distinction with a closed protocol like this is that Google is the gatekeeper.

The above linked Firefox addon is: highly unstable, made through painstaking reverse engineering, and has limited support (e.g. no Youtube). It's brilliant, comendable work, but I wonder how sustainable.


This is for the desktop.

Firefox for Android can support it by calling Android's Chromecast support. They can release the code for calling those libraries.

Firefox for desktop can't implement the same since the OS behind it doesn't have such support.

This project requires you to install a bridge on the OS side and an add-on for calling it. It removes the need for Chrome for the users who already use Firefox as a primary browser.


Or any other non-Android phone. Or an older Android that doesn't support Chromecast.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: