playback

package
v0.0.0-...-c4d1d87 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Player

type Player struct {
	Client *gumble.Client

	Playlist playlist.List
	Volume   float32
	IsRadio  bool

	Config *config.Config
	// contains filtered or unexported fields
}

func NewPlayer

func NewPlayer(client *gumble.Client, config *config.Config) *Player

func (*Player) AddTarget

func (player *Player) AddTarget(username string)

func (*Player) IsPlaying

func (player *Player) IsPlaying() bool

IsPlaying returns true if the Stream exists and claims to be playing

func (*Player) IsStopped

func (player *Player) IsStopped() bool

IsStopped returns true if the Stream exists and claims to be stopped

func (*Player) NowPlaying

func (player *Player) NowPlaying() string

func (*Player) Play

func (player *Player) Play(path string)

func (*Player) PlayCurrent

func (player *Player) PlayCurrent()

PlayCurrent plays the playlist at the current position should the player not already be playing.

func (*Player) PlayFile

func (player *Player) PlayFile(path string) error

func (*Player) PlayYT

func (player *Player) PlayYT(url string) error

PlayYT streams a URL through ytdl

func (*Player) RemoveTarget

func (player *Player) RemoveTarget(username string)

func (*Player) SetVolume

func (player *Player) SetVolume(value float32)

func (*Player) Skip

func (player *Player) Skip(amount int)

func (*Player) Stop

func (player *Player) Stop(wantsToStop bool)

func (*Player) TargetUsers

func (player *Player) TargetUsers()

func (*Player) WaitForStop

func (player *Player) WaitForStop()

WaitForStop waits for the playback stream to end and performs the upcoming action

Jump to

Keyboard shortcuts

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