@tiltio/capacitor-jitsi-meet 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/Package.swift +39 -0
- package/README.md +452 -2
- package/TiltioCapacitorJitsiMeet.podspec +22 -0
- package/android/build.gradle +68 -0
- package/android/proguard-rules.pro +13 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/fr/tiltio/capacitor/jitsimeet/JitsiMeetPlugin.java +238 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +479 -0
- package/dist/esm/definitions.d.ts +199 -0
- package/dist/esm/definitions.js +3 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +11 -0
- package/dist/esm/web.js +18 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +32 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +35 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Sources/JitsiMeetPlugin/JitsiAppStateGuard.swift +38 -0
- package/ios/Sources/JitsiMeetPlugin/JitsiMeetOptions.swift +84 -0
- package/ios/Sources/JitsiMeetPlugin/JitsiMeetPlugin.swift +228 -0
- package/ios/Sources/JitsiMeetPlugin/JitsiSystemPip.swift +311 -0
- package/ios/Tests/JitsiMeetPluginTests/JitsiMeetOptionsTests.swift +54 -0
- package/package.json +86 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tiltio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Package.swift
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// swift-tools-version: 5.9
|
|
2
|
+
import PackageDescription
|
|
3
|
+
|
|
4
|
+
let package = Package(
|
|
5
|
+
name: "TiltioCapacitorJitsiMeet",
|
|
6
|
+
// Jitsi Meet SDK minimum.
|
|
7
|
+
platforms: [.iOS(.v15)],
|
|
8
|
+
products: [
|
|
9
|
+
.library(
|
|
10
|
+
name: "TiltioCapacitorJitsiMeet",
|
|
11
|
+
targets: ["JitsiMeetPlugin"])
|
|
12
|
+
],
|
|
13
|
+
dependencies: [
|
|
14
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
|
|
15
|
+
// Pinned: the SDK bundles React Native and WebRTC, and the iOS PiP relies on their internals (see README).
|
|
16
|
+
.package(url: "https://github.com/jitsi/jitsi-meet-ios-sdk-releases.git", exact: "13.3.4"),
|
|
17
|
+
// The SDK's WebRTC (video track types), for the system PiP (`JitsiSystemPip`). Pinned to the version the SDK
|
|
18
|
+
// binary was built with.
|
|
19
|
+
.package(url: "https://github.com/jitsi/webrtc", exact: "155.0.1"),
|
|
20
|
+
// Not used by the plugin: pins the SDK's Giphy dependency, declared `from: "2.2.16"`. The SDK binary was built
|
|
21
|
+
// with 2.2.16; a newer one fails to load ("Symbol not found: ...GiphyUISDK...").
|
|
22
|
+
.package(url: "https://github.com/Giphy/giphy-ios-sdk", exact: "2.2.16")
|
|
23
|
+
],
|
|
24
|
+
targets: [
|
|
25
|
+
.target(
|
|
26
|
+
name: "JitsiMeetPlugin",
|
|
27
|
+
dependencies: [
|
|
28
|
+
.product(name: "Capacitor", package: "capacitor-swift-pm"),
|
|
29
|
+
.product(name: "Cordova", package: "capacitor-swift-pm"),
|
|
30
|
+
.product(name: "JitsiMeetSDK", package: "jitsi-meet-ios-sdk-releases"),
|
|
31
|
+
.product(name: "WebRTC", package: "webrtc")
|
|
32
|
+
],
|
|
33
|
+
path: "ios/Sources/JitsiMeetPlugin"),
|
|
34
|
+
.testTarget(
|
|
35
|
+
name: "JitsiMeetPluginTests",
|
|
36
|
+
dependencies: ["JitsiMeetPlugin"],
|
|
37
|
+
path: "ios/Tests/JitsiMeetPluginTests")
|
|
38
|
+
]
|
|
39
|
+
)
|
package/README.md
CHANGED
|
@@ -1,3 +1,453 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tiltio/capacitor-jitsi-meet
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Capacitor plugin that opens a [Jitsi Meet](https://jitsi.org/) conference in a **native full-screen view**, with the
|
|
4
|
+
official Jitsi Meet mobile SDK. It replaces the Jitsi IFrame API inside the WebView, which on mobile shows the desktop
|
|
5
|
+
layout and can't go full screen or into Picture-in-Picture.
|
|
6
|
+
|
|
7
|
+
| Feature | iOS | Android |
|
|
8
|
+
| -------------------------------- | --------------------------------------- | -------------------------- |
|
|
9
|
+
| Native full-screen conference | ✅ view over the WebView | ✅ `JitsiMeetActivity` |
|
|
10
|
+
| System Picture-in-Picture | ✅ built by the plugin (see below) | ✅ provided by the SDK |
|
|
11
|
+
| PiP when leaving the app | ✅ automatic | ✅ automatic |
|
|
12
|
+
| PiP from the call's PiP button | ✅ | ✅ |
|
|
13
|
+
| Landscape only during the call | ✅ opt-in (`lockPortraitOnPhone`) | ✅ (call activity rotates) |
|
|
14
|
+
| Audio in background | ✅ (`audio` background mode) | ✅ |
|
|
15
|
+
| JWT, feature flags, config | ✅ | ✅ |
|
|
16
|
+
| Web | ❌ use the Jitsi IFrame API | ❌ |
|
|
17
|
+
|
|
18
|
+
Jitsi Meet SDK **13.3.4** on iOS, **13.3.3** on Android. Capacitor **8**.
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
- Capacitor 8.
|
|
23
|
+
- iOS **15.1+** (SDK minimum), CocoaPods or Swift Package Manager.
|
|
24
|
+
- Android **API 26+** (SDK minimum), Java 21.
|
|
25
|
+
- A Jitsi Meet deployment (self-hosted, or JaaS / 8x8.vc). `meet.jit.si` ends embedded meetings after 5 minutes: fine
|
|
26
|
+
for testing, not for production.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install @tiltio/capacitor-jitsi-meet
|
|
32
|
+
npx cap sync
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### iOS
|
|
36
|
+
|
|
37
|
+
1. **Deployment target**: iOS 15.1. With CocoaPods, in `ios/App/Podfile`: `platform :ios, '15.1'`.
|
|
38
|
+
|
|
39
|
+
With Swift Package Manager, the plugin pins the SDK's Giphy dependency to **2.2.16**: the SDK declares
|
|
40
|
+
`from: "2.2.16"`, but its binary fails to load with a newer Giphy (`Symbol not found: …GiphyUISDK…`). Don't
|
|
41
|
+
require another Giphy version in your app.
|
|
42
|
+
|
|
43
|
+
2. **Info.plist**:
|
|
44
|
+
|
|
45
|
+
```xml
|
|
46
|
+
<!-- Required by the SDK, even if users join muted. -->
|
|
47
|
+
<key>NSCameraUsageDescription</key>
|
|
48
|
+
<string>Used to show your video during calls.</string>
|
|
49
|
+
<key>NSMicrophoneUsageDescription</key>
|
|
50
|
+
<string>Used to let you speak during calls.</string>
|
|
51
|
+
<!-- Required by App Store Connect (ITMS-90683): the SDK links EventKit (react-native-calendar-events). -->
|
|
52
|
+
<key>NSCalendarsUsageDescription</key>
|
|
53
|
+
<string>The app doesn't use your calendar.</string>
|
|
54
|
+
<key>NSCalendarsFullAccessUsageDescription</key>
|
|
55
|
+
<string>The app doesn't use your calendar.</string>
|
|
56
|
+
<!-- The call keeps running, and PiP keeps updating, in the background. -->
|
|
57
|
+
<key>UIBackgroundModes</key>
|
|
58
|
+
<array>
|
|
59
|
+
<string>audio</string>
|
|
60
|
+
</array>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The calendar keys aren't in the Jitsi documentation, but App Store Connect rejects builds without them: the SDK
|
|
64
|
+
binary links `EventKit.framework`. Calendar access is never requested if you keep the `calendar.enabled` feature
|
|
65
|
+
flag off (recommended, see [Recommended flags](#recommended-flags)). Write the purpose string in your own words and
|
|
66
|
+
languages.
|
|
67
|
+
|
|
68
|
+
3. **Landscape only during the call (optional)**: to keep the app in portrait on iPhone and allow landscape only while
|
|
69
|
+
the conference is full screen, allow landscape in `Info.plist` and set `lockPortraitOnPhone`:
|
|
70
|
+
|
|
71
|
+
```xml
|
|
72
|
+
<key>UISupportedInterfaceOrientations</key>
|
|
73
|
+
<array>
|
|
74
|
+
<string>UIInterfaceOrientationPortrait</string>
|
|
75
|
+
<string>UIInterfaceOrientationLandscapeLeft</string>
|
|
76
|
+
<string>UIInterfaceOrientationLandscapeRight</string>
|
|
77
|
+
</array>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{ "plugins": { "JitsiMeet": { "lockPortraitOnPhone": true } } }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Without it, the plugin doesn't touch orientations: the conference follows your app's settings.
|
|
85
|
+
|
|
86
|
+
### Android
|
|
87
|
+
|
|
88
|
+
1. **Maven repositories**: the Jitsi SDK and its React Native / WebRTC dependencies aren't on Maven Central. Add them
|
|
89
|
+
to `android/build.gradle`:
|
|
90
|
+
|
|
91
|
+
```groovy
|
|
92
|
+
allprojects {
|
|
93
|
+
repositories {
|
|
94
|
+
google()
|
|
95
|
+
mavenCentral()
|
|
96
|
+
maven { url = "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" }
|
|
97
|
+
maven { url = "https://www.jitpack.io" }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
2. **minSdk 26**: in `android/variables.gradle`, `minSdkVersion = 26`.
|
|
103
|
+
|
|
104
|
+
3. **Permissions and activity**: nothing to add. `CAMERA`, `RECORD_AUDIO`, `JitsiMeetActivity`
|
|
105
|
+
(`supportsPictureInPicture="true"`) and the SDK's services come from the SDK's manifest.
|
|
106
|
+
|
|
107
|
+
4. **Release builds (R8)**: the plugin ships keep rules for the SDK (`consumerProguardFiles`). Test a minified release
|
|
108
|
+
build before publishing your app.
|
|
109
|
+
|
|
110
|
+
## Usage
|
|
111
|
+
|
|
112
|
+
```ts
|
|
113
|
+
import { JitsiMeet } from '@tiltio/capacitor-jitsi-meet';
|
|
114
|
+
|
|
115
|
+
await JitsiMeet.addListener('conferenceJoined', () => console.log('joined'));
|
|
116
|
+
await JitsiMeet.addListener('conferenceTerminated', ({ error }) => {
|
|
117
|
+
if (error) console.warn('conference ended on error', error);
|
|
118
|
+
});
|
|
119
|
+
await JitsiMeet.addListener('readyToClose', () => console.log('closed'));
|
|
120
|
+
|
|
121
|
+
await JitsiMeet.join({
|
|
122
|
+
serverURL: 'https://meet.example.com',
|
|
123
|
+
room: 'my-room',
|
|
124
|
+
token: jwt,
|
|
125
|
+
lang: 'en',
|
|
126
|
+
userInfo: { displayName: 'Ada Lovelace' },
|
|
127
|
+
audioMuted: true,
|
|
128
|
+
videoMuted: true,
|
|
129
|
+
featureFlags: {
|
|
130
|
+
'prejoinpage.enabled': false,
|
|
131
|
+
'welcomepage.enabled': false,
|
|
132
|
+
'calendar.enabled': false,
|
|
133
|
+
},
|
|
134
|
+
configOverrides: { disableDeepLinking: true },
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// Back from PiP, or after the user left the call screen:
|
|
138
|
+
await JitsiMeet.expand();
|
|
139
|
+
|
|
140
|
+
// When the user leaves the screen:
|
|
141
|
+
await JitsiMeet.leave();
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Recommended flags
|
|
145
|
+
|
|
146
|
+
The plugin sets no feature flag itself, except `pip.enabled` (from `pictureInPicture`). Flag names are in
|
|
147
|
+
[`react/features/base/flags/constants.ts`](https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.ts).
|
|
148
|
+
For an app that manages access to the meeting itself:
|
|
149
|
+
|
|
150
|
+
| Flag | Value | Why |
|
|
151
|
+
| ---------------------------------------------------------------------------- | ------- | ----------------------------------------- |
|
|
152
|
+
| `prejoinpage.enabled`, `welcomepage.enabled`, `server-url-change.enabled` | `false` | The app opens the room directly |
|
|
153
|
+
| `invite.enabled`, `add-people.enabled` | `false` | Invitations go through the app |
|
|
154
|
+
| `meeting-password.enabled`, `security-options.enabled`, `lobby-mode.enabled` | `false` | Access goes through the app (JWT) |
|
|
155
|
+
| `call-integration.enabled` | `false` | No CallKit / ConnectionService |
|
|
156
|
+
| `calendar.enabled` | `false` | Never asks for calendar access |
|
|
157
|
+
| config `disableDeepLinking` | `true` | No "open in the Jitsi app" screen |
|
|
158
|
+
|
|
159
|
+
### Errors
|
|
160
|
+
|
|
161
|
+
Useful `conferenceTerminated` `error` values (lib-jitsi-meet): `conference.destroyed` (a moderator ended the meeting
|
|
162
|
+
for everyone), `conference.connectionError.notAllowed` / `connection.passwordRequired` (token refused or expired),
|
|
163
|
+
connection errors (`connection.droppedError`…). A kick-out ends the conference with an error containing `kick`: no
|
|
164
|
+
dedicated SDK event, check it against your deployment.
|
|
165
|
+
|
|
166
|
+
## How it works
|
|
167
|
+
|
|
168
|
+
### iOS
|
|
169
|
+
|
|
170
|
+
- The conference is a `JitsiMeetView` added full screen over the Capacitor WebView. While it's visible, the status bar
|
|
171
|
+
is hidden (and, with `lockPortraitOnPhone`, landscape is allowed on iPhone).
|
|
172
|
+
- **Picture-in-Picture.** The Jitsi Meet SDK doesn't implement system PiP on iOS (it only asks the host app through
|
|
173
|
+
`enterPictureInPicture`). `JitsiSystemPip` builds it with Apple's public API:
|
|
174
|
+
- it finds the largest video view of the call (`RTCVideoView`, from the react-native-webrtc bundled in the SDK) and
|
|
175
|
+
subscribes to its `videoTrack` as an extra `RTCVideoRenderer`;
|
|
176
|
+
- frames (hardware `CVPixelBuffer`, or I420 converted to NV12) go into an `AVSampleBufferDisplayLayer` hosted by an
|
|
177
|
+
`AVPictureInPictureVideoCallViewController`;
|
|
178
|
+
- an `AVPictureInPictureController` starts it from the call's PiP button, or automatically when the app goes to the
|
|
179
|
+
background. Started from the app, the full-screen call hides and the app is usable under the PiP window; restoring
|
|
180
|
+
from the window brings the call back full screen.
|
|
181
|
+
- Out of PiP, one frame per second is rendered (what the system shows when PiP starts); in PiP, every frame, except
|
|
182
|
+
those arriving while the previous one is still being processed.
|
|
183
|
+
- **Video in the background.** In the background, Jitsi's React Native UI stops receiving video (`lastN` set to 0), so
|
|
184
|
+
the PiP window would freeze. `JitsiAppStateGuard` intercepts `-[RCTAppState handleAppStateDidChange:]` and, during a
|
|
185
|
+
call with PiP, ignores the "will resign active" and "did enter background" notifications. Returning to the
|
|
186
|
+
foreground is passed through.
|
|
187
|
+
|
|
188
|
+
### Android
|
|
189
|
+
|
|
190
|
+
- The conference runs in the SDK's `JitsiMeetActivity` (`singleTask`, `supportsPictureInPicture`). Leaving the app
|
|
191
|
+
during the call enters system PiP (SDK behaviour).
|
|
192
|
+
- Events come from the SDK's local broadcasts (`BroadcastEvent`). `leave()` sends the SDK's hang-up broadcast and waits
|
|
193
|
+
for `READY_TO_CLOSE` (3 s max), so a conference opened right after isn't closed by the previous one.
|
|
194
|
+
- `expand()` brings `JitsiMeetActivity` back to the front if a call is in progress.
|
|
195
|
+
|
|
196
|
+
## Limitations
|
|
197
|
+
|
|
198
|
+
- **iOS internals.** `JitsiSystemPip` relies on the `RTCVideoView` class and its `videoTrack` property
|
|
199
|
+
(react-native-webrtc), and `JitsiAppStateGuard` on `RCTAppState` (React Native), both bundled in the SDK. They aren't
|
|
200
|
+
public SDK API: re-test PiP after every SDK upgrade. If they change, nothing crashes: the PiP window stays black or
|
|
201
|
+
freezes in the background.
|
|
202
|
+
- **Bandwidth.** During a call with PiP, Jitsi keeps receiving video in the background, even if the user closed the
|
|
203
|
+
PiP window.
|
|
204
|
+
- **App size.** The SDK bundles React Native and WebRTC: expect tens of MB more.
|
|
205
|
+
- **Android** hasn't been tested on a device yet (it builds; PiP, rotation and events are the SDK's documented
|
|
206
|
+
behaviour).
|
|
207
|
+
- **Option types on Android**: feature flags and config overrides accept booleans, integers and strings (and string
|
|
208
|
+
arrays for config overrides). Other values are ignored with a warning in Logcat.
|
|
209
|
+
- No web implementation: use the [IFrame API](https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-iframe).
|
|
210
|
+
|
|
211
|
+
## Configuration
|
|
212
|
+
|
|
213
|
+
<docgen-config>
|
|
214
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
215
|
+
|
|
216
|
+
Read once, when the app starts.
|
|
217
|
+
|
|
218
|
+
| Prop | Type | Description | Default | Since |
|
|
219
|
+
| ------------------------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
|
|
220
|
+
| **`lockPortraitOnPhone`** | <code>boolean</code> | iPhone only: keep the app in portrait, and allow landscape only while a conference is full screen. Landscape must be allowed in the app's `Info.plist` (`UISupportedInterfaceOrientations`). iPad orientations are never changed. | <code>false</code> | 0.1.0 |
|
|
221
|
+
|
|
222
|
+
### Examples
|
|
223
|
+
|
|
224
|
+
In `capacitor.config.json`:
|
|
225
|
+
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"plugins": {
|
|
229
|
+
"JitsiMeet": {
|
|
230
|
+
"lockPortraitOnPhone": true
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
In `capacitor.config.ts`:
|
|
237
|
+
|
|
238
|
+
```ts
|
|
239
|
+
/// <reference types="@tiltio/capacitor-jitsi-meet" />
|
|
240
|
+
|
|
241
|
+
import { CapacitorConfig } from '@capacitor/cli';
|
|
242
|
+
|
|
243
|
+
const config: CapacitorConfig = {
|
|
244
|
+
plugins: {
|
|
245
|
+
JitsiMeet: {
|
|
246
|
+
lockPortraitOnPhone: true,
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export default config;
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
</docgen-config>
|
|
255
|
+
|
|
256
|
+
## API
|
|
257
|
+
|
|
258
|
+
<docgen-index>
|
|
259
|
+
|
|
260
|
+
* [`join(...)`](#join)
|
|
261
|
+
* [`leave()`](#leave)
|
|
262
|
+
* [`expand()`](#expand)
|
|
263
|
+
* [`addListener('conferenceJoined', ...)`](#addlistenerconferencejoined-)
|
|
264
|
+
* [`addListener('conferenceTerminated', ...)`](#addlistenerconferenceterminated-)
|
|
265
|
+
* [`addListener('readyToClose', ...)`](#addlistenerreadytoclose-)
|
|
266
|
+
* [`removeAllListeners()`](#removealllisteners)
|
|
267
|
+
* [Interfaces](#interfaces)
|
|
268
|
+
* [Type Aliases](#type-aliases)
|
|
269
|
+
|
|
270
|
+
</docgen-index>
|
|
271
|
+
|
|
272
|
+
<docgen-api>
|
|
273
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
274
|
+
|
|
275
|
+
### join(...)
|
|
276
|
+
|
|
277
|
+
```typescript
|
|
278
|
+
join(options: JitsiMeetJoinOptions) => Promise<void>
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Opens the conference full screen, over the app. Replaces a conference already open.
|
|
282
|
+
|
|
283
|
+
Resolves once the call screen is shown, not when the room is joined (see `conferenceJoined`).
|
|
284
|
+
|
|
285
|
+
Not available on the web: use the Jitsi IFrame API.
|
|
286
|
+
|
|
287
|
+
| Param | Type |
|
|
288
|
+
| ------------- | --------------------------------------------------------------------- |
|
|
289
|
+
| **`options`** | <code><a href="#jitsimeetjoinoptions">JitsiMeetJoinOptions</a></code> |
|
|
290
|
+
|
|
291
|
+
**Since:** 0.1.0
|
|
292
|
+
|
|
293
|
+
--------------------
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
### leave()
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
leave() => Promise<void>
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Hangs up and closes the conference.
|
|
303
|
+
|
|
304
|
+
On Android, resolves once the call screen is closed (3 s max). On iOS, no event is emitted for a conference
|
|
305
|
+
closed by `leave()`.
|
|
306
|
+
|
|
307
|
+
**Since:** 0.1.0
|
|
308
|
+
|
|
309
|
+
--------------------
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### expand()
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
expand() => Promise<void>
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
Brings the conference back full screen: out of Picture-in-Picture, or after the user left the call screen.
|
|
319
|
+
Does nothing without a conference.
|
|
320
|
+
|
|
321
|
+
**Since:** 0.1.0
|
|
322
|
+
|
|
323
|
+
--------------------
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
### addListener('conferenceJoined', ...)
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
addListener(eventName: 'conferenceJoined', listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
The local participant joined the room.
|
|
333
|
+
|
|
334
|
+
| Param | Type |
|
|
335
|
+
| ------------------ | ------------------------------- |
|
|
336
|
+
| **`eventName`** | <code>'conferenceJoined'</code> |
|
|
337
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
338
|
+
|
|
339
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
340
|
+
|
|
341
|
+
**Since:** 0.1.0
|
|
342
|
+
|
|
343
|
+
--------------------
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
### addListener('conferenceTerminated', ...)
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
addListener(eventName: 'conferenceTerminated', listenerFunc: (event: ConferenceTerminatedEvent) => void) => Promise<PluginListenerHandle>
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
The conference ended. `error` is set when it ended on an error.
|
|
353
|
+
|
|
354
|
+
| Param | Type |
|
|
355
|
+
| ------------------ | --------------------------------------------------------------------------------------------------- |
|
|
356
|
+
| **`eventName`** | <code>'conferenceTerminated'</code> |
|
|
357
|
+
| **`listenerFunc`** | <code>(event: <a href="#conferenceterminatedevent">ConferenceTerminatedEvent</a>) => void</code> |
|
|
358
|
+
|
|
359
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
360
|
+
|
|
361
|
+
**Since:** 0.1.0
|
|
362
|
+
|
|
363
|
+
--------------------
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
### addListener('readyToClose', ...)
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
addListener(eventName: 'readyToClose', listenerFunc: () => void) => Promise<PluginListenerHandle>
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
The call screen is closed (hang up, conference ended, error). Always the last event of a conference.
|
|
373
|
+
|
|
374
|
+
| Param | Type |
|
|
375
|
+
| ------------------ | --------------------------- |
|
|
376
|
+
| **`eventName`** | <code>'readyToClose'</code> |
|
|
377
|
+
| **`listenerFunc`** | <code>() => void</code> |
|
|
378
|
+
|
|
379
|
+
**Returns:** <code>Promise<<a href="#pluginlistenerhandle">PluginListenerHandle</a>></code>
|
|
380
|
+
|
|
381
|
+
**Since:** 0.1.0
|
|
382
|
+
|
|
383
|
+
--------------------
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
### removeAllListeners()
|
|
387
|
+
|
|
388
|
+
```typescript
|
|
389
|
+
removeAllListeners() => Promise<void>
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
Removes all listeners for this plugin.
|
|
393
|
+
|
|
394
|
+
**Since:** 0.1.0
|
|
395
|
+
|
|
396
|
+
--------------------
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
### Interfaces
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
#### JitsiMeetJoinOptions
|
|
403
|
+
|
|
404
|
+
| Prop | Type | Description | Default | Since |
|
|
405
|
+
| ---------------------- | ----------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
|
|
406
|
+
| **`serverURL`** | <code>string</code> | Jitsi deployment, e.g. `https://meet.example.com`. | | 0.1.0 |
|
|
407
|
+
| **`room`** | <code>string</code> | Room name, as the IFrame API's `roomName`. | | 0.1.0 |
|
|
408
|
+
| **`token`** | <code>string</code> | JWT, for deployments with token authentication. | | 0.1.0 |
|
|
409
|
+
| **`subject`** | <code>string</code> | Conference subject shown in the call. | | 0.1.0 |
|
|
410
|
+
| **`lang`** | <code>string</code> | UI language (`en`, `fr`, `es`…), passed as the `defaultLanguage` config override. | | 0.1.0 |
|
|
411
|
+
| **`audioMuted`** | <code>boolean</code> | Join with the microphone off. | <code>false</code> | 0.1.0 |
|
|
412
|
+
| **`videoMuted`** | <code>boolean</code> | Join with the camera off. | <code>false</code> | 0.1.0 |
|
|
413
|
+
| **`userInfo`** | <code><a href="#jitsimeetuserinfo">JitsiMeetUserInfo</a></code> | Local participant's name, email and avatar. | | 0.1.0 |
|
|
414
|
+
| **`pictureInPicture`** | <code>boolean</code> | System Picture-in-Picture: from the call's PiP button, and automatically when the user leaves the app. Overrides the `pip.enabled` feature flag. On iOS, always off on devices that don't support it. | <code>true</code> | 0.1.0 |
|
|
415
|
+
| **`featureFlags`** | <code>{ [flag: string]: string \| number \| boolean; }</code> | Jitsi Meet SDK feature flags, e.g. `{ "prejoinpage.enabled": false, "invite.enabled": false }`. Names: `react/features/base/flags/constants.ts` in the jitsi-meet repository. Numbers are passed as integers. | | 0.1.0 |
|
|
416
|
+
| **`configOverrides`** | <code>{ [key: string]: <a href="#jitsimeetconfigvalue">JitsiMeetConfigValue</a>; }</code> | Overrides of the deployment's `config.js`, e.g. `{ "disableDeepLinking": true }`. On Android, objects aren't supported, and arrays must contain strings only. | | 0.1.0 |
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
#### JitsiMeetUserInfo
|
|
420
|
+
|
|
421
|
+
Local participant, as shown to the other participants.
|
|
422
|
+
|
|
423
|
+
| Prop | Type | Description | Since |
|
|
424
|
+
| ----------------- | ------------------- | ----------------- | ----- |
|
|
425
|
+
| **`displayName`** | <code>string</code> | | 0.1.0 |
|
|
426
|
+
| **`email`** | <code>string</code> | | 0.1.0 |
|
|
427
|
+
| **`avatarURL`** | <code>string</code> | Avatar image URL. | 0.1.0 |
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
#### PluginListenerHandle
|
|
431
|
+
|
|
432
|
+
| Prop | Type |
|
|
433
|
+
| ------------ | ----------------------------------------- |
|
|
434
|
+
| **`remove`** | <code>() => Promise<void></code> |
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
#### ConferenceTerminatedEvent
|
|
438
|
+
|
|
439
|
+
| Prop | Type | Description | Since |
|
|
440
|
+
| ----------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
|
|
441
|
+
| **`error`** | <code>string</code> | Set when the conference ended on an error (lib-jitsi-meet error name), e.g. `conference.destroyed`, `connection.passwordRequired`, `connection.droppedError`. | 0.1.0 |
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
### Type Aliases
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
#### JitsiMeetConfigValue
|
|
448
|
+
|
|
449
|
+
Value of a config override.
|
|
450
|
+
|
|
451
|
+
<code>boolean | number | string | string[] | { [key: string]: unknown }</code>
|
|
452
|
+
|
|
453
|
+
</docgen-api>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'TiltioCapacitorJitsiMeet'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.license = package['license']
|
|
10
|
+
s.homepage = package['repository']['url']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
|
|
13
|
+
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
+
# Jitsi Meet SDK minimum.
|
|
15
|
+
s.ios.deployment_target = '15.1'
|
|
16
|
+
s.dependency 'Capacitor'
|
|
17
|
+
# Pinned: the SDK bundles React Native and WebRTC, and the iOS PiP relies on their internals (see README).
|
|
18
|
+
s.dependency 'JitsiMeetSDK', '13.3.4'
|
|
19
|
+
# The SDK's WebRTC (video track types), for the system PiP (`JitsiSystemPip`).
|
|
20
|
+
s.dependency 'JitsiWebRTC'
|
|
21
|
+
s.swift_version = '5.1'
|
|
22
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.13.0'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
namespace = "fr.tiltio.capacitor.jitsimeet"
|
|
22
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
|
|
23
|
+
defaultConfig {
|
|
24
|
+
// Jitsi Meet SDK minimum (Android 8).
|
|
25
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
26
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
27
|
+
versionCode 1
|
|
28
|
+
versionName "1.0"
|
|
29
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
30
|
+
// SDK keep rules, applied to the app's release build.
|
|
31
|
+
consumerProguardFiles 'proguard-rules.pro'
|
|
32
|
+
}
|
|
33
|
+
buildTypes {
|
|
34
|
+
release {
|
|
35
|
+
minifyEnabled false
|
|
36
|
+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
lintOptions {
|
|
40
|
+
abortOnError = false
|
|
41
|
+
}
|
|
42
|
+
compileOptions {
|
|
43
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
44
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// The Jitsi SDK and its React Native / WebRTC dependencies aren't on Maven Central. Apps must declare these
|
|
49
|
+
// repositories too (README, "Android").
|
|
50
|
+
repositories {
|
|
51
|
+
google()
|
|
52
|
+
mavenCentral()
|
|
53
|
+
maven { url = "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" }
|
|
54
|
+
maven { url = "https://www.jitpack.io" }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
dependencies {
|
|
59
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
60
|
+
implementation project(':capacitor-android')
|
|
61
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
62
|
+
implementation "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0"
|
|
63
|
+
// Pinned: the SDK bundles React Native and WebRTC, an upgrade must be tested.
|
|
64
|
+
implementation('org.jitsi.react:jitsi-meet-sdk:13.3.3') { transitive = true }
|
|
65
|
+
testImplementation "junit:junit:$junitVersion"
|
|
66
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
67
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Jitsi Meet SDK (React Native, WebRTC): loaded through reflection and JNI, R8 must not rename or remove anything.
|
|
2
|
+
-keep class org.jitsi.** { *; }
|
|
3
|
+
-keep class org.webrtc.** { *; }
|
|
4
|
+
-keep class com.facebook.** { *; }
|
|
5
|
+
-keep class com.swmansion.** { *; }
|
|
6
|
+
-keep class com.oney.WebRTCModule.** { *; }
|
|
7
|
+
-keep class com.reactnativecommunity.** { *; }
|
|
8
|
+
-keep class com.th3rdwave.** { *; }
|
|
9
|
+
-keep class com.horcrux.** { *; }
|
|
10
|
+
-dontwarn org.jitsi.**
|
|
11
|
+
-dontwarn org.webrtc.**
|
|
12
|
+
-dontwarn com.facebook.**
|
|
13
|
+
-dontwarn com.swmansion.**
|