video

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatsNotFound     = "no formats available that match criteria"
	YoutubeVideoBaseURL = "https://www.youtube.com/watch?v="
)

Variables

This section is empty.

Functions

func GetFileURL added in v1.1.0

func GetFileURL(info *ytdl.VideoInfo, fileUrlGetter FileUrlGetter) (url.URL, error)

Types

type FileInformationGetter added in v1.0.2

type FileInformationGetter interface {
	GetVideoInfo(cx context.Context, value interface{}) (*ytdl.VideoInfo, error)
}

type FileUrlGetter added in v1.0.2

type FileUrlGetter interface {
	GetDownloadURL(context.Context, *ytdl.VideoInfo, *ytdl.Format) (*url.URL, error)
}

type Video added in v1.0.2

type Video struct {
	ID            string
	URL           *url.URL
	FileUrl       *url.URL
	Description   string
	Title         string
	DatePublished time.Time
	Keywords      []string
	Author        string
	Duration      time.Duration
	ContentType   string
	ContentLength int64
	// contains filtered or unexported fields
}

func GetFileInformation added in v1.1.0

func GetFileInformation(videoId string, fileInformationGetter FileInformationGetter, fileUrlGetter FileUrlGetter) (Video, error)

func New added in v1.0.2

func New(ID string) Video

Jump to

Keyboard shortcuts

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