cast

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

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

Go to latest
Published: Feb 3, 2019 License: MIT Imports: 8 Imported by: 0

README

Build status

go-cast

A command line tool to control Google Chromecast devices.

Installation

Download the latest binaries from: https://github.com/barnybug/go-cast/releases/latest

$ sudo mv cast-my-platform /usr/local/bin/cast
$ sudo chmod +x /usr/local/bin/cast

Usage

$ cast help

Play a media file:

$ cast --name Hifi media play http://url/file.mp3

Stop playback:

$ cast --name Hifi media stop

Set volume:

$ cast --name Hifi volume 0.5

Close app on the Chromecast:

$ cast --name Hifi quit

Bug reports

Please open a github issue including cast version number cast --version.

Pull requests

Pull requests are gratefully received!

  • please 'gofmt' the code.

Credits

Based on go library port by ninjasphere

Documentation

Index

Constants

View Source
const AppMedia = "CC1AD845"
View Source
const DefaultReceiver = "receiver-0"
View Source
const DefaultSender = "sender-0"
View Source
const TransportReceiver = "Tr@n$p0rt-0"
View Source
const TransportSender = "Tr@n$p0rt-0"

Variables

View Source
var Version string = "dev" /* passed in by travis build */

Functions

This section is empty.

Types

type Client

type Client struct {
	Events chan events.Event
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host net.IP, port int) *Client

func (*Client) Close

func (c *Client) Close()

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

func (*Client) Device

func (c *Client) Device() string

func (*Client) IP

func (c *Client) IP() net.IP

func (*Client) IsPlaying

func (c *Client) IsPlaying(ctx context.Context) bool

func (*Client) Media

func (*Client) Name

func (c *Client) Name() string

func (*Client) NewChannel

func (c *Client) NewChannel(sourceId, destinationId, namespace string) *castnet.Channel

func (*Client) Port

func (c *Client) Port() int

func (*Client) Receiver

func (c *Client) Receiver() *controllers.ReceiverController

func (*Client) SetInfo

func (c *Client) SetInfo(info map[string]string)

func (*Client) SetName

func (c *Client) SetName(name string)

func (*Client) Status

func (c *Client) Status() string

func (*Client) String

func (c *Client) String() string

func (*Client) Uuid

func (c *Client) Uuid() string

Directories

Path Synopsis
Package api is a generated protocol buffer package.
Package api is a generated protocol buffer package.
cmd
Package discovery provides a discovery service for chromecast devices
Package discovery provides a discovery service for chromecast devices

Jump to

Keyboard shortcuts

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