core

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveGuild

type ActiveGuild struct {
	Name        string
	MediaChan   chan *Media
	UserActions *UserActions
}

ActiveGuild is a guild that is currently being streamed to.

func NewActiveGuild

func NewActiveGuild(name string) *ActiveGuild

func (*ActiveGuild) EnqueueMedia

func (g *ActiveGuild) EnqueueMedia(media *Media)

func (*ActiveGuild) IsMediaQueueFull

func (g *ActiveGuild) IsMediaQueueFull() bool

func (*ActiveGuild) IsStreaming

func (g *ActiveGuild) IsStreaming() bool

func (*ActiveGuild) MediaQueueSize

func (g *ActiveGuild) MediaQueueSize() int

func (*ActiveGuild) PrepareForStreaming

func (g *ActiveGuild) PrepareForStreaming(maxQueueSize int)

func (*ActiveGuild) StopStreaming

func (g *ActiveGuild) StopStreaming()

type Media

type Media struct {
	Title     string
	FilePath  string
	Uploader  string
	URL       string
	Thumbnail string
	Duration  time.Duration
}

func NewMedia

func NewMedia(title, filePath, uploader, url, thumbnail string, durationInSeconds int) *Media

type UserActions

type UserActions struct {
	SkipChan chan bool
	StopChan chan bool

	Stopped bool
}

func NewActions

func NewActions() *UserActions

func (*UserActions) Skip

func (a *UserActions) Skip()

func (*UserActions) Stop

func (a *UserActions) Stop()

Jump to

Keyboard shortcuts

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