castv2

package module
v0.0.0-...-f38834e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-castv2

An implementation of the Chromecast CASTV2 protocol in Golang.

Ported from node-castv2 and node-castv2-client

Examples

For examples of how to use it, see https://github.com/AndreasAbdi/driver-go-chromecast/blob/master/device.go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindDevices

func FindDevices(timeout time.Duration, devices chan<- *Device)

FindDevices searches the LAN for chromecast devices via mDNS and sends them to a channel.

Types

type Device

type Device struct {
	ReceiverController *controllers.ReceiverController
	MediaController    *controllers.MediaController
	YoutubeController  *controllers.YoutubeController
	// contains filtered or unexported fields
}

Device Object to run basic chromecast commands

func NewDevice

func NewDevice(host net.IP, port int) (Device, error)

NewDevice is constructor for Device struct

func (*Device) GetMediaStatus

func (device *Device) GetMediaStatus(timeout time.Duration) []*media.MediaStatus

GetMediaStatus of current media controller

func (*Device) GetStatus

func (device *Device) GetStatus(timeout time.Duration) *receiver.ReceiverStatus

GetStatus of the device.

func (*Device) Play

func (device *Device) Play()

Play just plays.

func (*Device) PlayMedia

func (device *Device) PlayMedia(URL string, MIMEType string)

PlayMedia plays a video via the media controller.

func (*Device) PlayYoutubeVideo

func (device *Device) PlayYoutubeVideo(videoID string)

PlayYoutubeVideo launches the youtube app and tries to play the video based on its id.

func (*Device) QuitApplication

func (device *Device) QuitApplication(timeout time.Duration)

QuitApplication that is currently running on the device

Directories

Path Synopsis
Package api is a generated protocol buffer package.
Package api is a generated protocol buffer package.
examples
Basic command
DisplayPicture command
DisplayURL command
Internals command
PlayAudio command
PlayVideo command
UseSubtitles command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址