player

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 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 BasePlayer

type BasePlayer interface {
	Continue() error
	Pause() error
	Stop() error

	SeekSeconds(secs float64) error
	IsSeeking() bool

	SetVolume(int) error
	GetVolume() int

	GetStatus() Status

	// Event API
	OnPaused(func())
	OnStopped(func())
	OnPlaying(func())
	OnSeek(func())
	OnTrackChange(func())
}

type ReplayGainMode

type ReplayGainMode int
const (
	ReplayGainNone ReplayGainMode = iota
	ReplayGainTrack
	ReplayGainAlbum
)

func (ReplayGainMode) String

func (r ReplayGainMode) String() string

type ReplayGainOptions

type ReplayGainOptions struct {
	Mode            ReplayGainMode
	PreampGain      float64
	PreventClipping bool
}

Replay Gain options (argument to SetReplayGainOptions).

type ReplayGainPlayer

type ReplayGainPlayer interface {
	SetReplayGainOptions(ReplayGainOptions) error
}

type State

type State int

The playback state (Stopped, Paused, or Playing).

const (
	Stopped State = iota
	Paused
	Playing
)

type Status

type Status struct {
	State    State
	TimePos  float64
	Duration float64
}

The current status of the player. Includes playback state, current time, total track time, and playlist position.

type TrackPlayer

type TrackPlayer interface {
	BasePlayer
	PlayTrack(track *mediaprovider.Track) error
	SetNextTrack(track *mediaprovider.Track) error
}

type URLPlayer

type URLPlayer interface {
	BasePlayer
	PlayFile(url string) error
	SetNextFile(url string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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