gochromecast

GoDoc Go Report Card Build Status

Description

Library for using chromecast. Contains partial implementations for media player controls, and youtube controls.

Usage

To install the library, run go get github.com/AndreasAbdi/gochromecast

Examples

// A simple example, showing how to find a Chromecast using mdns, and request its status.
package main

import (
"time"
"github.com/AndreasAbdi/gochromecast"
)

func main() {
    devices := make(chan *cast.Device, 100)
    cast.FindDevices(time.Second*5, devices)
    for device := range devices {
        device.PlayMedia("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", "video/mp4")
        time.Sleep(time.Second * 5)
        device.MediaController.Pause(time.Second * 5)
        device.QuitApplication(time.Second * 5)
    }
}

For more examples of how to use it, see the examples folder.

References

References listed in docs. Ported from