youtube

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SWAP int = iota
	REVERSE
	SLICE
	SPLICE
)

Variables

This section is empty.

Functions

func GetCipherInfoFromSignatureCipher

func GetCipherInfoFromSignatureCipher(cipherUrl string) (*cipherInfo, error)

takes a url as string and returns a cipherinfo based on the json "signatureCipher"

func GetCipherInfoFromUrl

func GetCipherInfoFromUrl(cipherUrl string) (*cipherInfo, error)

takes a url as string and returns a cipherinfo based on the json "signatureCipher"

func NewPersistentYoutubeStream

func NewPersistentYoutubeStream(contentUrl string, contentLength int) (*persistentYoutubeStream, error)

func Reverse

func Reverse(s string) string

Types

type CipherOperation

type CipherOperation struct {
	// contains filtered or unexported fields
}

type YoutubeVideo

type YoutubeVideo struct {
	// contains filtered or unexported fields
}

func NewYoutubeVideo

func NewYoutubeVideo(videoid string) (*YoutubeVideo, error)

func (*YoutubeVideo) GetPCMFrame

func (y *YoutubeVideo) GetPCMFrame(duration int) ([]int16, error)

Returns a Mono PCMFrame with the given duration in milliseconds

func (*YoutubeVideo) GetTitle

func (y *YoutubeVideo) GetTitle() string

type YoutubedlFormat added in v0.3.0

type YoutubedlFormat struct {
	Asr      float64
	Filesize float64
	Url      string
	Acodec   string
	Ext      string
}

type YoutubedlVideo added in v0.3.0

type YoutubedlVideo struct {
	// used for json unmarshal of youtube-dl output
	Id      string
	Title   string
	Formats []YoutubedlFormat
	// contains filtered or unexported fields
}

func NewYoutubedlVideo added in v0.3.0

func NewYoutubedlVideo(path string) (*YoutubedlVideo, error)

func (*YoutubedlVideo) GetPCMFrame added in v0.3.0

func (y *YoutubedlVideo) GetPCMFrame(duration int) ([]int16, error)

Returns a Mono PCMFrame with the given duration in milliseconds

func (*YoutubedlVideo) GetTitle added in v0.3.0

func (y *YoutubedlVideo) GetTitle() string

Jump to

Keyboard shortcuts

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