2017-05-08 15:21:30 +00:00
|
|
|
# Jitsi Meet SDK for iOS
|
|
|
|
|
2017-06-06 22:43:51 +00:00
|
|
|
This directory contains the source code of the Jitsi Meet app and the Jitsi Meet
|
|
|
|
SDK for iOS.
|
2017-05-08 15:21:30 +00:00
|
|
|
|
|
|
|
## Jitsi Meet SDK
|
|
|
|
|
2017-06-06 22:43:51 +00:00
|
|
|
JitsiMeet is an iOS framework which embodies the whole Jitsi Meet experience and
|
|
|
|
makes it reusable by third-party apps.
|
2017-05-08 15:21:30 +00:00
|
|
|
|
2017-06-06 22:43:51 +00:00
|
|
|
To get started:
|
|
|
|
|
|
|
|
1. Add a `JitsiMeetView` to your app using a Storyboard or Interface Builder,
|
|
|
|
for example.
|
|
|
|
|
|
|
|
2. Then, once the view has loaded, set the delegate in your controller and load
|
|
|
|
the desired URL:
|
2017-05-08 15:21:30 +00:00
|
|
|
|
|
|
|
```objc
|
|
|
|
- (void)viewDidLoad {
|
|
|
|
[super viewDidLoad];
|
|
|
|
|
2017-07-26 19:27:29 +00:00
|
|
|
JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;
|
2017-06-06 22:43:51 +00:00
|
|
|
|
2017-07-26 19:27:29 +00:00
|
|
|
jitsiMeetView.delegate = self;
|
|
|
|
[jitsiMeetView loadURL:nil];
|
2017-05-08 15:21:30 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### JitsiMeetView class
|
|
|
|
|
2017-06-06 22:43:51 +00:00
|
|
|
The `JitsiMeetView` class is the entry point to the SDK. It a subclass of
|
2017-05-08 15:21:30 +00:00
|
|
|
`UIView` which renders a full conference in the designated area.
|
|
|
|
|
2017-06-09 10:30:59 +00:00
|
|
|
#### delegate
|
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
Property for getting / setting the `JitsiMeetViewDelegate` on `JitsiMeetView`.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
#### welcomePageEnabled
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-06-09 19:09:23 +00:00
|
|
|
Property for getting / setting whether the Welcome page is enabled. If NO, a
|
|
|
|
black empty view will be rendered when not in a conference. Defaults to NO.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-07-26 00:06:03 +00:00
|
|
|
NOTE: Must be set before `loadURL:`/`loadURLString:` for it to take effect.
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-07-26 00:06:03 +00:00
|
|
|
#### loadURL:NSURL
|
2017-06-09 10:30:59 +00:00
|
|
|
|
2017-05-08 15:21:30 +00:00
|
|
|
```objc
|
2017-07-26 19:27:29 +00:00
|
|
|
[jitsiMeetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];
|
2017-05-08 15:21:30 +00:00
|
|
|
```
|
|
|
|
|
2017-07-26 00:06:03 +00:00
|
|
|
Loads a specific URL which may identify a conference to join. If the specified
|
2017-07-26 19:27:29 +00:00
|
|
|
URL is `nil` and the Welcome page is enabled, the Welcome page is displayed
|
|
|
|
instead.
|
|
|
|
|
|
|
|
#### loadURLObject:NSDictionary
|
|
|
|
|
|
|
|
```objc
|
|
|
|
[jitsiMeetView loadURLObject:@{
|
|
|
|
@"url": @"https://meet.jit.si/test123",
|
|
|
|
@"configOverwrite": @{
|
|
|
|
@"startWithAudioMuted": @YES,
|
|
|
|
@"startWithVideoMuted": @NO
|
|
|
|
}
|
|
|
|
}];
|
|
|
|
```
|
|
|
|
|
|
|
|
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) internally
|
|
|
|
are sufficient to construct a URL (string) while (2) abstracting the specifics
|
|
|
|
of constructing the URL away from API clients/consumers. If the specified URL is
|
|
|
|
`nil` and the Welcome page is enabled, the Welcome page is displayed instead.
|
2017-07-26 00:06:03 +00:00
|
|
|
|
|
|
|
#### loadURLString:NSString
|
|
|
|
|
|
|
|
```objc
|
2017-07-26 19:27:29 +00:00
|
|
|
[jitsiMeetView loadURLString:@"https://meet.jit.si/test123"];
|
2017-07-26 00:06:03 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Loads a specific URL which may identify a conference to join. If the specified
|
2017-07-26 19:27:29 +00:00
|
|
|
URL is `nil` and the Welcome page is enabled, the Welcome page is displayed
|
|
|
|
instead.
|
2017-05-08 15:21:30 +00:00
|
|
|
|
|
|
|
#### Universal / deep linking
|
|
|
|
|
2017-06-06 22:43:51 +00:00
|
|
|
In order to support Universal / deep linking, `JitsiMeetView` offers 2 class
|
|
|
|
methods that you app's delegate should call in order for the app to follow those
|
|
|
|
links.
|
2017-05-08 15:21:30 +00:00
|
|
|
|
|
|
|
```objc
|
2017-06-06 22:43:51 +00:00
|
|
|
- (BOOL)application:(UIApplication *)application
|
2017-05-08 15:21:30 +00:00
|
|
|
continueUserActivity:(NSUserActivity *)userActivity
|
2017-06-06 22:43:51 +00:00
|
|
|
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
|
2017-05-08 15:21:30 +00:00
|
|
|
{
|
|
|
|
return [JitsiMeetView application:application
|
|
|
|
continueUserActivity:userActivity
|
|
|
|
restorationHandler:restorationHandler];
|
2017-06-06 22:43:51 +00:00
|
|
|
}
|
2017-05-08 15:21:30 +00:00
|
|
|
|
|
|
|
- (BOOL)application:(UIApplication *)application
|
|
|
|
openURL:(NSURL *)url
|
|
|
|
sourceApplication:(NSString *)sourceApplication
|
2017-06-06 22:43:51 +00:00
|
|
|
annotation:(id)annotation
|
2017-05-08 15:21:30 +00:00
|
|
|
{
|
|
|
|
return [JitsiMeetView application:application
|
|
|
|
openURL:url
|
|
|
|
sourceApplication:sourceApplication
|
|
|
|
annotation:annotation];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### JitsiMeetViewDelegate
|
|
|
|
|
2017-06-07 15:50:30 +00:00
|
|
|
This delegate is optional, and can be set on the `JitsiMeetView` instance using
|
|
|
|
the `delegate` property.
|
|
|
|
|
|
|
|
It provides information about the conference state: was it joined, left, did it
|
|
|
|
fail?
|
|
|
|
|
|
|
|
All methods in this delegate are optional.
|
|
|
|
|
|
|
|
##### conferenceFailed
|
|
|
|
|
|
|
|
Called when a joining a conference was unsuccessful or when there was an error
|
|
|
|
while in a conference.
|
|
|
|
|
|
|
|
The `data` dictionary contains an "error" key describing the error and a "url"
|
|
|
|
key with the conference URL.
|
|
|
|
|
|
|
|
#### conferenceJoined
|
|
|
|
|
|
|
|
Called when a conference was joined.
|
|
|
|
|
|
|
|
The `data` dictionary contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### conferenceLeft
|
|
|
|
|
|
|
|
Called when a conference was left.
|
|
|
|
|
|
|
|
The `data` dictionary contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### conferenceWillJoin
|
|
|
|
|
|
|
|
Called before a conference is joined.
|
|
|
|
|
|
|
|
The `data` dictionary contains a "url" key with the conference URL.
|
|
|
|
|
|
|
|
#### conferenceWillLeave
|
|
|
|
|
|
|
|
Called before a conference is left.
|
|
|
|
|
|
|
|
The `data` dictionary contains a "url" key with the conference URL.
|