jiti-meet/ios
Saúl Ibarra Corretgé 122ebe48c7 [RN] Cache avatars and provide a default in case load fails
Avatars are cached to the filesystem and loaded from there when requested again.
The cache is cleaned after a conference ends and on application startup
(defensive move).

In addition, implement a fully local avatar system, which is used as a fallback
when loading a remote avatar fails. It can also be forced using a prop.

The fully local avatars use a user icon as a mask and apply a background color
qhich is picked by hashing the URI passed to the avatar. If no URI is passed a
random color is chosen.

A grace period of 1 second is also implemented so a default local avatar will be
rendered if an Avatar component is mounted but has no URI. If a URI is specified
later on, it will be loaded and displayed. In case loading the remote avatar
fails, the locally generated one will be used.
2017-08-03 13:45:41 -05:00
..
app Fixes jsdocs, formatting 2017-07-26 15:54:57 -05:00
jitsi-meet.xcworkspace [RN] Consistency in Jitsi Meet SDK for iOS 2017-06-08 01:13:12 -05:00
scripts [iOS] Don't bring the packager to the foreground upon launch 2017-07-06 14:07:20 +02:00
sdk [Android] Use loadURL in the app 2017-08-01 12:07:22 -05:00
Podfile [RN] Cache avatars and provide a default in case load fails 2017-08-03 13:45:41 -05:00
README.md [RN] Alternative to JitsiMeetView.loadURL w/o URL 2017-07-26 15:53:35 -05:00
apple-app-site-association [iOS] Prepare for App Store release 2016-11-13 18:45:40 -06:00

README.md

Jitsi Meet SDK for iOS

This directory contains the source code of the Jitsi Meet app and the Jitsi Meet SDK for iOS.

Jitsi Meet SDK

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 for getting / setting the JitsiMeetViewDelegate on JitsiMeetView.

welcomePageEnabled

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.

NOTE: Must be set 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:@{
    @"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.

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.