googlecast

package module
v1.0.1-0...-246ea0d Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

README

googlecast

CircleCI

Manage Google Chromecast devices

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	ID() string
	Name() string
	Status() string
}

type Cast

type Cast interface {
	gopi.Driver
	gopi.Publisher

	// Return list of discovered Google Chromecast Devices
	Devices() []Device

	// Connect to the control channel for a device, with timeout
	Connect(Device, gopi.RPCFlag, time.Duration) (Channel, error)
	Disconnect(Channel) error
}

type Channel

type Channel interface {
	// Address of channel
	RemoteAddr() string

	// Get Properties
	Application() Application
	Volume() Volume
	Media() Media
}

type Client

type Client interface {
	gopi.RPCClient
	gopi.Publisher

	// Ping remote service
	Ping() error

	// Return devices from the remote service
	Devices() ([]Device, error)

	// Stream discovery events
	StreamEvents(ctx context.Context) error
}

type Device

type Device interface {
	Id() string
	Name() string
	Model() string
	Service() string
	State() uint
}

type Event

type Event interface {
	gopi.Event

	Type() EventType
	Device() Device
	Channel() Channel
}

type EventType

type EventType uint
const (
	CAST_EVENT_NONE EventType = iota
	CAST_EVENT_DEVICE_ADDED
	CAST_EVENT_DEVICE_UPDATED
	CAST_EVENT_DEVICE_DELETED
	CAST_EVENT_CHANNEL_CONNECT
	CAST_EVENT_CHANNEL_DISCONNECT
	CAST_EVENT_VOLUME_UPDATED
	CAST_EVENT_APPLICATION_UPDATED
	CAST_EVENT_MEDIA_UPDATED
)

func (EventType) String

func (t EventType) String() string

type Media

type Media interface {
}

type Volume

type Volume interface {
	Level() float32
	Muted() bool
}

Directories

Path Synopsis
cmd
rpc
sys

Jump to

Keyboard shortcuts

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