forwarding

package
v0.0.0-...-14a0406 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: MIT Imports: 12 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 {
	// contains filtered or unexported fields
}

Player will forward data packets to member nodes

func NewPlayer

func NewPlayer() (*Player, error)

NewPlayer instantiates a new Player

func (*Player) AddSessionForNode

func (p *Player) AddSessionForNode(node *memberlist.Node)

AddSessionForNode will create a session to the given node

func (*Player) GetIsMuted

func (p *Player) GetIsMuted() bool

GetIsMuted returns muted state

func (*Player) GetTrack

func (p *Player) GetTrack() player.Track

GetTrack returns the track

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

func (p *Player) Play(session *rtsp.Session)

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

func (p *Player) SetAlbumArt(artwork []byte)

SetAlbumArt sets the album art for the player

func (*Player) SetMute

func (p *Player) SetMute(isMuted bool)

SetMute will mute or unmute the player, mute overrides any volume settings

func (*Player) SetTrack

func (p *Player) SetTrack(album string, artist string, title string)

SetTrack sets the track for the player

func (*Player) SetVolume

func (p *Player) SetVolume(volume float64)

SetVolume accepts a float between 0 (mute) and 1 (full volume)

Jump to

Keyboard shortcuts

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