Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
ios: add initial implementation of join / leave
Saúl Ibarra Corretgé549b495d1646
diff --git a/ios/app/src/ViewController.m b/ios/app/src/ViewController.mindex ffde23a420..6fbd9dce9f 100644--- a/ios/app/src/ViewController.m+++ b/ios/app/src/ViewController.m@@ -39,7 +39,7 @@// anyway.view.welcomePageEnabled = YES;- [view loadURL:[[JitsiMeet sharedInstance] getInitialURL]];+ [view join:[[JitsiMeet sharedInstance] getInitialURL]];}// JitsiMeetViewDelegatediff --git a/ios/sdk/src/JitsiMeetView.h b/ios/sdk/src/JitsiMeetView.hindex e1dcf33e83..0c7cc0ec1d 100644--- a/ios/sdk/src/JitsiMeetView.h+++ b/ios/sdk/src/JitsiMeetView.h@@ -34,6 +34,7 @@@property (nonatomic) BOOL welcomePageEnabled;-- (void)loadURL:(NSDictionary * _Nullable)urlObject;+- (void)join:(NSDictionary * _Nullable)url;+- (void)leave;@enddiff --git a/ios/sdk/src/JitsiMeetView.m b/ios/sdk/src/JitsiMeetView.mindex 90457dbd6b..2d88666898 100644--- a/ios/sdk/src/JitsiMeetView.m+++ b/ios/sdk/src/JitsiMeetView.m@@ -101,6 +101,38 @@ static void initializeViewsMap() {#pragma mark API+- (void)join:(NSDictionary *_Nullable)url {+ [self loadURL:url];+}++- (void)leave {+ [self loadURL:nil];+}++#pragma pictureInPictureEnabled getter / setter++- (void) setPictureInPictureEnabled:(BOOL)pictureInPictureEnabled {+ _pictureInPictureEnabled+ = [NSNumber numberWithBool:pictureInPictureEnabled];+}++- (BOOL) pictureInPictureEnabled {+ if (_pictureInPictureEnabled) {+ return [_pictureInPictureEnabled boolValue];+ }++ // The SDK/JitsiMeetView client/consumer did not explicitly enable/disable+ // Picture-in-Picture. However, we may automatically deduce their+ // intentions: we need the support of the client in order to implement+ // Picture-in-Picture on iOS (in contrast to Android) so if the client+ // appears to have provided the support then we can assume that they did it+ // with the intention to have Picture-in-Picture enabled.+ return self.delegate+ && [self.delegate respondsToSelector:@selector(enterPictureInPicture:)];+}++#pragma mark Private methods+/*** Loads a specific URL which may identify a conference to join. The URL is* specified in the form of an `NSDictionary` of properties which (1)@@ -160,30 +192,6 @@ static void initializeViewsMap() {}}-#pragma pictureInPictureEnabled getter / setter--- (void) setPictureInPictureEnabled:(BOOL)pictureInPictureEnabled {- _pictureInPictureEnabled- = [NSNumber numberWithBool:pictureInPictureEnabled];-}--- (BOOL) pictureInPictureEnabled {- if (_pictureInPictureEnabled) {- return [_pictureInPictureEnabled boolValue];- }-- // The SDK/JitsiMeetView client/consumer did not explicitly enable/disable- // Picture-in-Picture. However, we may automatically deduce their- // intentions: we need the support of the client in order to implement- // Picture-in-Picture on iOS (in contrast to Android) so if the client- // appears to have provided the support then we can assume that they did it- // with the intention to have Picture-in-Picture enabled.- return self.delegate- && [self.delegate respondsToSelector:@selector(enterPictureInPicture:)];-}--#pragma mark Private methods-+ (BOOL)loadURLInViews:(NSDictionary *)urlObject {BOOL handled = NO;