castv2

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2026 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

Fork notes (eq-cast)

This is a fork of hbbio/go-castv2 (lineage: ninjasphere → AndreasAbdi → hbbio), maintained for eq-cast:

  • Safe shutdown: Client.Close() terminates dispatch/read goroutines; no more post-close log spam or panics on nil packets.
  • The library never logs on its own anymore; errors are returned to callers.
  • NewDashCastController now takes *primitives.Client (the old value receiver silently failed to register its channel).
  • Dependencies updated to current versions; unused youtube controller, examples (incl. a committed 10MB binary) and stale deps removed.

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
	// 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) 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.

Jump to

Keyboard shortcuts

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