Documentation ¶
Index ¶
- type Player
- func (p *Player) AddSessionForNode(node *memberlist.Node)
- func (p *Player) GetIsMuted() bool
- func (p *Player) GetTrack() player.Track
- func (p *Player) NotifyJoin(node *memberlist.Node)
- func (p *Player) NotifyLeave(node *memberlist.Node)
- func (*Player) NotifyUpdate(node *memberlist.Node)
- func (p *Player) Play(session *rtsp.Session)
- func (p *Player) RemoveAllSessions()
- func (p *Player) RemoveSessionForNode(node *memberlist.Node)
- func (p *Player) SetAlbumArt(artwork []byte)
- func (p *Player) SetMute(isMuted bool)
- func (p *Player) SetTrack(album string, artist string, title string)
- func (p *Player) SetVolume(volume float64)
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 will forward data packets to member nodes
func (*Player) AddSessionForNode ¶
func (p *Player) AddSessionForNode(node *memberlist.Node)
AddSessionForNode will create a session to the given node
func (*Player) NotifyJoin ¶
func (p *Player) NotifyJoin(node *memberlist.Node)
NotifyJoin is invoked when a node is detected to have joined. The Node argument must not be modified.
func (*Player) NotifyLeave ¶
func (p *Player) NotifyLeave(node *memberlist.Node)
NotifyLeave is invoked when a node is detected to have left. The Node argument must not be modified.
func (*Player) NotifyUpdate ¶
func (*Player) NotifyUpdate(node *memberlist.Node)
NotifyUpdate is invoked when a node is detected to have updated, usually involving the meta data. The Node argument must not be modified.
func (*Player) Play ¶
Play will play the packets received on the specified session and forward the packets on
func (*Player) RemoveAllSessions ¶
func (p *Player) RemoveAllSessions()
RemoveAllSessions will remove all the active forwarding sessions
func (*Player) RemoveSessionForNode ¶
func (p *Player) RemoveSessionForNode(node *memberlist.Node)
RemoveSessionForNode will remove the session for the given node
func (*Player) SetAlbumArt ¶
SetAlbumArt sets the album art for the player