mrsnax / fx_cast

Implementation of the Chrome Sender API (Chromecast) within Firefox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fx_cast

Very WIP! Not ready for release. Expect many bugs. Please don't sign builds on AMO with current ID.

Credit:

Supported platforms

  • Linux
  • macOS (TODO)
  • Windows (TODO)

Only tested on Linux. mDNS library issue to be fixed. mdns only works on Windows, mdns-js only works on Linux.

Building

Requirements

  • NodeJS
  • node binary in path
  • Bonjour SDK (Windows)

Instructions

git clone https://github.com/hensm/caster.git
npm install
npm run build

Installer scripts aren't written yet, so registering the native messaging manifest with Firefox and specifiying the path must be done manually:
MDN: Native Manifests

path key within app/caster_bridge.json must be set to absolute path of app/src/launcher.sh or app/src/launcher.bat. Then, the manifest must be either moved to the correct location or the path added to the registry (Windows):
MDN: Native Manifests # Manifest location

Testing

Testing requires geckodriver (or chromedriver for Chrome parity testing). See selenium-webdriver installation instructions (ignore npm install).

Chrome doesn't load the media router in a temporary selenium profile, so there's a bundled profile (test/ChromeProfile.zip). Extract the folder within as test/ChromeProfile/.

npm run build
npm test
SELENIUM_BROWSER=chrome npm test

Usage

Extension can be loaded from about:debugging as a temporary extension.

Most sites won't load the cast API unless the browser presents itself as Chrome. The plan is to spoof the user agent string for a whitelist of cast-enabled sites, but that isn't implemented yet. You can workaround this by setting it manually or using a third-party extension.

HTML5 media elements have a "Cast..." context menu item that triggers a sender application. Only works on remote (non-local) media that isn't DRM-encumbered.

Cast-enabled websites will load the sender API shim and display a cast button as in Chrome, provided there are no bugs/incompatibilities with the shim.

Video Demos

Netflix / HTML5:

fx_cast Netflix fx_cast HTML5

About

Implementation of the Chrome Sender API (Chromecast) within Firefox

License:MIT License


Languages

Language:JavaScript 97.3%Language:CSS 1.7%Language:HTML 0.8%Language:Shell 0.1%Language:Batchfile 0.0%