Skip to content

barakmich/gochromecast

 
 

Repository files navigation

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/barakmich/gochromecast

Examples

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

import (
"time"
"github.com/barakmich/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

About

Library for Golang to communicate with the Google Chromecast.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.1%
  • Other 0.9%