video

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DetailsNotFound     = "rawInformation not provided, don't have from get file url"
	FormatsNotFound     = "no formats available that match criteria"
	YoutubeVideoBaseURL = "https://www.youtube.com/watch?v="
)

Variables

This section is empty.

Functions

This section is empty.

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 New added in v1.0.2

func New(ID string) Video

func (Video) GetFileInformation added in v1.0.2

func (v Video) GetFileInformation(fileInformationGetter FileInformationGetter, fileUrlGetter FileUrlGetter) (Video, error)

func (Video) GetFileURL added in v1.0.2

func (v Video) GetFileURL(fileUrlGetter FileUrlGetter) (url.URL, error)

Jump to

Keyboard shortcuts

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