Jitsi widget: Manage "Back To App"

This commit is contained in:
manuroe
2017-08-11 14:18:10 +02:00
parent 8ef4495bf0
commit c52f7c85b2
6 changed files with 208 additions and 37 deletions
@@ -20,6 +20,8 @@
#import "WidgetManager.h"
@protocol JitsiViewControllerDelegate;
/**
The `JitsiViewController` is a specific VC for handling a jitsi widget using
jitsi-meet iOS SDK instead of displaying it in a webview like other scalar widgets.
@@ -29,11 +31,6 @@
*/
@interface JitsiViewController : MXKViewController <JitsiMeetViewDelegate>
/**
The jitsi-meet SDK view.
*/
@property (weak, nonatomic) IBOutlet JitsiMeetView *jitsiMeetView;
/**
Returns the `UINib` object initialized for a `JitsiViewController`.
@@ -52,7 +49,11 @@
+ (instancetype)jitsiViewController;
/**
Make
Make jitsi-meet iOS SDK open the jitsi conference indicated by a jitsi widget.
@param widget the jitsi widget.
@param video to indicate voice or video call.
@return YES if the operation is successful.
*/
- (BOOL)openWidget:(Widget*)widget withVideo:(BOOL)video;
@@ -61,4 +62,39 @@
*/
@property (nonatomic, readonly) Widget *widget;
/**
The delegate for the view controller.
*/
@property (nonatomic) id<JitsiViewControllerDelegate> delegate;
#pragma mark - Xib attributes
// The jitsi-meet SDK view
@property (weak, nonatomic) IBOutlet JitsiMeetView *jitsiMeetView;
@property (weak, nonatomic) IBOutlet UIButton *backToAppButton;
@end
/**
Delegate for `JitsiViewController` object
*/
@protocol JitsiViewControllerDelegate <NSObject>
/**
Tells the delegate to dismiss the jitsi view controller.
@param jitsiViewController the jitsi view controller.
@param completion the block to execute at the end of the operation.
*/
- (void)jitsiViewController:(JitsiViewController *)jitsiViewController dismissViewJitsiController:(void (^)())completion;
/**
Tells the delegate to put the jitsi view controller in background.
@param jitsiViewController the jitsi view controller.
@param completion the block to execute at the end of the operation.
*/
- (void)jitsiViewController:(JitsiViewController *)jitsiViewController goBackToApp:(void (^)())completion;
@end