handler

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MediaHandler

type MediaHandler interface {
	Enable() error
	Disable() error
	Message() <-chan Message
	SendAnswer(ans any)

	OnEnded()
	OnVolume()
	OnPlayback()
	OnPlayPause()
	OnSeek(position time.Duration)
}

type Message

type Message struct {
	Type MessageType
	Arg  any
}

type MessageType

type MessageType int
const (
	MSG_NONE MessageType = iota

	MSG_NEXT
	MSG_PREVIOUS
	MSG_PLAY
	MSG_PAUSE
	MSG_PLAYPAUSE
	MSG_STOP
	MSG_SEEK
	MSG_SETPOS

	MSG_GET_PLAYBACKSTATUS
	MSG_GET_SHUFFLE
	MSG_GET_METADATA
	MSG_GET_VOLUME
	MSG_GET_POSITION

	MSG_SET_SHUFFLE
	MSG_SET_VOLUME
)

type PlaybackState

type PlaybackState int
const (
	STATE_STOPED PlaybackState = iota
	STATE_PAUSED
	STATE_PLAYING
)

type TrackMetadata

type TrackMetadata struct {
	TrackId      string
	Title        string
	Url          string
	CoverUrl     string
	Length       time.Duration
	Genre        []string
	Artists      []string
	AlbumName    string
	AlbumArtists []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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