youtube

package
v0.0.0-...-54c9f1f Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: CC0-1.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(cfg streamctl.Config, id string)

Types

type FlagBroadcastTemplateIDs

type FlagBroadcastTemplateIDs []string

type PlatformSpecificConfig

type PlatformSpecificConfig struct {
	ClientID     string
	ClientSecret string
	Token        *oauth2.Token
}

type StreamProfile

type StreamProfile struct {
	Tags []string
}

type YouTube

type YouTube struct {
	YouTubeService *youtube.Service
}

func New

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

func (*YouTube) ApplyProfile

func (yt *YouTube) ApplyProfile(
	ctx context.Context,
	profile StreamProfile,
	customArgs ...any,
) 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) InsertAdsCuePoint

func (yt *YouTube) InsertAdsCuePoint(
	ctx context.Context,
	ts time.Time,
	duration time.Duration,
) 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) 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

Jump to

Keyboard shortcuts

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