Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Caption ¶
type Caption struct {
Vid string `json:"vid"`
Name string `json:"name"`
LangCode string `json:"lang_code"`
LangOrigin string `json:"lang_original"`
LangTrans string `json:"lang_translated"`
IsDefault bool `json:"lang_default"`
IsTrans bool `json:"translated"`
Tracks []CaptionTrack `json:"tracks"`
}
Caption for one video
func VideoCaptions ¶
VideoCaptions returns video's captions
func VideoMetaCaption ¶
func VideoMetaCaption(ctx context.Context, meta CaptionMeta) (*Caption, error)
VideoMetaCaption returns video's caption through metadata
func VideoTranslateCaption ¶
VideoTranslateCaption translate a caption to target language
type CaptionMeta ¶
type CaptionMeta struct {
Vid string `json:"vid"`
Name string `json:"name"`
LangCode string `json:"langCode"`
LangOrigin string `json:"langOriginal"`
LangTrans string `json:"langTranslated"`
IsDefault bool `json:"isDefault"`
}
CaptionMeta the metadata of caption
func CaptionMetas ¶
func CaptionMetas(ctx context.Context, vid string) ([]CaptionMeta, error)
CaptionMetas list all captions related to video
type CaptionTrack ¶
type CaptionTrack struct {
Start int `json:"start"`
Duration int `json:"duration"`
Text string `json:"text"`
}
CaptionTrack is a single caption track
type VideoCaptionInfo ¶
type VideoCaptionInfo struct {
Tracks []videoCaptionInfoTrack `json:"tracks"`
Translations []string `json:"translations"`
}
VideoCaptionInfo ...
type VideoInfo ¶
type VideoInfo struct {
ID string `json:"vid"`
Title string `json:"title"`
Author string `json:"author"`
Channel string `json:"channel"`
Desc string `json:"description"`
ViewCount int `json:"viewCount"`
IsLive bool `json:"isLiveContent"`
Caption VideoCaptionInfo `json:"caption"`
Thumbnails []VideoThumbnail `json:"thumbnails"`
}
VideoInfo the information of Video
type VideoThumbnail ¶
type VideoThumbnail struct {
Url string `json:"url"`
Width int `json:"width"`
Height int `json:"height"`
}
VideoThumbnail ...
Click to show internal directories.
Click to hide internal directories.