-
Notifications
You must be signed in to change notification settings - Fork 27
/
youtube.go
91 lines (82 loc) · 4.01 KB
/
youtube.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
package schemas
type YoutubeBodyMetaInfo struct {
Context Context `json:"context"`
VideoID string `json:"videoId"`
Params string `json:"params"`
PlaybackContext PlaybackContext `json:"playbackContext"`
RacyCheckOk bool `json:"racyCheckOk"`
ContentCheckOk bool `json:"contentCheckOk"`
}
type Context struct {
Client Client `json:"client"`
}
type Client struct {
Hl string `json:"hl"`
ClientName string `json:"clientName"`
ClientVersion string `json:"clientVersion"`
AndroidSDKVersion int64 `json:"androidSdkVersion"`
UserAgent string `json:"userAgent"`
TimeZone string `json:"timeZone"`
UtcOffsetMinutes int64 `json:"utcOffsetMinutes"`
}
type PlaybackContext struct {
ContentPlaybackContext ContentPlaybackContext `json:"contentPlaybackContext"`
}
type ContentPlaybackContext struct {
Html5Preference string `json:"html5Preference"`
}
type YoutubeMetaInfo struct {
AdPlacements []interface{} `json:"adPlacements,omitempty"`
Annotations []interface{} `json:"annotations,omitempty"`
Attestation *interface{} `json:"attestation,omitempty"`
Captions *interface{} `json:"captions,omitempty"`
Endscreen *interface{} `json:"endscreen,omitempty"`
FrameworkUpdates *interface{} `json:"frameworkUpdates,omitempty"`
Microformat *interface{} `json:"microformat,omitempty"`
PlayabilityStatus *PlayabilityStatus `json:"playabilityStatus,omitempty"`
PlaybackTracking *interface{} `json:"playbackTracking,omitempty"`
PlayerAds []interface{} `json:"playerAds,omitempty"`
PlayerConfig *interface{} `json:"playerConfig,omitempty"`
ResponseContext *interface{} `json:"responseContext,omitempty"`
Storyboards *interface{} `json:"storyboards,omitempty"`
StreamingData *StreamingData `json:"streamingData,omitempty"`
TrackingParams *string `json:"trackingParams,omitempty"`
VideoDetails *interface{} `json:"videoDetails,omitempty"`
}
type PlayabilityStatus struct {
Status *string `json:"status,omitempty"`
Reason *string `json:"reason,omitempty"`
PlayableInEmbed *bool `json:"playableInEmbed,omitempty"`
Miniplayer *interface{} `json:"miniplayer,omitempty"`
ContextParams *string `json:"contextParams,omitempty"`
}
type StreamingData struct {
ExpiresInSeconds *string `json:"expiresInSeconds,omitempty"`
Formats []Format `json:"formats,omitempty"`
AdaptiveFormats []Format `json:"adaptiveFormats,omitempty"`
}
type Format struct {
Itag *int64 `json:"itag,omitempty"`
URL *string `json:"url,omitempty"`
MIMEType *string `json:"mimeType,omitempty"`
Bitrate *int64 `json:"bitrate,omitempty"`
Width *int64 `json:"width,omitempty"`
Height *int64 `json:"height,omitempty"`
InitRange *interface{} `json:"initRange,omitempty"`
IndexRange *interface{} `json:"indexRange,omitempty"`
LastModified *string `json:"lastModified,omitempty"`
ContentLength *string `json:"contentLength,omitempty"`
Quality *string `json:"quality,omitempty"`
FPS *int64 `json:"fps,omitempty"`
QualityLabel *string `json:"qualityLabel,omitempty"`
ProjectionType *interface{} `json:"projectionType,omitempty"`
AverageBitrate *int64 `json:"averageBitrate,omitempty"`
ApproxDurationMS *string `json:"approxDurationMs,omitempty"`
ColorInfo *interface{} `json:"colorInfo,omitempty"`
HighReplication *bool `json:"highReplication,omitempty"`
AudioQuality *string `json:"audioQuality,omitempty"`
AudioSampleRate *string `json:"audioSampleRate,omitempty"`
AudioChannels *int64 `json:"audioChannels,omitempty"`
LoudnessDB *float64 `json:"loudnessDb,omitempty"`
SignatureCipher *string `json:"signatureCipher,omitempty"`
}