In this quick post, I'll show you how to get the cast button in Firefox, enabling you to play media on your Chromecast or Android TV device straight from your non-Chrome browser.
The simpler method would be to install fx_cast add-on and the associated bridge. However, it only supports a handful of websites . The slightly-more complicated method will bump that number to over a thousand.
To achieve this, you're going to need a couple of cross-platform tools:
- Cast All The Things , a Python utility allowing you to cast from any URL supported by YouTube-DL (Example:
sudo apt install python3-pip && pip3 install catt).
- External Application Button Firefox Extension, which will allow us to add a custom button to Firefox's interface.
- A NodeJS client that the extension communicates with.
So in short, whenever you click on the button in Firefox, the extension will execute
catt command, which will cast media to your Chromecast/Android TV device.
This method works with any of the over 1000 websites supported by YouTube-DL, making it much more useful than the "official" method in Chrome. You don't have to rely on website owners to support casting their media — if YouTube-DL can download it, you can play it.
How to set it up
All you have to do is fill out the first three fields in External Application Button's preferences:
- Display Name: Cast
- Executable Name: full path to your
cattfile (on Linux-based system, you can execute
which cattto get this information)
This method only allows you to play the media. You won't be able to adjust the volume, pause the playback, or stop it completely. However, you can do that and much more from the terminal.
Full list of
catt commands (you can always reach this list with
catt add→ Add a video to the queue (YouTube only).
catt cast→ Send a video to a Chromecast for playing.
catt cast_site→ Cast any website to a Chromecast.
catt clear→ Clear the queue (YouTube only).
catt del_alias→ Delete the alias name of the selected device.
catt del_default→ Delete the default device.
catt ffwd→ Fastforward a video by TIME duration.
catt info→ Show complete information about the currently-playing video.
catt pause→ Pause a video.
catt play→ Resume a video after it has been paused.
catt play_toggle→ Toggle between playing and paused state.
catt remove→ Remove a video from the queue (YouTube only).
catt restore→ Return Chromecast to saved state.
catt rewind→ Rewind a video by TIME duration.
catt save→ Save the current state of the Chromecast for later use.
catt scan→ Scan the local network and show all Chromecasts and their IPs.
catt seek→ Seek the video to TIME position.
catt set_alias→ Set an alias name for the selected device.
catt set_default→ Set the selected device as default.
catt skip→ Skip to end of content.
catt status→ Show some information about the currently-playing video.
catt stop→ Stop playing.
catt volume→ Set the volume to LVL [0-100].
catt volumedown→ Turn down volume by a DELTA increment.
catt volumeup→ Turn up volume by a DELTA increment.
catt write_config→ Please use "set_default".
With these tools at your disposal, you can be confident that you can switch from Chrome to Firefox without losing control of your Chromecast-enabled device. If you haven't already, switch to Firefox !