lives

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(domain string, b Builder)

Types

type Builder

type Builder interface {
	Build(*url.URL) (LiveApi, error)
}

type LiveApi

type LiveApi interface {
	GetInfo() (*LiveState, error)
}

func New

func New(sUrl string) (liveApi LiveApi, err error)

type LiveConfig

type LiveConfig struct {
	Id             int
	RoomUrl        string
	Interval       int
	Format         string
	MonitorType    int
	MonitorStartAt string
	MonitorStopAt  string
}

type LiveSession

type LiveSession struct {
	Id              int
	Config          LiveConfig
	State           LiveState
	LiveApi         LiveApi
	EventDispatcher interfaces.Module
	ListenerManager interfaces.Module
	RecorderManager interfaces.Module
	// contains filtered or unexported fields
}

func NewLiveSession

func NewLiveSession(id int, config LiveConfig, liveAPI LiveApi) *LiveSession

func (*LiveSession) GetState

func (s *LiveSession) GetState() LiveState

func (*LiveSession) UpdateState

func (s *LiveSession) UpdateState(newState LiveState)

type LiveState

type LiveState struct {
	LiveId      int
	RoomName    string
	Anchor      string
	Platform    string
	IsLive      bool
	StreamInfos []*StreamUrlInfo
}

type StreamUrlInfo

type StreamUrlInfo struct {
	Url                  *url.URL
	Name                 string
	Description          string
	Resolution           int
	Vbitrate             int
	HeadersForDownloader map[string]string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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