network

package
v0.0.0-...-b3e936c Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultChannelName = "default"
View Source
var ErrNetworkChannelNotFound = errors.New("network channel not found")
View Source
var ErrNetworkNoChannelPlaying = errors.New("network no channel playing")

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID string
	// contains filtered or unexported fields
}

func NewChannel

func NewChannel(list *player.MediaList) *Channel

func (*Channel) Current

func (c *Channel) Current() string

func (*Channel) PlayNext

func (c *Channel) PlayNext() string

func (*Channel) PlayWith

func (c *Channel) PlayWith(p player.Player) error

func (*Channel) UpNext

func (c *Channel) UpNext() string

type Network

type Network struct {
	Ctx   context.Context
	Name  string
	Owner string
	// contains filtered or unexported fields
}

func NewNetwork

func NewNetwork(name string, owner string) *Network

func (*Network) AddChannel

func (n *Network) AddChannel(list *player.MediaList) *Channel

func (*Network) Channel

func (n *Network) Channel(ID string) (*Channel, error)

func (*Network) Channels

func (n *Network) Channels() []*Channel

func (*Network) CurrentChannel

func (n *Network) CurrentChannel() (*Channel, error)

func (*Network) Live

func (n *Network) Live() string

func (*Network) SetChannelLive

func (n *Network) SetChannelLive(ID string) error

Jump to

Keyboard shortcuts

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