youtube

package
v0.0.0-...-9d42e7f Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: CC0-1.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const ID = youtube.ID

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(cfg streamctl.Config)

Types

type Config

type Config = youtube.Config

type FlagBroadcastTemplateIDs

type FlagBroadcastTemplateIDs []string

type LiveBroadcast

type LiveBroadcast = youtube.LiveBroadcast

type OAuthHandler

type OAuthHandler = youtube.OAuthHandler

type PlatformSpecificConfig

type PlatformSpecificConfig = youtube.PlatformSpecificConfig

type StreamProfile

type StreamProfile = youtube.StreamProfile

type StreamStatusCustomData

type StreamStatusCustomData = youtube.StreamStatusCustomData

type YouTube

type YouTube struct {
	Config         Config
	YouTubeService *youtube.Service
	CancelFunc     context.CancelFunc
	SaveConfigFunc func(Config) error
	// contains filtered or unexported fields
}

func New

func New(
	ctx context.Context,
	cfg Config,
	saveCfgFn func(Config) error,
) (*YouTube, error)

func (*YouTube) ApplyProfile

func (yt *YouTube) ApplyProfile(
	ctx context.Context,
	profile StreamProfile,
	customArgs ...any,
) error

func (*YouTube) Close

func (yt *YouTube) Close() error

func (*YouTube) DeleteActiveBroadcasts

func (yt *YouTube) DeleteActiveBroadcasts(
	ctx context.Context,
) error

func (*YouTube) EndStream

func (yt *YouTube) EndStream(
	ctx context.Context,
) error

func (*YouTube) Flush

func (yt *YouTube) Flush(
	ctx context.Context,
) error

func (*YouTube) GetStreamStatus

func (yt *YouTube) GetStreamStatus(
	ctx context.Context,
) (_ret *streamcontrol.StreamStatus, _err error)

func (*YouTube) InsertAdsCuePoint

func (yt *YouTube) InsertAdsCuePoint(
	ctx context.Context,
	ts time.Time,
	duration time.Duration,
) error

func (*YouTube) IterateActiveBroadcasts

func (yt *YouTube) IterateActiveBroadcasts(
	ctx context.Context,
	callback func(broadcast *youtube.LiveBroadcast) error,
	parts ...string,
) error

func (*YouTube) IterateUpcomingBroadcasts

func (yt *YouTube) IterateUpcomingBroadcasts(
	ctx context.Context,
	callback func(broadcast *youtube.LiveBroadcast) error,
	parts ...string,
) error

func (*YouTube) ListBroadcasts

func (yt *YouTube) ListBroadcasts(
	ctx context.Context,
) ([]*youtube.LiveBroadcast, error)

func (*YouTube) ListStreams

func (yt *YouTube) ListStreams(
	ctx context.Context,
) ([]*youtube.LiveStream, error)

func (*YouTube) Ping

func (yt *YouTube) Ping(ctx context.Context) error

func (*YouTube) SetDescription

func (yt *YouTube) SetDescription(
	ctx context.Context,
	description string,
) error

func (*YouTube) SetTitle

func (yt *YouTube) SetTitle(
	ctx context.Context,
	title string,
) error

func (*YouTube) StartStream

func (yt *YouTube) StartStream(
	ctx context.Context,
	title string,
	description string,
	profile StreamProfile,
	customArgs ...any,
) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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