Giter Site home page Giter Site logo

cast-api's Introduction

Cast API. A service to detect and send content to Chromecast devices

Install

npm install

Usage

  • Start the server node index.js
  • Get available devices: curl localhost:3000/screens. You should get a response like:
[
    {
        "host": "59d44c16-d6a2-137c-50d0-1a31dd735201.local",
        "port": 8009,
        "address": "192.168.52.50",
        "name": "Showroom.1"
    }
]
  • Send content to the devices. Right now we support the content types: image,video,youtube and web. And the request is a POST to curl localhost:3000/content with the following JSON format:
{
	"screen": "labs.2",
	"type":"youtube",
	"content":"https://www.youtube.com/watch?v=5ZEmbbQJgtk"
}

Screen is the name of the Chromecast (which you can get to know with the other endpoint). Type is one of the available content types: image,video,youtube and web and content makes for the URL of the video/image/whatever.

Deploy to RaspberryPi

We use a RaspberryPi 3 + Resin.io to deploy the service and have it constantly running. The resin.io service provides an external IP through a Ngrok tunnel. So you can access the API from everywhere. We provide the necessary Dockerfile in the folder.

cast-api's People

Watchers

 avatar  avatar

cast-api's Issues

Improve controller logic

The project needs a refactoring in order to be a proper REST API and return an error when something fails instead of returning always OK 200.

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.