Versions in this module Expand all Collapse all v0 v0.1.4 Apr 26, 2024 v0.1.3 Apr 25, 2024 v0.1.1 Apr 25, 2024 Changes in this version + const ErrCipherNotFound + const ErrInvalidCharactersInVideoID + const ErrInvalidPlaylist + const ErrLoginRequired + const ErrNotPlayableInEmbed + const ErrReadOnClosedResBody + const ErrSignatureTimestampNotFound + const ErrVideoIDMinLength + const ErrVideoPrivate + const Size10Mb + const Size1Kb + const Size1Mb + var AndroidClient = clientInfo + var DefaultClient = AndroidClient + var EmbeddedClient = clientInfo + var ErrNoFormat = errors.New("no video format provided") + var ErrTranscriptDisabled = errors.New("transcript is disabled on this video") + var Logger = getLogger(os.Getenv("LOGLEVEL")) + var WebClient = clientInfo + func ExtractVideoID(videoID string) (string, error) + func SetLogLevel(value string) + type CaptionTrack struct + BaseURL string + IsTranslatable bool + Kind string + LanguageCode string + Name struct{ ... } + VssID string + type Client struct + ChunkSize int64 + HTTPClient *http.Client + MaxRoutines int + func (c *Client) GetPlaylist(url string) (*Playlist, error) + func (c *Client) GetPlaylistContext(ctx context.Context, url string) (*Playlist, error) + func (c *Client) GetStream(video *Video, format *Format) (io.ReadCloser, int64, error) + func (c *Client) GetStreamContext(ctx context.Context, video *Video, format *Format) (io.ReadCloser, int64, error) + func (c *Client) GetStreamURL(video *Video, format *Format) (string, error) + func (c *Client) GetStreamURLContext(ctx context.Context, video *Video, format *Format) (string, error) + func (c *Client) GetTranscript(video *Video, lang string) (VideoTranscript, error) + func (c *Client) GetTranscriptCtx(ctx context.Context, video *Video, lang string) (VideoTranscript, error) + func (c *Client) GetVideo(url string) (*Video, error) + func (c *Client) GetVideoContext(ctx context.Context, url string) (*Video, error) + func (c *Client) VideoFromPlaylistEntry(entry *PlaylistEntry) (*Video, error) + func (c *Client) VideoFromPlaylistEntryContext(ctx context.Context, entry *PlaylistEntry) (*Video, error) + type DecipherOperation func([]byte) []byte + type ErrPlayabiltyStatus struct + Reason string + Status string + func (err ErrPlayabiltyStatus) Error() string + type ErrPlaylistStatus struct + Reason string + func (err ErrPlaylistStatus) Error() string + type ErrUnexpectedStatusCode int + func (err ErrUnexpectedStatusCode) Error() string + type Format struct + ApproxDurationMs string + AudioChannels int + AudioQuality string + AudioSampleRate string + AudioTrack ... + AverageBitrate int + Bitrate int + Cipher string + ContentLength int64 + FPS int + Height int + IndexRange ... + InitRange ... + ItagNo int + LastModified string + MimeType string + ProjectionType string + Quality string + QualityLabel string + URL string + Width int + func (f *Format) LanguageDisplayName() string + type FormatList []Format + func (list FormatList) AudioChannels(n int) FormatList + func (list FormatList) Itag(itagNo int) FormatList + func (list FormatList) Language(displayName string) FormatList + func (list FormatList) Quality(quality string) FormatList + func (list FormatList) Select(f func(Format) bool) (result FormatList) + func (list FormatList) Sort() + func (list FormatList) Type(value string) FormatList + func (list FormatList) WithAudioChannels() FormatList + type Playlist struct + Author string + Description string + ID string + Title string + Videos []*PlaylistEntry + type PlaylistEntry struct + Author string + Duration time.Duration + ID string + Thumbnails Thumbnails + Title string + type Thumbnail struct + Height uint + URL string + Width uint + type Thumbnails []Thumbnail + type TranscriptSegment struct + Duration int + OffsetText string + StartMs int + Text string + func (tr TranscriptSegment) String() string + type Video struct + Author string + CaptionTracks []CaptionTrack + ChannelHandle string + ChannelID string + DASHManifestURL string + Description string + Duration time.Duration + Formats FormatList + HLSManifestURL string + ID string + PublishDate time.Time + Thumbnails Thumbnails + Title string + Views int + func (v *Video) FilterQuality(quality string) + func (v *Video) SortBitrateAsc(i int, j int) bool + func (v *Video) SortBitrateDesc(i int, j int) bool + type VideoTranscript []TranscriptSegment + func (vt VideoTranscript) String() string