youtube

package
v0.0.0-...-ec10a6c Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SearchResult

type SearchResult struct {
	ID            string
	Title, Author string
	Duration      time.Duration
	ThumbnailURL  string
	// contains filtered or unexported fields
}

func SearchFor

func SearchFor(searchQuery string, limit int) ([]*SearchResult, error)

func (*SearchResult) IsLive

func (r *SearchResult) IsLive() bool

func (*SearchResult) IsPlaylist

func (r *SearchResult) IsPlaylist() bool

func (*SearchResult) ToPlayable

func (r *SearchResult) ToPlayable() []playable.Playable

type YouTubePlayable

type YouTubePlayable struct {
	ID, Title, Author, ThumbnailURL string
	Duration                        time.Duration

	Live bool
	// contains filtered or unexported fields
}

func GetVideo

func GetVideo(videoURL string) (YouTubePlayable, error)

func (YouTubePlayable) CanPause

func (p YouTubePlayable) CanPause() bool

func (YouTubePlayable) GetDirectURL

func (p YouTubePlayable) GetDirectURL() (string, error)

func (YouTubePlayable) GetDuration

func (p YouTubePlayable) GetDuration() (time.Duration, error)

func (YouTubePlayable) GetFullTitle

func (p YouTubePlayable) GetFullTitle() (title string, artist string)

func (YouTubePlayable) GetName

func (YouTubePlayable) GetName() string

func (YouTubePlayable) GetShareURL

func (p YouTubePlayable) GetShareURL() string

func (YouTubePlayable) GetThumbnailURL

func (p YouTubePlayable) GetThumbnailURL() (string, error)

func (YouTubePlayable) IsLive

func (p YouTubePlayable) IsLive() bool

func (YouTubePlayable) IsLocal

func (YouTubePlayable) IsLocal() bool

func (YouTubePlayable) IsOpus

func (p YouTubePlayable) IsOpus() bool

func (YouTubePlayable) TogglePause

func (YouTubePlayable) TogglePause() error

Jump to

Keyboard shortcuts

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