GithubHelp home page GithubHelp logo

chromecast-sandbox's Introduction

Chromecast Experiments

The files present are currently part of a working Chrome Sender API -> Custom Receiver example on the Chromecast.

Usage

To use these yourself, simply:

  • Paste your whitelisted AppID in the receiver/receiver.html and sender/js/sender.js files where you see "DEV_APP_ID_HERE";

  • Upload receiver/receiver.html (and optionally receiver/images/loader.gif) to the EXACT url that you got whitelisted.

  • Whitelist your sender domain, localhost by following the Chrome extension steps below.

  • Using your favorite web server (ahem, sudo npm install -g serve) just type serve in the sender/ directory, or however you'd like to serve the local files.

  • Navigate to http://localhost:3000/sender.html (or whatever port you decided to serve on)

Whitelisting

sender

To whitelist the Chrome sender, you must click on the Chrome extension icon, then "Options". Then repeatedly click on the big blue icon next to the title, "Google Cast extension options" until a new setting appears below "Fullscreen Zoom", entitled, "Developer Settings". In this box you provide domains that should trigger the injection of the Cast API. Here's a hint: while the extension manifest seems to accept match URLs, I couldn't seem to get them to work in this box. It seems it only needs the domain. This, if you're serving your file from http://localhost:3000/sender.html, simply put localhost in the box and click Add. Do not reload the extension.

receiver

The url that serves your receiver must be exactly the same url that you whitelisted with Google (not bo be confused with whitelisting a sender domain). For example, if you whitelisted http://mysite.com/dev/ then you must serve your receiver file from that URL exactly, so do not call it receiver.html unless that's what you whitelisted. It seems a few people have been stuck on this part. At the moment receiver and device whitelisting seem to be available here: Chromecast Developer Whitelist

Notes

The sender should scan for devices that are able to offer a matching receiver for your given AppID. Again, this should show your device right away. If not, make sure your device is on and discoverable, and that you have not disabled serial number sharing with Google. The device should know that it's whitelisted and subsequently you should see your device listed on sender.html.

The receiver should be launched upon you clicking on your device in the list. Any failures at this point could indicate that your receiver file was not properly loaded. One easy way to verify is to check your weblogs to see if a request was made to it by your fantastically mysterious Chromecast.

The doLaunch function in the sender has a bunch of nonsense information, but this is where you could choose to send your receiver additional information. You can leave this for the test, as the receiver.html does not rely on any of these values.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.