Firefox extension that implements the Chrome sender API and exposes it to web apps to enable cast support. Communication with receiver devices is handled by a native application (bridge). Check the implementation notes for more info.
Note: No full public release yet! Pre-release beta version is incomplete and likely buggy.
Note: Currently supported on macOS, Windows and Linux.
Install the Firefox extension (from within Firefox) and companion bridge application via the installer packages. These are two separate downloads that can be found on the website or in the GitHub releases section.
-
Arch Linux (AUR) - https://aur.archlinux.org/packages/fx_cast/
yay -S fx_cast
Most websites won't load the cast API unless the browser presents itself as Chrome. The extension includes a whitelist for sites that should be given a Chrome-compatible user agent string. Whitelist entries are specified as match patterns. To whitelist all sites, add <all_urls>
to the whitelist, though this is not recommended and could cause breakage on random sites.
Whitelisted sites should then display a cast button as in Chrome, provided they're compatible with the extension/Firefox.
The Cast...
menu item is visible in the page, toolbar button and tools menus, and provides access to the receiver selector at any time to stop an existing session or start screen mirroring or file casting.
HTML5 media elements also have a different Cast...
context menu item that triggers the media sender, though this won't work for media using EME/MSE.
- Node.js <= 13.x
git clone https://github.com/hensm/fx_cast.git
cd fx_cast
npm install
npm run build
npm run install-manifest
This will build the ext and app, outputting to dist/
:
-
... contains the bridge executable and manifest with the path pointing that executable. The
install-manifest
script copies this manifest to the proper location (or adds its current location to the registry on Windows). - ... contains the unpacked extension.
Watching ext changes:
npm run watch --prefix ./ext
Launch Firefox watch for file changes (run in separate terminal):
npm run start --prefix ./ext
--package
Should package with web-ext.--watch
Should run webpack in watch mode.--packageType
"<appID>"
Provide an alternative default mirroring receiver app ID.--mode
"production"
,"development"
Run webpack in a different mode. Defaults to"development"
unless combined with--package
.
dpkg-deb
(if building .deb packages)rpmbuild
(if building .rpm packages)makensis
(if building Windows installer packages)- macOS (if building macOS installer packages)
- Xcode (optional if not building native receiver selector)
Note: macOS packages can only be built on macOS.
brew install dpkg rpm makensis
sudo apt install dpkg rpm nsis
sudo dnf install dpkg rpm-build mingw-nsis
sudo pacman -S dpkg
yay -S rpm-org nsis
Build and package extension and bridge application for current platform:
npm run package
-
... contains the installer package:
fx_cast_bridge-<version>-<arch>.(pkg|deb|rpm|exe)
-
... contains the built extension archive:
fx_cast-<version>.xpi
.
Packaging examples:
npm run package:ext # Packaging extension
npm run package:app # Packaging bridge application
# Linux platforms
npm run package:app -- -- --platform=linux --packageType=deb
npm run package:app -- -- --platform=linux --packageType=rpm
# Windows
npm run package:app -- -- --platform=win32
# macOS
npm run package:app -- -- --platform=darwin
--platform
"win32"
,"darwin"
,"linux"
Select the platform to build for. Defaults to current platform.--arch
"x64"
,"x86"
Select platform arch to build for. Defaults to current platform arch.--packageType
"deb"
,"rpm"
Select the package type. Defaults todeb
. Only relevant when building for Linux.--skipNativeBuilds
macOS only. Skips native receiver selector build.
Testing requires geckodriver (or chromedriver for Chrome parity testing). See selenium-webdriver installation instructions (ignore npm install
).
The test script expects a compatible installed bridge version and an extension archive at dist/ext/
.
Test results will be displayed in the terminal and within the opened browser tab. Chrome may take some time to initialize the media router component before the cast API is available for testing.
npm run build --prefix ./app
npm run install-manifest
npm run package --prefix ./ext
npm test
SELENIUM_BROWSER=chrome npm test
Netflix / HTML5:
Note: Since it seems to be causing confusion, this project does not use electron. The electron-chromecast library was only used as a reference for the initial implementation of the API shim.
To donate via PayPal: