@nswitfy/jitsi-meet
TypeScript icon, indicating that this package has built-in type declarations

8.0.0-beta • Public • Published

⚠️ This plugin is on development and is use mainly for Witfy projects, will be improved as needed

Nativescript Jitsi Meet

A plugin which uses jitsi open source video conference SDK for both platforms, Android and IOS;

PR are really welcome if you want to add or work on the checklist below

😉

Installation

Nativescript 7+

tns plugin add @nswitfy/jitsi-meet

Nativescript 6+

tns plugin add nativescript-jitsi-meet

I'm working on

  • Add call listeners to Android such as conferenceTerminated and etc.

  • Android is not accepting custom jitsi server yet, only IOS.

  • Add core demo version

  • Test and add Vue demo version

  • In the future I'd like to have more control of jitsi features such as hide invitation button, start call with password and etc. But so far I haven't found if Jisti already have this available on their framework and sdk.

Prerequisites / Requirements

The only requisites I found necessary so far is that your application may use *android:minSdkVersion 23*;

Android

IOS

In your info.plist file add the follow lines:

...

    <key>NSCameraUsageDescription</key>
    <string>Can we use your camera?</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>Can we use your photo library, please? :)</string>
    <key>NSCalendarsUsageDescription</key>
    <string>Give access to your calendar to improve your conference experience</string>
    <key>UIBackgroundModes</key>
    <array>
      <string>audio</string>
      <string>voip</string>
    </array>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <string>NO</string>

...

Angular Usage

import { NativescriptJitsiMeetConferenceOptions, NativescriptJitsiMeet } from 'nativescript-jitsi-meet';

...

public startMeet() {
    const jitsiOptions: NativescriptJitsiMeetConferenceOptions = {
            roomName: 'test',  // the only mandatory field
            audioMuted: false,
            videoMuted: false,
            audioOnly: false,
            featureFlags: {
                closeCaptionsEnabled: false,
                calendarEnabled: false,
                callIntegration: false,
                chatEnabled: false,
                inviteEnabled: false,
                iosRecordingEnabled: false,
                pipEnabled: false,
                welcomePageEnabled: true
            }
    };

    const jitsiCaller: NativescriptJitsiMeet = new NativescriptJitsiMeet();

    jitsiCaller.on('conferenceWillJoin', (url: string, error: string) => {
        console.log(`conferenceWillJoin`);
    });

    jitsiCaller.on('conferenceJoined', (url: string, error: string) => {
        console.log(`conferenceJoined`);
    });

    jitsiCaller.on('conferenceTerminated', (url: string, error: string) => {
        console.log(`conferenceTerminated`);
    });

    // this function will start your meeting;
    jitsiCaller.startMeeting(this.jitsiOptions);
}

...

API

NativescriptJitsiMeet

By default the server https://meet.jit.si/ is the default server used by this plugin but you have your own jitsi server you can pass the path on the constructor of NativescriptJitsiMeet.

startMeeting

This function will receive as parameter your options and will start the meet;

addEventListener

You can use this function to add your listener to the events listed below. The parameters are the listener name and your callback function. Take a look on the usage above.

on

Same as addEventListener, just smaller :)

Jitsi configuration

NativescriptJitsiMeetConferenceOptions

Property Default Description
roomName string, only mandatory property your room name, keep in mind that if you use this plugin if jitsi default server your room will be always public at the start
audioMuted false start the meet with the audio muted
videoMuted false start the meet with the video muted
audioOnly false start the meet with audio only
featureFlags object some jitsi meet configuration flags

feature flags object properties

Feature flags property Default Description
closeCaptionsEnabled false active close caption
calendarEnabled false ??active calendar
callIntegration false ??start meet call with call integration
chatEnabled false start meet with chat enable
iosRecordingEnabled false enable ios recording video
pipEnabled false enable pip features
welcomePageEnabled false enables the jitsi server welcome page, which is not being in use right now because everytime the user close the call we close the view, so this will not be shown by now

Events

Only IOS for now

conferenceWillJoin

First event fired before actualy join the meet;

conferenceJoined

Event fired when user actualy join the meet;

conferenceTerminated

Event fired when call is terminated;

License

Apache License Version 2.0, January 2004

Package Sidebar

Install

npm i @nswitfy/jitsi-meet

Weekly Downloads

0

Version

8.0.0-beta

License

Apache-2.0

Unpacked Size

92.5 kB

Total Files

19

Last publish

Collaborators

  • dborba