Documentation ¶
Index ¶
- type Player
- func (p *Player) Channel() *api.Channel
- func (p *Player) Close()
- func (p *Player) Play() bool
- func (p *Player) PlayStop() bool
- func (p *Player) SetChannel(c *api.Channel)
- func (p *Player) SetErrorHandler(handler func(error))
- func (p *Player) SetPlayerPlayingHandler(handler func())
- func (p *Player) SetPlayerStoppedHandler(handler func())
- func (p *Player) SetPlayerTitleChangedHandler(handler func())
- func (p *Player) SetVolume(v int)
- func (p *Player) Stop()
- func (p *Player) Volume() int
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 manages the streaming of an AudioAddict music channel
func (*Player) Close ¶
func (p *Player) Close()
Close stops the player and closes it. Player instance can never be used again after calling Close().
func (*Player) PlayStop ¶
PlayStop starts the player when it was stopped, and stops the player when it was started. When playback has stopped or there is no player attached, false is returned. Otherwise the boolean indicates if the player playing after this call.
func (*Player) SetChannel ¶
SetChannel sets the channel on the player
func (*Player) SetErrorHandler ¶
func (*Player) SetPlayerPlayingHandler ¶
func (p *Player) SetPlayerPlayingHandler(handler func())
func (*Player) SetPlayerStoppedHandler ¶
func (p *Player) SetPlayerStoppedHandler(handler func())
func (*Player) SetPlayerTitleChangedHandler ¶
func (p *Player) SetPlayerTitleChangedHandler(handler func())
func (*Player) SetVolume ¶
SetVolume changes the volume in the player. v should be a value between 0 and 100 (inclusive)
Click to show internal directories.
Click to hide internal directories.