Skip to content
An open implementation of the JavaScript Chromecast API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


An open implementation of the JavaScript Chromecast API

The goal of ghast is be to a drop in replacement for the chrome sender API.

You should be able to do a s/chrome.cast/ghast/g with existing chrome sender applications, port them to an electron environment, or (potentially 🤞) a firefox extension.

Status: WIP

  • chrome.cast.* - i.e., Session/MediaSession etc. all work
  • - implemented, untested
  • cast.framework - mostly implemented, completely untested

Still relatively usable provided you aren't using the more recent cast.framework.
You can look an example w/ sample.js: node sample.js [url]


const ghast = require('ghast');

const apiConfig = new ghast.ApiConfig(
  new ghast.SessionRequest(appID),
  sessionListener,  // gets called when you auto-connect to an active session
  receiverListener, // gets called when devices go up / down
  ghast.AutoJoinPolicy.ORIGIN_SCOPED, // rules for auto-connecting

ghast.initialize(apiConfig, () => {
  console.log('Initialized. Now searching for devices...');

// ...
You can’t perform that action at this time.