capacitor-jitsi-meet 2.2.0-beta.0 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/README.md +18 -10
- package/android/README.md +5 -1
- package/android/src/main/java/com/capacitor/jitsi/plugin/JitsiActivity.java +40 -4
- package/dist/esm/definitions.d.ts +4 -19
- package/dist/esm/web.d.ts +6 -21
- package/dist/esm/web.js.map +1 -1
- package/ios/Plugin/Plugin/JitsiMeetViewController.swift +7 -0
- package/ios/Plugin/Plugin/Plugin.swift +12 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,31 @@ Each version of the capacitor plugin uses a specific Jitsi SDK version. In iOS d
|
|
|
4
4
|
|
|
5
5
|
See Jitsi-meet SDK [changelog](https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md)
|
|
6
6
|
|
|
7
|
-
# 2.2.
|
|
7
|
+
# 2.2.1 (2022-03-11)
|
|
8
8
|
|
|
9
|
+
- bug fix: onConferenceJoined and onConferenceLeft not firing
|
|
10
|
+
- bug fix: iOS leaveConference() not working
|
|
11
|
+
|
|
12
|
+
# 2.2.0 (2022-03-04)
|
|
13
|
+
|
|
14
|
+
## Breaking Changes
|
|
15
|
+
|
|
16
|
+
The newly introduced featureFlags param provides a lot of flexibility to the developers, as the developers can now directly control ALL featureFlags settings supported by the SDKs, and no longer need to map the plugin params to the SDK featureFlags params, as we have done before.
|
|
17
|
+
|
|
18
|
+
- with this increased flexibility, the following plugin params will be deprecated in our 3.0 version. Their default values will be reset to following the SDK default values in this current plugin release.
|
|
19
|
+
- callIntegrationEnabled (plugin default true -> SDK default true)
|
|
20
|
+
- liveStreamingEnabled (plugin default false -> 4.1.0 SDK default auto-detected)
|
|
21
|
+
- recordingEnabled (plugin default false -> 4.1.0 Android SDK true, 4.1.0 iOS SDK false)
|
|
22
|
+
- screenSharingEnabled (plugin default false -> 4.1.0 Android SDK true, 4.1.0 iOS SDK false)
|
|
23
|
+
|
|
24
|
+
Going forward, for a stable production build, my recommendation is to add the following featureFlags params in your syntax:
|
|
25
|
+
```
|
|
26
|
+
featureFlags: {
|
|
27
|
+
'recording.enabled': false, // disable as it requires Dropbox integration
|
|
28
|
+
'live-streaming.enabled': false, // 'Sign in with Google' button not yet functional
|
|
29
|
+
'android.screensharing.enabled': false // experimental feature, not fully production ready
|
|
30
|
+
},
|
|
31
|
+
```
|
|
9
32
|
- adds the subject, featureFlags, and configOverrides params
|
|
10
33
|
|
|
11
34
|
# 2.1.3 (2022-02-09)
|
package/README.md
CHANGED
|
@@ -72,7 +72,6 @@ import { Jitsi } from 'capacitor-jitsi-meet';
|
|
|
72
72
|
// On Capacitor 1 and 2
|
|
73
73
|
import { Plugins } from '@capacitor/core';
|
|
74
74
|
import 'capacitor-jitsi-meet';
|
|
75
|
-
|
|
76
75
|
const { Jitsi } = Plugins;
|
|
77
76
|
```
|
|
78
77
|
|
|
@@ -81,7 +80,14 @@ const result = await Jitsi.joinConference({
|
|
|
81
80
|
// required parameters
|
|
82
81
|
roomName: 'room1', // room identifier for the conference
|
|
83
82
|
url: 'https://meet.jit.si', // endpoint of the Jitsi Meet video bridge
|
|
84
|
-
|
|
83
|
+
|
|
84
|
+
// recommended settings for production build. see full list of featureFlags in the official Jitsi Meet SDK documentation
|
|
85
|
+
featureFlags: {
|
|
86
|
+
'recording.enabled': false, // disable as it requires Dropbox integration
|
|
87
|
+
'live-streaming.enabled': false, // 'sign in on Google' button not yet functional
|
|
88
|
+
'android.screensharing.enabled': false // experimental feature, not fully production ready
|
|
89
|
+
},
|
|
90
|
+
|
|
85
91
|
// optional parameters
|
|
86
92
|
subject: string, // name of the video room
|
|
87
93
|
displayName: string, // user's display name
|
|
@@ -92,17 +98,17 @@ const result = await Jitsi.joinConference({
|
|
|
92
98
|
chatEnabled: false, // enable Chat feature, default: true
|
|
93
99
|
inviteEnabled: false, // enable Invitation feature, default: true
|
|
94
100
|
|
|
95
|
-
// advanced
|
|
101
|
+
// advanced parameters (optional)
|
|
96
102
|
token: string, // jwt authentication token
|
|
97
|
-
featureFlags: { 'call-integration.enabled': true, 'live-streaming.enabled': false }, // see list of featureFlags in the official Jitsi Meet SDK documentation
|
|
98
103
|
configOverrides: { 'p2p.enabled': false }, // see list of config overrides in the official Jitsi Meet SDK documentation
|
|
99
104
|
|
|
100
105
|
// advanced settings to be deprecated in 3.0. Use featureFlags and configOverrides instead
|
|
101
|
-
callIntegrationEnabled: true, // enable call integration (CallKit on iOS, ConnectionService on Android)
|
|
102
|
-
liveStreamingEnabled: false, // enable live streaming feature
|
|
103
|
-
recordingEnabled: false, // (experimental) enable recording feature
|
|
104
|
-
screenSharingEnabled: false, // enable screen sharing feature
|
|
106
|
+
callIntegrationEnabled: true, // enable call integration (CallKit on iOS, ConnectionService on Android)
|
|
107
|
+
liveStreamingEnabled: false, // enable live streaming feature
|
|
108
|
+
recordingEnabled: false, // (experimental) enable recording feature
|
|
109
|
+
screenSharingEnabled: false, // (experimental) enable screen sharing feature
|
|
105
110
|
});
|
|
111
|
+
console.log(result) // { success: true }
|
|
106
112
|
|
|
107
113
|
window.addEventListener('onConferenceJoined', () => {
|
|
108
114
|
// do things here
|
|
@@ -111,6 +117,8 @@ window.addEventListener('onConferenceLeft', () => {
|
|
|
111
117
|
// do things here
|
|
112
118
|
});
|
|
113
119
|
|
|
120
|
+
const result = await Jitsi.leaveConference()
|
|
121
|
+
console.log(result) // { success: true }
|
|
114
122
|
```
|
|
115
123
|
|
|
116
124
|
3. Build the project
|
|
@@ -129,9 +137,9 @@ This plugin uses the Jitsi Meet SDK. See the [Jitsi Meet SDK documentation](http
|
|
|
129
137
|
|
|
130
138
|
You can see a [React Demo App](https://github.com/calvinckho/react-capacitor-jitsi-meet-sample) which runs the Jitsi meeting on the Android device
|
|
131
139
|
|
|
132
|
-
## Feature Requests
|
|
140
|
+
## Feature Requests, Jitsi SDK UI Customizations, Picture-In-Picture Mode Implementation
|
|
133
141
|
|
|
134
|
-
|
|
142
|
+
For feature requests, create an issue with a label 'feature request'. I also offer paid consultation services, such as SDK UI customization, and helping you implement the [Picture-in-Picture mode of the video view](https://ds.ivr.solutions/media/pip_demo.mp4). To submit a request, create an issue and add the label 'sdk customization' or 'pip implementation'.
|
|
135
143
|
|
|
136
144
|
## Acknowledgements
|
|
137
145
|
|
package/android/README.md
CHANGED
|
@@ -101,7 +101,11 @@ See [Jitsi Meet Handbook](https://jitsi.github.io/handbook/docs/dev-guide/dev-gu
|
|
|
101
101
|
|
|
102
102
|
### Screen Sharing Integration
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
This is an experimental feature and some users experienced issues on Android. The recommendation is to disable it in production build until a working solution is found.
|
|
105
|
+
```
|
|
106
|
+
featureFlags: { 'android.screensharing.enabled': false }
|
|
107
|
+
```
|
|
108
|
+
Report your working solutions [here](https://github.com/calvinckho/capacitor-jitsi-meet/issues/35).
|
|
105
109
|
|
|
106
110
|
### Android SDK Developer Guide
|
|
107
111
|
|
|
@@ -5,10 +5,9 @@ import android.content.BroadcastReceiver;
|
|
|
5
5
|
import android.content.Context;
|
|
6
6
|
import android.content.Intent;
|
|
7
7
|
import android.content.IntentFilter;
|
|
8
|
-
import android.
|
|
9
|
-
import android.os.Bundle;
|
|
8
|
+
import android.net.Uri;
|
|
10
9
|
|
|
11
|
-
import androidx.annotation.
|
|
10
|
+
import androidx.annotation.Nullable;
|
|
12
11
|
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
|
13
12
|
import timber.log.Timber;
|
|
14
13
|
|
|
@@ -20,8 +19,20 @@ public class JitsiActivity extends JitsiMeetActivity {
|
|
|
20
19
|
private BroadcastReceiver broadcastReceiver;
|
|
21
20
|
private static final String TAG = "CapacitorJitsiMeet";
|
|
22
21
|
private static final String ACTION_JITSI_MEET_CONFERENCE = "org.jitsi.meet.CONFERENCE";
|
|
22
|
+
private static final String JITSI_MEET_CONFERENCE_OPTIONS = "JitsiMeetConferenceOptions";
|
|
23
23
|
private static JitsiMeetConferenceOptions session_options;
|
|
24
24
|
|
|
25
|
+
@Override
|
|
26
|
+
protected void initialize() {
|
|
27
|
+
broadcastReceiver = new BroadcastReceiver() {
|
|
28
|
+
@Override
|
|
29
|
+
public void onReceive(Context context, Intent intent) {
|
|
30
|
+
onBroadcastReceived(intent);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
registerForBroadcastMessages();
|
|
34
|
+
join(getConferenceOptions(getIntent()));
|
|
35
|
+
}
|
|
25
36
|
// this overrides the launch class and runs the extended JitsiActivity class instead
|
|
26
37
|
public static void launch(Context context, JitsiMeetConferenceOptions options) {
|
|
27
38
|
session_options = options;
|
|
@@ -34,11 +45,20 @@ public class JitsiActivity extends JitsiMeetActivity {
|
|
|
34
45
|
context.startActivity(intent);
|
|
35
46
|
}
|
|
36
47
|
|
|
48
|
+
private void registerForBroadcastMessages() {
|
|
49
|
+
IntentFilter intentFilter = new IntentFilter();
|
|
50
|
+
|
|
51
|
+
for (BroadcastEvent.Type type : BroadcastEvent.Type.values()) {
|
|
52
|
+
intentFilter.addAction(type.getAction());
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
LocalBroadcastManager.getInstance(this).registerReceiver(broadcastReceiver, intentFilter);
|
|
56
|
+
}
|
|
57
|
+
|
|
37
58
|
private void onBroadcastReceived(Intent intent) {
|
|
38
59
|
JitsiMeetView view = getJitsiView();
|
|
39
60
|
if (intent != null) {
|
|
40
61
|
BroadcastEvent event = new BroadcastEvent(intent);
|
|
41
|
-
|
|
42
62
|
switch (event.getType()) {
|
|
43
63
|
case CONFERENCE_JOINED:
|
|
44
64
|
on("onConferenceJoined");
|
|
@@ -90,5 +110,21 @@ public class JitsiActivity extends JitsiMeetActivity {
|
|
|
90
110
|
Timber.tag(TAG).d("Is in picture-in-picture mode: " + isInPictureInPictureMode);
|
|
91
111
|
}
|
|
92
112
|
|
|
113
|
+
private @Nullable
|
|
114
|
+
JitsiMeetConferenceOptions getConferenceOptions(Intent intent) {
|
|
115
|
+
String action = intent.getAction();
|
|
116
|
+
|
|
117
|
+
if (Intent.ACTION_VIEW.equals(action)) {
|
|
118
|
+
Uri uri = intent.getData();
|
|
119
|
+
if (uri != null) {
|
|
120
|
+
return new JitsiMeetConferenceOptions.Builder().setRoom(uri.toString()).build();
|
|
121
|
+
}
|
|
122
|
+
} else if (ACTION_JITSI_MEET_CONFERENCE.equals(action)) {
|
|
123
|
+
return intent.getParcelableExtra(JITSI_MEET_CONFERENCE_OPTIONS);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
|
|
93
129
|
private static final String ADD_PEOPLE_CONTROLLER_QUERY = null;
|
|
94
130
|
}
|
|
@@ -19,24 +19,9 @@ export interface JitsiPlugin {
|
|
|
19
19
|
featureFlags?: any;
|
|
20
20
|
configOverrides?: any;
|
|
21
21
|
}): Promise<{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
displayName?: string;
|
|
27
|
-
subject?: string;
|
|
28
|
-
email?: string;
|
|
29
|
-
avatarURL?: string;
|
|
30
|
-
startWithAudioMuted?: boolean;
|
|
31
|
-
startWithVideoMuted?: boolean;
|
|
32
|
-
chatEnabled?: boolean;
|
|
33
|
-
inviteEnabled?: boolean;
|
|
34
|
-
callIntegrationEnabled?: boolean;
|
|
35
|
-
recordingEnabled?: boolean;
|
|
36
|
-
liveStreamingEnabled?: boolean;
|
|
37
|
-
screenSharingEnabled?: boolean;
|
|
38
|
-
featureFlags?: any;
|
|
39
|
-
configOverrides?: any;
|
|
22
|
+
success?: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
leaveConference(options?: {}): Promise<{
|
|
25
|
+
success?: boolean;
|
|
40
26
|
}>;
|
|
41
|
-
leaveConference(options: {}): Promise<{}>;
|
|
42
27
|
}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -18,29 +18,14 @@ export declare class JitsiWeb extends WebPlugin implements JitsiPlugin {
|
|
|
18
18
|
recordingEnabled?: boolean;
|
|
19
19
|
liveStreamingEnabled?: boolean;
|
|
20
20
|
screenSharingEnabled?: boolean;
|
|
21
|
-
featureFlags?:
|
|
22
|
-
configOverrides?:
|
|
21
|
+
featureFlags?: any;
|
|
22
|
+
configOverrides?: any;
|
|
23
23
|
}): Promise<{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
displayName?: string;
|
|
29
|
-
subject?: string;
|
|
30
|
-
email?: string;
|
|
31
|
-
avatarURL?: string;
|
|
32
|
-
startWithAudioMuted?: boolean;
|
|
33
|
-
startWithVideoMuted?: boolean;
|
|
34
|
-
chatEnabled?: boolean;
|
|
35
|
-
inviteEnabled?: boolean;
|
|
36
|
-
callIntegrationEnabled?: boolean;
|
|
37
|
-
recordingEnabled?: boolean;
|
|
38
|
-
liveStreamingEnabled?: boolean;
|
|
39
|
-
screenSharingEnabled?: boolean;
|
|
40
|
-
featureFlags?: Map<string, any>;
|
|
41
|
-
configOverrides?: Map<string, any>;
|
|
24
|
+
success?: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
leaveConference(options?: {}): Promise<{
|
|
27
|
+
success?: boolean;
|
|
42
28
|
}>;
|
|
43
|
-
leaveConference(options: {}): Promise<{}>;
|
|
44
29
|
}
|
|
45
30
|
declare const Jitsi: JitsiWeb;
|
|
46
31
|
export { Jitsi };
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,QAAS,SAAQ,SAAS;IAErC,aAAa;IACL,cAAc,CAAC,OAmBtB;;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,MAAM,OAAO,QAAS,SAAQ,SAAS;IAErC,aAAa;IACL,cAAc,CAAC,OAmBtB;;YAGG,MAAM,IAAI,CAAC,WAAW,CAAC,kGAAkG,CAAC,CAAC;QAC/H,CAAC;KAAA;IAAA,CAAC;IACA,aAAa;IACT,eAAe,CAAC,OAAY;;YAC9B,MAAM,IAAI,CAAC,WAAW,CAAC,kGAAkG,CAAC,CAAC;QAC/H,CAAC;KAAA;IAAA,CAAC;CACH;AAED,MAAM,KAAK,GAAG,IAAI,QAAQ,EAAE,CAAC;AAE7B,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -63,6 +63,13 @@ public class JitsiMeetViewController: UIViewController, UIGestureRecognizerDeleg
|
|
|
63
63
|
jitsiMeetView?.removeFromSuperview()
|
|
64
64
|
jitsiMeetView = nil
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
public func leave() {
|
|
68
|
+
print("[Jitsi Plugin Native iOS]: JitsiMeetViewController::leave");
|
|
69
|
+
let jitsiMeetView = JitsiMeetView()
|
|
70
|
+
self.jitsiMeetView = jitsiMeetView
|
|
71
|
+
jitsiMeetView.hangUp()
|
|
72
|
+
}
|
|
66
73
|
}
|
|
67
74
|
|
|
68
75
|
protocol JitsiMeetViewControllerDelegate: AnyObject {
|
|
@@ -108,17 +108,26 @@ public class Jitsi: CAPPlugin {
|
|
|
108
108
|
self.jitsiMeetViewController?.delegate = self;
|
|
109
109
|
|
|
110
110
|
DispatchQueue.main.async {
|
|
111
|
-
self.bridge?.viewController?.present(self.jitsiMeetViewController!, animated: true, completion:
|
|
111
|
+
self.bridge?.viewController?.present(self.jitsiMeetViewController!, animated: true, completion: { call.resolve(["success": true ]) });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@objc func leaveConference(_ call: CAPPluginCall) {
|
|
116
|
+
DispatchQueue.main.async {
|
|
117
|
+
self.jitsiMeetViewController?.leave();
|
|
118
|
+
call.resolve([
|
|
119
|
+
"success": true
|
|
120
|
+
])
|
|
112
121
|
}
|
|
113
122
|
}
|
|
114
123
|
}
|
|
115
124
|
|
|
116
125
|
extension Jitsi: JitsiMeetViewControllerDelegate {
|
|
117
126
|
@objc func onConferenceJoined() {
|
|
118
|
-
self.bridge?.
|
|
127
|
+
self.bridge?.triggerJSEvent(eventName: "onConferenceJoined", target: "window");
|
|
119
128
|
}
|
|
120
129
|
|
|
121
130
|
@objc func onConferenceLeft() {
|
|
122
|
-
self.bridge?.
|
|
131
|
+
self.bridge?.triggerJSEvent(eventName: "onConferenceLeft", target: "window");
|
|
123
132
|
}
|
|
124
133
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "capacitor-jitsi-meet",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "This Ionic Capacitor plugin is created to make video calls through the free, open-sourced Jitsi video platform (https://meet.jit.si) on iOS and Android.",
|
|
5
5
|
"main": "dist/esm/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|