Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Player ¶
type Player struct {
// contains filtered or unexported fields
}
Player holds the necessary data and structs to control the player
func NewPlayer ¶
func NewPlayer(c *soundcloud.Client, tc <-chan soundcloud.Track, toggle <-chan bool, next chan<- bool, streamerc chan<- *StreamerFormat) *Player
NewPlayer will return a new player
func (*Player) Start ¶
func (p *Player) Start(t soundcloud.Track) error
Start will start the player, starting with the given track
func (*Player) StreamerFromTrack ¶
func (p *Player) StreamerFromTrack(t soundcloud.Track) (*StreamerFormat, io.ReadCloser, error)
StreamerFromTrack will retrieve a stream from the track and return the streamer, format and total duration, as well as the source
type StreamerFormat ¶
type StreamerFormat struct { Streamer beep.StreamSeekCloser Format beep.Format TotalDuration time.Duration }
StreamerFormat is a struct holding both a streamer and a format
Click to show internal directories.
Click to hide internal directories.