outputs

package
v0.0.0-...-e7feb91 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataStorage

func DataStorage(t MsgType) (interface{}, error)

func PlaybackStatusString

func PlaybackStatusString(status PlaybackStatus) string

Types

type AudioInfo

type AudioInfo struct {
	SampleRate int
	Codec      uint
	Duration   time.Duration
}

type Cmd

type Cmd int
const (
	Pause Cmd = iota
	Resume
	Stop
)

type DeviceAvailable

type DeviceAvailable struct {
	Available bool
}

type Msg

type Msg struct {
	MsgType MsgType
	Data    json.RawMessage
}

type MsgType

type MsgType int
const (
	RegistrationT MsgType = iota
	DeviceAvailableT
	PlaybackRequestT
	AudioInfoT
	PlaybackStateT
	SeekRequestT
	PlaybackCmdT
	UnknownT
)

func DataMsgType

func DataMsgType(data interface{}) (MsgType, error)

type PlaybackCmd

type PlaybackCmd struct {
	Cmd Cmd
}

type PlaybackRequest

type PlaybackRequest struct {
	Url string
}

type PlaybackState

type PlaybackState struct {
	Status       PlaybackStatus
	LastPosition int
	Since        time.Time
}

type PlaybackStatus

type PlaybackStatus int
const (
	Stopped PlaybackStatus = iota
	Requested
	Error
	Paused
	Playing
)

type Registration

type Registration struct {
	Name string
}

type SeekRequest

type SeekRequest struct {
	Position int
}

Jump to

Keyboard shortcuts

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