device

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device interface {
	Play(ctx context.Context, streamURL *url.URL, contentType string) error
	Close() error
	Connect() error
	SupportedContentTypes() []string
}

Device is the interface for all casting devices.

type Info

type Info struct {
	Name    string
	Type    Type
	Address string
}

Info holds discovery information about a device.

func Discover

func Discover(ctx context.Context, timeout time.Duration) ([]Info, error)

Discover scans the local network for DLNA and Chromecast devices.

func FindInfo

func FindInfo(ctx context.Context, timeout time.Duration, dtype Type, name string) (Info, error)

FindInfo discovers a specific device by type and name on the network.

type Type

type Type string

Type identifies the kind of casting device.

const (
	TypeDLNA       Type = "dlna"
	TypeChromecast Type = "chromecast"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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