Permalink
Switch branches/tags
stable/jitsi-meet_3229 stable/jitsi-meet_3135 stable/jitsi-meet_2988 jitsi-meet_3346 jitsi-meet_3345 jitsi-meet_3344 jitsi-meet_3343 jitsi-meet_3342 jitsi-meet_3341 jitsi-meet_3340 jitsi-meet_3339 jitsi-meet_3338 jitsi-meet_3337 jitsi-meet_3336 jitsi-meet_3335 jitsi-meet_3334 jitsi-meet_3333 jitsi-meet_3332 jitsi-meet_3331 jitsi-meet_3330 jitsi-meet_3329 jitsi-meet_3328 jitsi-meet_3327 jitsi-meet_3326 jitsi-meet_3325 jitsi-meet_3324 jitsi-meet_3323 jitsi-meet_3322 jitsi-meet_3321 jitsi-meet_3320 jitsi-meet_3319 jitsi-meet_3318 jitsi-meet_3317 jitsi-meet_3316 jitsi-meet_3315 jitsi-meet_3314 jitsi-meet_3313 jitsi-meet_3312 jitsi-meet_3311 jitsi-meet_3310 jitsi-meet_3309 jitsi-meet_3308 jitsi-meet_3307 jitsi-meet_3306 jitsi-meet_3305 jitsi-meet_3304 jitsi-meet_3303 jitsi-meet_3302 jitsi-meet_3301 jitsi-meet_3300 jitsi-meet_3299 jitsi-meet_3298 jitsi-meet_3297 jitsi-meet_3296 jitsi-meet_3295 jitsi-meet_3294 jitsi-meet_3293 jitsi-meet_3292 jitsi-meet_3291 jitsi-meet_3290 jitsi-meet_3289 jitsi-meet_3288 jitsi-meet_3287 jitsi-meet_3286 jitsi-meet_3285 jitsi-meet_3284 jitsi-meet_3283 jitsi-meet_3282 jitsi-meet_3281 jitsi-meet_3280 jitsi-meet_3279 jitsi-meet_3278 jitsi-meet_3277 jitsi-meet_3276 jitsi-meet_3275 jitsi-meet_3274 jitsi-meet_3273 jitsi-meet_3272 jitsi-meet_3271 jitsi-meet_3270 jitsi-meet_3269 jitsi-meet_3268 jitsi-meet_3267 jitsi-meet_3266 jitsi-meet_3265 jitsi-meet_3264 jitsi-meet_3263 jitsi-meet_3262 jitsi-meet_3261 jitsi-meet_3260 jitsi-meet_3259 jitsi-meet_3258 jitsi-meet_3257 jitsi-meet_3256 jitsi-meet_3255 jitsi-meet_3254 jitsi-meet_3253 jitsi-meet_3252 jitsi-meet_3251 jitsi-meet_3250
Nothing to show
Find file Copy path
215 lines (146 sloc) 6.37 KB

Jitsi Meet SDK for iOS

Build

  1. Install all required dependencies.

  2. xcodebuild -workspace ios/jitsi-meet.xcworkspace -scheme JitsiMeet -destination='generic/platform=iOS' -configuration Release archive

Install

After successfully building Jitsi Meet SDK for iOS, copy ios/sdk/JitsiMeet.framework (if the path points to a symbolic link, follow the symbolic link) and node_modules/react-native-webrtc/ios/WebRTC.framework into your project.

API

JitsiMeet is an iOS framework which embodies the whole Jitsi Meet experience and makes it reusable by third-party apps.

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:

- (void)viewDidLoad {
  [super viewDidLoad];

  JitsiMeetView *jitsiMeetView = (JitsiMeetView *) self.view;

  jitsiMeetView.delegate = self;
  [jitsiMeetView loadURL:nil];
}

JitsiMeetView class

The JitsiMeetView class is the entry point to the SDK. It a subclass of UIView which renders a full conference in the designated area.

delegate

Property to get/set the JitsiMeetViewDelegate on JitsiMeetView.

defaultURL

Property to get/set the default base URL used to join a conference when a partial URL (e.g. a room name only) is specified to loadURLString:/loadURLObject:. If not set or if set to nil, the default built in JavaScript is used: https://meet.jit.si.

NOTE: Must be set (if at all) before loadURL:/loadURLString: for it to take effect.

pictureInPictureEnabled

Property to get / set whether Picture-in-Picture is enabled. Defaults to YES if delegate implements enterPictureInPicture:; otherwise, NO.

NOTE: Must be set (if at all) before loadURL:/loadURLString: for it to take effect.

welcomePageEnabled

Property to get/set whether the Welcome page is enabled. If NO, a black empty view will be rendered when not in a conference. Defaults to NO.

NOTE: Must be set (if at all) before loadURL:/loadURLString: for it to take effect.

loadURL:NSURL

[jitsiMeetView loadURL:[NSURL URLWithString:@"https://meet.jit.si/test123"]];

Loads a specific URL which may identify a conference to join. If the specified URL is nil and the Welcome page is enabled, the Welcome page is displayed instead.

loadURLObject:NSDictionary

[jitsiMeetView loadURLObject:@{
    @"config": @{
        @"startWithAudioMuted": @YES,
        @"startWithVideoMuted": @NO
    },
    @"url": @"https://meet.jit.si/test123"
}];

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.

loadURLString:NSString

[jitsiMeetView loadURLString:@"https://meet.jit.si/test123"];

Loads a specific URL which may identify a conference to join. If the specified URL is nil and the Welcome page is enabled, the Welcome page is displayed instead.

Universal / deep linking

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.

-  (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
  restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler
{
  return [JitsiMeetView application:application
               continueUserActivity:userActivity
                 restorationHandler:restorationHandler];
}

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation
{
  return [JitsiMeetView application:application
                            openURL:url
                  sourceApplication:sourceApplication
                         annotation:annotation];
}

JitsiMeetViewDelegate

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.

enterPictureInPicture

Called when entering Picture-in-Picture is requested by the user. The app should now activate its Picture-in-Picture implementation (and resize the associated JitsiMeetView. The latter will automatically detect its new size and adjust its user interface to a variant appropriate for the small size ordinarily associated with Picture-in-Picture.)

The data dictionary is empty.

loadConfigError

Called when loading the main configuration file from the Jitsi Meet deployment fails.

The data dictionary contains an "error" key with the error and a "url" key with the conference URL which necessitated the loading of the configuration file.

Picture-in-Picture

JitsiMeetView will automatically adjust its UI when presented in a Picture-in-Picture style scenario, in a rectangle too small to accommodate its "full" UI.

Jitsi Meet SDK does not currently implement native Picture-in-Picture on iOS. If desired, apps need to implement non-native Picture-in-Picture themselves and resize JitsiMeetView.

If pictureInPictureEnabled is set to YES or delegate implements enterPictureInPicture:, the in-call toolbar will render a button to afford the user to request entering Picture-in-Picture.