vigour-io / chromecast

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Chromecast web api

renancarvalho opened this issue · comments

Hey guys, I'm finishing the vigour-chromecast api. This is a simple implementation of the api

var vigourChromeCast = require("./vigourChromeCast")

initialize()
vigourCast = new vigourChromeCast("appID") // the app id registered on google sdk

function initialize () {
    var button = document.getElementById("casticon")
    button.addEventListener("click",function (argument) {
        vigourCast.castApp("http://commondatastorage.googleapis.com/gtv-videos-bucket/big_buck_bunny_1080p.mp4")
    })
}

Basically we need to instantiate the vigourChromecast, and use the castApp passing the video url to play.

Also I'll create controls like "vigourCast.play", "vigourCast.pause" , "vigourCast.stop", "vigourCast.volumeUp/down", etc.

what do you think @youzi cc @shawninder

@youzi Is this what you expect? Or are you looking for something more observable-lijk which you can plug into other observables?

I wrote a more comprehensive spec of the ChromeCast API in #2, please let me know if it's clear and what you think about it.