|
@@ -101,6 +101,38 @@ static void initializeViewsMap() {
|
101
|
101
|
|
102
|
102
|
#pragma mark API
|
103
|
103
|
|
|
104
|
+- (void)join:(NSDictionary *_Nullable)url {
|
|
105
|
+ [self loadURL:url];
|
|
106
|
+}
|
|
107
|
+
|
|
108
|
+- (void)leave {
|
|
109
|
+ [self loadURL:nil];
|
|
110
|
+}
|
|
111
|
+
|
|
112
|
+#pragma pictureInPictureEnabled getter / setter
|
|
113
|
+
|
|
114
|
+- (void) setPictureInPictureEnabled:(BOOL)pictureInPictureEnabled {
|
|
115
|
+ _pictureInPictureEnabled
|
|
116
|
+ = [NSNumber numberWithBool:pictureInPictureEnabled];
|
|
117
|
+}
|
|
118
|
+
|
|
119
|
+- (BOOL) pictureInPictureEnabled {
|
|
120
|
+ if (_pictureInPictureEnabled) {
|
|
121
|
+ return [_pictureInPictureEnabled boolValue];
|
|
122
|
+ }
|
|
123
|
+
|
|
124
|
+ // The SDK/JitsiMeetView client/consumer did not explicitly enable/disable
|
|
125
|
+ // Picture-in-Picture. However, we may automatically deduce their
|
|
126
|
+ // intentions: we need the support of the client in order to implement
|
|
127
|
+ // Picture-in-Picture on iOS (in contrast to Android) so if the client
|
|
128
|
+ // appears to have provided the support then we can assume that they did it
|
|
129
|
+ // with the intention to have Picture-in-Picture enabled.
|
|
130
|
+ return self.delegate
|
|
131
|
+ && [self.delegate respondsToSelector:@selector(enterPictureInPicture:)];
|
|
132
|
+}
|
|
133
|
+
|
|
134
|
+#pragma mark Private methods
|
|
135
|
+
|
104
|
136
|
/**
|
105
|
137
|
* Loads a specific URL which may identify a conference to join. The URL is
|
106
|
138
|
* specified in the form of an `NSDictionary` of properties which (1)
|
|
@@ -160,30 +192,6 @@ static void initializeViewsMap() {
|
160
|
192
|
}
|
161
|
193
|
}
|
162
|
194
|
|
163
|
|
-#pragma pictureInPictureEnabled getter / setter
|
164
|
|
-
|
165
|
|
-- (void) setPictureInPictureEnabled:(BOOL)pictureInPictureEnabled {
|
166
|
|
- _pictureInPictureEnabled
|
167
|
|
- = [NSNumber numberWithBool:pictureInPictureEnabled];
|
168
|
|
-}
|
169
|
|
-
|
170
|
|
-- (BOOL) pictureInPictureEnabled {
|
171
|
|
- if (_pictureInPictureEnabled) {
|
172
|
|
- return [_pictureInPictureEnabled boolValue];
|
173
|
|
- }
|
174
|
|
-
|
175
|
|
- // The SDK/JitsiMeetView client/consumer did not explicitly enable/disable
|
176
|
|
- // Picture-in-Picture. However, we may automatically deduce their
|
177
|
|
- // intentions: we need the support of the client in order to implement
|
178
|
|
- // Picture-in-Picture on iOS (in contrast to Android) so if the client
|
179
|
|
- // appears to have provided the support then we can assume that they did it
|
180
|
|
- // with the intention to have Picture-in-Picture enabled.
|
181
|
|
- return self.delegate
|
182
|
|
- && [self.delegate respondsToSelector:@selector(enterPictureInPicture:)];
|
183
|
|
-}
|
184
|
|
-
|
185
|
|
-#pragma mark Private methods
|
186
|
|
-
|
187
|
195
|
+ (BOOL)loadURLInViews:(NSDictionary *)urlObject {
|
188
|
196
|
BOOL handled = NO;
|
189
|
197
|
|