Skip to content

Commit

Permalink
Update Docusaurus to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Sep 23, 2024
1 parent 0269d68 commit a570c97
Show file tree
Hide file tree
Showing 12 changed files with 8,355 additions and 15,077 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
node-version-file: '.nvmrc'

- name: Build
run: npm ci && npm run build
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20
16 changes: 13 additions & 3 deletions docs/dev-guide/android-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,21 +88,26 @@ If you want to use a SDK that is built from source, you will likely benefit from

In source code form, the Android SDK dependencies are locked/pinned by `package.json` and `package-lock.json` of the Jitsi Meet project. To obtain the data, execute NPM in the jitsi-meet project directory:

```shell
npm install
```

This will pull in the dependencies in either binary format, or in source code format, somewhere under /node_modules/

Third-party React Native _modules_, which Jitsi Meet SDK for Android depends on, are download by NPM in source code
or binary form. These need to be assembled into Maven artifacts, and then published to your local Maven repository.
A script is provided to facilitate this. From the root of the jitsi-meet project repository, run:

```shell
./android/scripts/release-sdk.sh /tmp/repo
```

This will build and publish the SDK, and all of its dependencies to the specified Maven repository (`/tmp/repo`) in
this example.

You're now ready to use the artifacts. In _your_ project, add the Maven repository that you used above (`/tmp/repo`) into your top-level `build.gradle` file:

```gradle
allprojects {
repositories {
maven { url "file:/tmp/repo" }
Expand All @@ -111,12 +116,15 @@ You're now ready to use the artifacts. In _your_ project, add the Maven reposito
maven { url 'https://www.jitpack.io' }
}
}
```

You can use your local repository to replace the Jitsi repository (`maven { url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases" }`) when you published _all_ subprojects. If you didn't do that, you'll have to add both repositories. Make sure your local repository is listed first!

Then, define the dependency `org.jitsi.react:jitsi-meet-sdk` into the `build.gradle` file of your module:

```java
implementation ('org.jitsi.react:jitsi-meet-sdk:+') { transitive = true }
```

Note that there should not be a need to explicitly add the other dependencies, as they will be pulled in as transitive
dependencies of `jitsi-meet-sdk`.
Expand All @@ -131,7 +139,7 @@ experience and makes it reusable by third-party apps.
First, add Java 1.8 compatibility support to your project by adding the
following lines into your `build.gradle` file:

```
```gradle
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
Expand Down Expand Up @@ -552,7 +560,8 @@ To set up the Dropbox integration, follow these steps:
1. Add the following to the app's AndroidManifest.xml and change `<APP_KEY>` to
your Dropbox app key:
```

```xml
<activity
android:configChanges="keyboard|orientation"
android:launchMode="singleTask"
Expand All @@ -568,6 +577,7 @@ your Dropbox app key:

2. Add the following to the app's strings.xml and change `<APP_KEY>` to your
Dropbox app key:
```

```xml
<string name="dropbox_app_key"><APP_KEY></string>
```
40 changes: 21 additions & 19 deletions docs/dev-guide/flutter-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ platform :ios, '12.4'

The plugin requests camera and microphone access, make sure to include the required entries for `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` in your `Info.plist` file from the `ios/Runner` directory.

```
```xml
<key>NSCameraUsageDescription</key>
<string>The app needs access to your camera for meetings.</string>
<key>NSMicrophoneUsageDescription</key>
Expand All @@ -76,7 +76,7 @@ The plugin requests camera and microphone access, make sure to include the requi

Go to `android/app/build.gradle` and make sure that the `minSdkVersion` is set to at least 24`

```
```gradle
android {
...
defaultConfig {
Expand Down Expand Up @@ -128,7 +128,7 @@ The `JitsiMeet` class is the entry point for the SDK. It is used to launch the m
5. #### setVideoMuted(bool muted)
Sets the state of the localParticipant video muted according to the `muted` parameter.

6. #### sendEndpointTextMessage({String? to, required String message})
6. #### sendEndpointTextMessage(`{String? to, required String message}`)
Sends a message via the data channel to one particular participant or all of them. If the `to` param is empty, the message will be sent to all the participants in the conference.

To get the participantId, the `participantsJoined` event should be listened for, which has as a parameter the `participantId` and this should be stored somehow.
Expand All @@ -140,7 +140,7 @@ The `JitsiMeet` class is the entry point for the SDK. It is used to launch the m

Opens the chat dialog. If `to` contains a valid participantId, the private chat with that particular participant will be opened.

9. #### sendChatMessage({String? to, required String message})
9. #### sendChatMessage(`{String? to, required String message}`)

Sends a chat message to one particular participant or all of them. If the `to` param is empty, the message will be sent to all the participants in the conference.

Expand Down Expand Up @@ -184,33 +184,35 @@ var options = JitsiMeetConferenceOptions(

- All the values that can be added to the `featureFlags` can be found [here](https://github.com/jitsi/jitsi-meet/blob/master/react/features/base/flags/constants.ts).

- #### JitsiMeetUserInfo({String displayName, String email, String avatar})
The constructor for the JitsiMeetUserInfo.
#### JitsiMeetUserInfo(`{String displayName, String email, String avatar}`)

The constructor for the JitsiMeetUserInfo.

P.S. the avatar should be an url.

### JitsiMeetEventListener

This class intends to be used as a listener for events that come from the native sdks. It will receive as arguments the event handlers

1. #### conferenceJoined(String url)
#### conferenceJoined(String url)

Called when a conference was joined.
- `url` : the conference URL

2. #### conferenceTerminated(String url, Object? error)
#### conferenceTerminated(String url, Object? error)

Called when the active conference ends, be it because of user choice or because of a failure.

- `url` : the conference URL
- `error` : missing if the conference finished gracefully, otherwise contains the error message

3. #### conferenceWillJoin(String url)
#### conferenceWillJoin(String url)

Called before a conference is joined.

- url: the conference URL

4. #### participantJoined(String? email, String? name, String? role, String? participantId)
#### participantJoined(String? email, String? name, String? role, String? participantId)

Called when a participant has joined the conference.

Expand All @@ -219,39 +221,39 @@ This class intends to be used as a listener for events that come from the native
- `role` : the role of the participant.
- `participantId` : the id of the participant.

5. #### participantLeft(String? participantId)
#### participantLeft(String? participantId)

Called when a participant has left the conference.

- `participantId` : the id of the participant that left.

6. #### audioMutedChanged(bool muted)
#### audioMutedChanged(bool muted)

Called when the local participant's audio is muted or unmuted.

- `muted` : a boolean indicating whether the audio is muted or not.

7. #### videoMutedChanged(bool muted)
#### videoMutedChanged(bool muted)

Called when the local participant's video is muted or unmuted.

- `muted` : a boolean indicating whether the video is muted or not.

8. #### endpointTextMessageReceived(String senderId, String message)
#### endpointTextMessageReceived(String senderId, String message)

Called when an endpoint text message is received.

- `senderId` : the participantId of the sender
- `message` : the content.

9. #### screenShareToggled(String participantId, bool sharing)
#### screenShareToggled(String participantId, bool sharing)

Called when a participant starts or stops sharing his screen.

- `participantId` : the id of the participant
- `sharing` : the state of screen share

10. #### chatMessageReceived(String senderId, String message, bool isPrivate, String? timestamp)
#### chatMessageReceived(String senderId, String message, bool isPrivate, String? timestamp)

Called when a chat text message is received.

Expand All @@ -260,18 +262,18 @@ This class intends to be used as a listener for events that come from the native
- `isPrivate` : true if the message is private, false otherwise.
- `timestamp` : the (optional) timestamp of the message.

11. #### chatToggled(bool isOpen)
#### chatToggled(bool isOpen)

Called when the chat dialog is opened or closed.

- `isOpen` : true if the chat dialog is open, false otherwise.

12. #### participantsInfoRetrieved(String participantsInfo)
#### participantsInfoRetrieved(String participantsInfo)
Called when the `retrieveParticipantsInfo` action is called

- `participantsInfo` : a list of participants' information as a string.

13. #### readyToClose()
#### readyToClose()
Called when the SDK is ready to be closed. No meeting is happening at this point.

#### Example of listener:
Expand Down
32 changes: 21 additions & 11 deletions docs/dev-guide/ios-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The recommended way for using the SDK is by using CocoaPods. In order to
do so, add the `JitsiMeetSDK` dependency to your existing `Podfile` or create
a new one following this example:

```
```ruby
platform :ios, '13.4'

workspace 'JitsiMeetSDKTest.xcworkspace'
Expand Down Expand Up @@ -415,7 +415,8 @@ We will update `SampleHandler.swift` to initiate the socket connection with RN W
Even though an app extension bundle is nested within its containing app’s bundle, the running app extension and containing app have no direct access to each other’s containers. We will address this by enabling data sharing. To enable data sharing, use Xcode or the Developer portal to enable app groups for the containing app and its contained app extensions. Next, register the app group in the portal and specify the app group to use in the containing app. To learn about working with app groups, see [Adding an App to an App Group](https://developer.apple.com/library/archive/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW19).

Now, add a `private var socketFilePath: String` to your `SampleHandler` class and set it up with a shared file named `rtc_SSFD`, using the newly registered app group, like this:
```

```swift
private enum Constants {
static let appGroupIdentifier = "my.custom.app.group"
}
Expand All @@ -428,7 +429,8 @@ private var socketFilePath: String {
```

Next, we will configure the `SocketConnection` to use the shared file. Add a `private var clientConnection: SocketConnection?` to the `SampleHandler` class and override `init` to set it up, like this:
```

```swift
override init() {
super.init()
if let connection = SocketConnection(filePath: socketFilePath) {
Expand All @@ -444,7 +446,8 @@ In order for this to work, the RN WebRTC end needs to know about the app group i
For starting screen sharing JitsiMeet SDK provides the UI to present the `RPSystemBroadcastPickerView` to the user. By default, the picker will display a list of all the available broadcast providers. In order to limit the picker to our particular broadcast provider, we have to set `preferredExtension` to the bundle identifier of the broadcast extension. We are doing this by adding a new key named `RTCScreenSharingExtension` to the app's Info.plist and setting the broadcast extension bundle identifier as the value.

Once screen recording has started ReplayKit invokes the methods to handle video buffers, as well as the methods to handle starting and stopping the broadcast, from the `SampleHandler` class. The `broadcastStarted(withSetupInfo:)` method is our entry point for opening the socket connection with the RN WebRTC server. To do this we have to post the `broadcastStarted` notification the server is listening for, in order to start the connection, and we are ready to connect. Add a new method `openConnection()` to the `SampleHandler` class which will repeatedly attempt connecting to the server, for cases when the server connection start is delayed:
```

```swift
func openConnection() {
let queue = DispatchQueue(label: "broadcast.connectTimer")
let timer = DispatchSource.makeTimerSource(queue: queue)
Expand All @@ -462,7 +465,8 @@ func openConnection() {
```

Next, update the `broadcastStarted(withSetupInfo:)` method to post the notification and connect:
```

```swift
override func broadcastStarted(withSetupInfo setupInfo: [String: NSObject]?) {
DarwinNotificationCenter.shared.postNotification(.broadcastStarted)
openConnection()
Expand All @@ -482,7 +486,8 @@ RN WebRTC is designed to work with jpeg encoded images framed in a `CFHTTPMessag
- `Buffer-Orientation` - the value for the `RPVideoSampleOrientationKey` that describes the video orientation.

We are going to prepare and send our video frames using the `SampleUploader` class. Add a new `private var uploader: SampleUploader?` to the SampleHandler class and update `init()` to initialize it:
```

```swift
override init() {
super.init()
if let connection = SocketConnection(filePath: socketFilePath) {
Expand All @@ -493,7 +498,8 @@ override init() {
```

Next, we are going to update the `processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType)` method to send our video frames. For performance reasons, we'll also implement a very simple mechanism for adjusting the frame rate by using every third frame. Add a new `private var frameCount = 0` and update the above-mentioned method like this:
```

```swift
override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
switch sampleBufferType {
case .video:
Expand All @@ -509,7 +515,8 @@ override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBuf
```

Also, update `broadcastStarted(withSetupInfo setupInfo: [String: NSObject]?)` to reset the `frameCount` every time screen sharing is started:
```

```swift
override func broadcastStarted(withSetupInfo setupInfo: [String: NSObject]?) {
frameCount = 0

Expand All @@ -527,15 +534,17 @@ Besides the in-meeting UI (screenshot 2), ReplayKit integration with iOS provide
![ios-screensharing](../assets/iOS_screensharing_2.png "screenshot 2") ![ios-screensharing](../assets/iOS_screensharing_3.png "screenshot 3") ![ios-screensharing](../assets/iOS_screensharing_4.png "screenshot 4")

Any of these actions will trigger `broadcastFinished` in our `SampleHandler` implementation. This is our entry point for closing the connection and cleaning up. We will update `broadcastFinished` to post a `DarwinNotification.broadcastStopped` system-wide notification and close the connection:
```

```swift
override func broadcastFinished() {
DarwinNotificationCenter.shared.postNotification(.broadcastStopped)
clientConnection?.close()
}
```

Another scenario we need to take care of is when the server connection is dropped, like when leaving a meeting while screen sharing or an error is encountered. We will address this by handling `clientConnection.didClose` event. Add a new method `setupConnection` to the `SampleHandler` class and update `init` to call it:
```

```swift
func setupConnection() {
clientConnection?.didClose = { [weak self] error in
if let error = error {
Expand All @@ -561,7 +570,8 @@ override init() {
```

Now, that we are done writing the implementation, we just need to enable the functionality in Jitsi. We are doing this by configuring `JitsiMeetConferenceOptionsBuilder` with the `ios.screensharing.enabled feature` flag, like this:
```

```swift
let options = JitsiMeetConferenceOptions.fromBuilder { [weak self] builder in
...
builder.setFeatureFlag("ios.screensharing.enabled", withBoolean: true)
Expand Down
14 changes: 7 additions & 7 deletions docs/devops-guide/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ For more information see the documentation of the "Prosody Auth Matrix User Veri
Variable | Description | Example
--- | --- | ---
`MATRIX_UVS_URL` | Base URL to the matrix user verification service (without ending slash) | https://uvs.example.com:3000>
`MATRIX_UVS_URL` | Base URL to the matrix user verification service (without ending slash) | `https://uvs.example.com:3000`
`MATRIX_UVS_ISSUER` | (optional) The issuer of the auth token to be passed through. Must match what is being set as `iss` in the JWT. | issuer (default)
`MATRIX_UVS_AUTH_TOKEN` | (optional) user verification service auth token, if authentication enabled | changeme
`MATRIX_UVS_SYNC_POWER_LEVELS` | (optional) Make Matrix room moderators owners of the Prosody room. | 1
Expand All @@ -591,7 +591,7 @@ For more information see the documentation of the "Hybrid Matrix Token"
Variable | Description | Example
--- | --- | ---
`MATRIX_UVS_URL` | Base URL to the matrix user verification service (without ending slash) | https://uvs.example.com:3000>
`MATRIX_UVS_URL` | Base URL to the matrix user verification service (without ending slash) | `https://uvs.example.com:3000`
`MATRIX_UVS_ISSUER` | (optional) The issuer of the auth token to be passed through. Must match what is being set as `iss` in the JWT. It allows all issuers (`*`) by default. | my_issuer
`MATRIX_UVS_AUTH_TOKEN` | (optional) user verification service auth token, if authentication enabled | my_matrix_secret
`MATRIX_UVS_SYNC_POWER_LEVELS` | (optional) Make Matrix room moderators owners of the Prosody room. | 1
Expand All @@ -615,7 +615,7 @@ Here are the required options:
Variable | Description | Example
--- | --- | ---
`ETHERPAD_URL_BASE` | Set etherpad-lite URL | http://etherpad.meet.jitsi:9001>
`ETHERPAD_URL_BASE` | Set etherpad-lite URL | `http://etherpad.meet.jitsi:9001`
### Transcription configuration
Expand All @@ -640,9 +640,9 @@ For setting the Google Cloud Credentials please read https://cloud.google.com/te
Variable | Description | Default value
--- | --- | ---
`JVB_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | https://public:private@host:port/1>
`JICOFO_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | https://public:private@host:port/1>
`JIGASI_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | https://public:private@host:port/1>
`JVB_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | `https://public:private@host:port/1`
`JICOFO_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | `https://public:private@host:port/1`
`JIGASI_SENTRY_DSN` | Sentry Data Source Name (Endpoint for Sentry project) | `https://public:private@host:port/1`
`SENTRY_ENVIRONMENT` | Optional environment info to filter events | production
`SENTRY_RELEASE` | Optional release info to filter events | 1.0.0
Expand All @@ -668,7 +668,7 @@ Variable | Description | Default value
`XMPP_DOMAIN` | Internal XMPP domain | meet.jitsi
`XMPP_AUTH_DOMAIN` | Internal XMPP domain for authenticated services | auth.meet.jitsi
`XMPP_SERVER` | Internal XMPP server name xmpp.meet.jitsi | xmpp.meet.jitsi
`XMPP_BOSH_URL_BASE` | Internal XMPP server URL for BOSH module | http://xmpp.meet.jitsi:5280>
`XMPP_BOSH_URL_BASE` | Internal XMPP server URL for BOSH module | `http://xmpp.meet.jitsi:5280`
`XMPP_MUC_DOMAIN` | XMPP domain for the MUC | muc.meet.jitsi
`XMPP_INTERNAL_MUC_DOMAIN` | XMPP domain for the internal MUC | internal-muc.meet.jitsi
`XMPP_GUEST_DOMAIN` | XMPP domain for unauthenticated users | guest.meet.jitsi
Expand Down
2 changes: 1 addition & 1 deletion docs/devops-guide/reservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ provide meaningful information to the user.

In case of a `409` response to the `HTTP POST` request, Prosody will try
to read information about the conflicting conference using an `HTTP GET`
'/conference/{conflict_id}' endpoint. The response should provide all
`/conference/{conflict_id}` endpoint. The response should provide all
information about the conference stored in the reservation system:

* `"id"`: conference identifier assigned by the reservation system
Expand Down
Loading

0 comments on commit a570c97

Please sign in to comment.