-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathApiDefinition.cs
More file actions
249 lines (189 loc) · 10.5 KB
/
ApiDefinition.cs
File metadata and controls
249 lines (189 loc) · 10.5 KB
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
using Foundation;
using ObjCRuntime;
using UIKit;
using WebKit;
namespace YouTubeiOSPlayerHelper
{
[Static]
partial interface Constants
{
// extern double youtube_ios_player_helperVersionNumber;
[Field("youtube_ios_player_helperVersionNumber", "__Internal")]
double youtube_ios_player_helperVersionNumber { get; }
// extern const unsigned char [] youtube_ios_player_helperVersionString;
[Field("youtube_ios_player_helperVersionString", "__Internal")]
NSString youtube_ios_player_helperVersionString { get; }
}
// typedef void (^YTIntCompletionHandler)(int, NSError * _Nullable);
delegate void YTIntCompletionHandler(int arg0, [NullAllowed] NSError arg1);
// typedef void (^YTFloatCompletionHandler)(float, NSError * _Nullable);
delegate void YTFloatCompletionHandler(float arg0, [NullAllowed] NSError arg1);
// typedef void (^YTDoubleCompletionHandler)(double, NSError * _Nullable);
delegate void YTDoubleCompletionHandler(double arg0, [NullAllowed] NSError arg1);
// typedef void (^YTStringCompletionHandler)(NSString * _Nullable, NSError * _Nullable);
delegate void YTStringCompletionHandler([NullAllowed] string arg0, [NullAllowed] NSError arg1);
// typedef void (^YTArrayCompletionHandler)(NSArray * _Nullable, NSError * _Nullable);
delegate void YTArrayCompletionHandler([NullAllowed] NSObject[] arg0, [NullAllowed] NSError arg1);
// typedef void (^YTURLCompletionHandler)(NSURL * _Nullable, NSError * _Nullable);
delegate void YTURLCompletionHandler([NullAllowed] NSUrl arg0, [NullAllowed] NSError arg1);
// typedef void (^YTPlayerStateCompletionHandler)(YTPlayerState, NSError * _Nullable);
delegate void YTPlayerStateCompletionHandler(YTPlayerState arg0, [NullAllowed] NSError arg1);
// typedef void (^YTPlaybackQualityCompletionHandler)(YTPlaybackQuality, NSError * _Nullable);
delegate void YTPlaybackQualityCompletionHandler(YTPlaybackQuality arg0, [NullAllowed] NSError arg1);
// @protocol YTPlayerViewDelegate <NSObject>
[Protocol, Model]
[BaseType(typeof(NSObject))]
interface YTPlayerViewDelegate
{
// @optional -(void)playerViewDidBecomeReady:(YTPlayerView * _Nonnull)playerView;
[Export("playerViewDidBecomeReady:")]
void PlayerViewDidBecomeReady(YTPlayerView playerView);
// @optional -(void)playerView:(YTPlayerView * _Nonnull)playerView didChangeToState:(YTPlayerState)state;
[Export("playerView:didChangeToState:")]
void PlayerView(YTPlayerView playerView, YTPlayerState state);
// @optional -(void)playerView:(YTPlayerView * _Nonnull)playerView didChangeToQuality:(YTPlaybackQuality)quality;
[Export("playerView:didChangeToQuality:")]
void PlayerView(YTPlayerView playerView, YTPlaybackQuality quality);
// @optional -(void)playerView:(YTPlayerView * _Nonnull)playerView receivedError:(YTPlayerError)error;
[Export("playerView:receivedError:")]
void PlayerView(YTPlayerView playerView, YTPlayerError error);
// @optional -(void)playerView:(YTPlayerView * _Nonnull)playerView didPlayTime:(float)playTime;
[Export("playerView:didPlayTime:")]
void PlayerView(YTPlayerView playerView, float playTime);
// @optional -(UIColor * _Nonnull)playerViewPreferredWebViewBackgroundColor:(YTPlayerView * _Nonnull)playerView;
[Export("playerViewPreferredWebViewBackgroundColor:")]
UIColor PlayerViewPreferredWebViewBackgroundColor(YTPlayerView playerView);
// @optional -(UIView * _Nullable)playerViewPreferredInitialLoadingView:(YTPlayerView * _Nonnull)playerView;
[Export("playerViewPreferredInitialLoadingView:")]
[return: NullAllowed]
UIView PlayerViewPreferredInitialLoadingView(YTPlayerView playerView);
}
// @interface YTPlayerView : UIView
[BaseType(typeof(UIView))]
interface YTPlayerView
{
// @property (readonly, nonatomic) WKWebView * _Nullable webView;
[NullAllowed, Export("webView")]
WKWebView WebView { get; }
[Wrap("WeakDelegate")]
[NullAllowed]
YTPlayerViewDelegate Delegate { get; set; }
// @property (nonatomic, weak) id<YTPlayerViewDelegate> _Nullable delegate;
[NullAllowed, Export("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
// -(BOOL)loadWithVideoId:(NSString * _Nonnull)videoId;
[Export("loadWithVideoId:")]
bool LoadWithVideoId(string videoId);
// -(BOOL)loadWithPlaylistId:(NSString * _Nonnull)playlistId;
[Export("loadWithPlaylistId:")]
bool LoadWithPlaylistId(string playlistId);
// -(BOOL)loadWithVideoId:(NSString * _Nonnull)videoId playerVars:(NSDictionary * _Nullable)playerVars;
[Export("loadWithVideoId:playerVars:")]
bool LoadWithVideoId(string videoId, [NullAllowed] NSDictionary playerVars);
// -(BOOL)loadWithPlaylistId:(NSString * _Nonnull)playlistId playerVars:(NSDictionary * _Nullable)playerVars;
[Export("loadWithPlaylistId:playerVars:")]
bool LoadWithPlaylistId(string playlistId, [NullAllowed] NSDictionary playerVars);
// -(BOOL)loadWithPlayerParams:(NSDictionary * _Nullable)additionalPlayerParams;
[Export("loadWithPlayerParams:")]
bool LoadWithPlayerParams([NullAllowed] NSDictionary additionalPlayerParams);
// -(void)playVideo;
[Export("playVideo")]
void PlayVideo();
// -(void)pauseVideo;
[Export("pauseVideo")]
void PauseVideo();
// -(void)stopVideo;
[Export("stopVideo")]
void StopVideo();
// -(void)seekToSeconds:(float)seekToSeconds allowSeekAhead:(BOOL)allowSeekAhead;
[Export("seekToSeconds:allowSeekAhead:")]
void SeekToSeconds(float seekToSeconds, bool allowSeekAhead);
// -(void)cueVideoById:(NSString * _Nonnull)videoId startSeconds:(float)startSeconds;
[Export("cueVideoById:startSeconds:")]
void CueVideoById(string videoId, float startSeconds);
// -(void)cueVideoById:(NSString * _Nonnull)videoId startSeconds:(float)startSeconds endSeconds:(float)endSeconds;
[Export("cueVideoById:startSeconds:endSeconds:")]
void CueVideoById(string videoId, float startSeconds, float endSeconds);
// -(void)loadVideoById:(NSString * _Nonnull)videoId startSeconds:(float)startSeconds;
[Export("loadVideoById:startSeconds:")]
void LoadVideoById(string videoId, float startSeconds);
// -(void)loadVideoById:(NSString * _Nonnull)videoId startSeconds:(float)startSeconds endSeconds:(float)endSeconds;
[Export("loadVideoById:startSeconds:endSeconds:")]
void LoadVideoById(string videoId, float startSeconds, float endSeconds);
// -(void)cueVideoByURL:(NSString * _Nonnull)videoURL startSeconds:(float)startSeconds;
[Export("cueVideoByURL:startSeconds:")]
void CueVideoByURL(string videoURL, float startSeconds);
// -(void)cueVideoByURL:(NSString * _Nonnull)videoURL startSeconds:(float)startSeconds endSeconds:(float)endSeconds;
[Export("cueVideoByURL:startSeconds:endSeconds:")]
void CueVideoByURL(string videoURL, float startSeconds, float endSeconds);
// -(void)loadVideoByURL:(NSString * _Nonnull)videoURL startSeconds:(float)startSeconds;
[Export("loadVideoByURL:startSeconds:")]
void LoadVideoByURL(string videoURL, float startSeconds);
// -(void)loadVideoByURL:(NSString * _Nonnull)videoURL startSeconds:(float)startSeconds endSeconds:(float)endSeconds;
[Export("loadVideoByURL:startSeconds:endSeconds:")]
void LoadVideoByURL(string videoURL, float startSeconds, float endSeconds);
// -(void)cuePlaylistByPlaylistId:(NSString * _Nonnull)playlistId index:(int)index startSeconds:(float)startSeconds;
[Export("cuePlaylistByPlaylistId:index:startSeconds:")]
void CuePlaylistByPlaylistId(string playlistId, int index, float startSeconds);
// -(void)cuePlaylistByVideos:(NSArray * _Nonnull)videoIds index:(int)index startSeconds:(float)startSeconds;
[Export("cuePlaylistByVideos:index:startSeconds:")]
void CuePlaylistByVideos(NSObject[] videoIds, int index, float startSeconds);
// -(void)loadPlaylistByPlaylistId:(NSString * _Nonnull)playlistId index:(int)index startSeconds:(float)startSeconds;
[Export("loadPlaylistByPlaylistId:index:startSeconds:")]
void LoadPlaylistByPlaylistId(string playlistId, int index, float startSeconds);
// -(void)loadPlaylistByVideos:(NSArray * _Nonnull)videoIds index:(int)index startSeconds:(float)startSeconds;
[Export("loadPlaylistByVideos:index:startSeconds:")]
void LoadPlaylistByVideos(NSObject[] videoIds, int index, float startSeconds);
// -(void)nextVideo;
[Export("nextVideo")]
void NextVideo();
// -(void)previousVideo;
[Export("previousVideo")]
void PreviousVideo();
// -(void)playVideoAt:(int)index;
[Export("playVideoAt:")]
void PlayVideoAt(int index);
// -(void)playbackRate:(YTFloatCompletionHandler _Nullable)completionHandler;
[Export("playbackRate:")]
void PlaybackRate([NullAllowed] YTFloatCompletionHandler completionHandler);
// -(void)setPlaybackRate:(float)suggestedRate;
[Export("setPlaybackRate:")]
void SetPlaybackRate(float suggestedRate);
// -(void)availablePlaybackRates:(YTArrayCompletionHandler _Nullable)completionHandler;
[Export("availablePlaybackRates:")]
void AvailablePlaybackRates([NullAllowed] YTArrayCompletionHandler completionHandler);
// -(void)setLoop:(BOOL)loop;
[Export("setLoop:")]
void SetLoop(bool loop);
// -(void)setShuffle:(BOOL)shuffle;
[Export("setShuffle:")]
void SetShuffle(bool shuffle);
// -(void)videoLoadedFraction:(YTFloatCompletionHandler _Nullable)completionHandler;
[Export("videoLoadedFraction:")]
void VideoLoadedFraction([NullAllowed] YTFloatCompletionHandler completionHandler);
// -(void)playerState:(YTPlayerStateCompletionHandler _Nullable)completionHandler;
[Export("playerState:")]
void PlayerState([NullAllowed] YTPlayerStateCompletionHandler completionHandler);
// -(void)currentTime:(YTFloatCompletionHandler _Nullable)completionHandler;
[Export("currentTime:")]
void CurrentTime([NullAllowed] YTFloatCompletionHandler completionHandler);
// -(void)duration:(YTDoubleCompletionHandler _Nullable)completionHandler;
[Export("duration:")]
void Duration([NullAllowed] YTDoubleCompletionHandler completionHandler);
// -(void)videoUrl:(YTURLCompletionHandler _Nullable)completionHandler;
[Export("videoUrl:")]
void VideoUrl([NullAllowed] YTURLCompletionHandler completionHandler);
// -(void)videoEmbedCode:(YTStringCompletionHandler _Nullable)completionHandler;
[Export("videoEmbedCode:")]
void VideoEmbedCode([NullAllowed] YTStringCompletionHandler completionHandler);
// -(void)playlist:(YTArrayCompletionHandler _Nullable)completionHandler;
[Export("playlist:")]
void Playlist([NullAllowed] YTArrayCompletionHandler completionHandler);
// -(void)playlistIndex:(YTIntCompletionHandler _Nullable)completionHandler;
[Export("playlistIndex:")]
void PlaylistIndex([NullAllowed] YTIntCompletionHandler completionHandler);
// -(void)removeWebView;
[Export("removeWebView")]
void RemoveWebView();
}
}