搜尋套件、儲存庫與 APP 分類

套件詳情v13.2.0

jitsi_meet_flutter_sdk

一個 Flutter 外掛程式,作為 Jitsi Meet Flutter SDK,提供與 Jitsi Meet 應用程式相同的使用者體驗。

AndroidiOS
近 30 天下載
5380
喜歡數
111
Pub 分數
150

安裝套件

flutter pub add jitsi_meet_flutter_sdk

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

jitsi_meet_flutter_sdk 是一個 Flutter 插件,可將 Jitsi Meet 的視訊會議功能整合至 Flutter 應用程式中,為 Android 與 iOS 提供無縫、類原生的體驗。它讓開發者能利用強大且開源的 Jitsi 基礎設施,在應用程式中直接嵌入即時音訊、影像與螢幕分享。該 SDK 支援可自訂的會議介面,以及具備端對端加密的安全、可擴展通訊。

適用情境

  • 應用內視訊通話用於遠端醫療平台
  • 虛擬課堂和線上學習應用
  • 遠端團隊協作工具
  • 帶有影片互動的客戶支援
  • 即時事件串流與觀眾參與

主要特色

  • 跨平台相容性(Android 與 iOS)
  • 端對端加密
  • 可自定義的 UI 組件
  • 螢幕共用與錄製支援
  • 與現有 Flutter 工作流程整合

適合對象

  • 開發即時通訊功能的開發者
  • 教育科技初創企業
  • 醫療應用開發者
  • 企業協作工具
  • 開源專案貢獻者

使用建議

  • 需要自託管或管理的 Jitsi 伺服器以獲得完全控制權
  • 高品質視頻的網路頻寬考量
  • 用於進階安全設定的額外設定
  • 核心 Jitsi UI 元素的自定義功能有限
  • 依賴穩定的互聯網連接以獲得最佳效能

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Jitsi Meet Flutter SDK

License pub package

The Jitsi Meet Flutter SDK provides the same user experience as the Jitsi Meet app, in the form of a Flutter plugin so that you can embed and customize Jitsi Meet in your own Flutter app.

Supported platforms

Platform Supported Notes
Android ✅ Minimum API level is 24
iOS ✅ Minimum supported version is 15.1
Web ❌

Sample application using the Flutter

If you want to see how easy integrating the Jitsi Meet Flutter SDK into a Flutter application is, take a look at the
sample applications repository.

Installation

Add dependency

Add the dependency from command-line

$ flutter pub add jitsi_meet_flutter_sdk

The command above will add this to the pubspec.yaml file in your project (you can do this manually):

dependencies:
    jitsi_meet_flutter_sdk: ^13.1.1
Install

Install the packages from the terminal:

$ flutter pub get
Import files

Import the following files into your dart code:

import 'package:jitsi_meet_flutter_sdk/jitsi_meet_flutter_sdk.dart';
Usage
Join meeting

Firstly, create a JitsiMeet object, then call the method join from it with a JitsiMeetConferenceOptions object

var jitsiMeet = JitsiMeet();
var options = JitsiMeetConferenceOptions(room: 'jitsiIsAwesome');
jitsiMeet.join(options);

Configuration

iOS

Make sure in Podfile from ios directory you set the ios version 15.1 or higher

platform :ios, '15.1'

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.

<key>NSCameraUsageDescription</key>
<string>The app needs access to your camera for meetings.</string>
<key>NSMicrophoneUsageDescription</key>
<string>The app needs access to your microphone for meetings.</string>

To use the screen sharing feature requires Broadcast Upload Extension. Please check the following to integrate it: https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-ios-sdk/#screen-sharing-integration.

Android

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

android {
    ...
    defaultConfig {
        ...
        minSdkVersion 24
    }
}

The application:label field from the Jitsi Meet Android SDK will conflict with your application's one . Go to android/app/src/main/AndroidManifest.xml and add the tools library and tools:replace="android:label" to the application tag.

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools">
    <application
        tools:replace="android:label"
        android:label="sample_app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        ...
    </application>
</manifest>
Using ProGuard

If you are using ProGuard (common on Release builds) make sure you add these rules to your rules file.

Using the API

JitsiMeet

The JitsiMeet class is the entry point for the sdk. It is used to launch the meeting screen, to send and receive all the events.

  1. JitsiMeet()

    The constructor for the class.

  2. join(JitsiMeetConferenceOptions options, [JitsiMeetEventListener? listener])

    Joins a meeting with the given options and optionally a listener is given

    • options : meeting options
    • listener : event listener for events triggered by the native sdks
  3. hangUp()

    The localParticipant leaves the current meeting.

  4. setAudioMuted(bool muted)

    Sets the state of the localParticipant audio muted according to the muted parameter.

  5. setVideoMuted(bool muted)

    Sets the state of the localParticipant video muted according to the muted parameter.

  6. sendEndpointTextMessage({String? to, required String message})

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

    In order to get the participantId, the participantsJoined event should be listened for, which have as a parameter the participantId and this should be stored somehow.

  7. toggleScreenShare(bool enabled)

    Sets the state of the localParticipant screen sharing according to the enabled parameter.

  8. openChat([String? to])

    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})

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

    In order to get the participantId, the participantsJoined event should be listened for, which have as a parameter the participantId and this should be stored somehow.

  10. closeChat()

    Closes the chat dialog.

  11. retrieveParticipantsInfo()

    Sends and event that will trigger the participantsInfoRetrieved event which will contain participants information

JitsiMeetConferenceOptions

This object encapsulates all the options that can be tweaked when joining a conference.

Example:

var options = JitsiMeetConferenceOptions(
      serverURL: "https://meet.jit.si",
      room: "jitsiIsAwesomeWithFlutter",
      configOverrides: {
        "startWithAudioMuted": false,
        "startWithVideoMuted": false,
        "subject" : "Jitsi with Flutter",
      },
      featureFlags: {
        "unsaferoomwarning.enabled": false
      },
      userInfo: JitsiMeetUserInfo(
          displayName: "Flutter user",
          email: "user@example.com"
      ),
    );
  • All the values that can be added to the configOverrides can be found here.

  • All the values that can be added to the featureFlags can be found here.

  • 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)

    Called when a conference was joined.

    • url : the conference URL
  2. 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)

    Called before a conference is joined.

    • url: the conference URL
  4. participantJoined(String? email, String? name, String? role, String? participantId)

    Called when a participant has joined the conference.

    • email : the email of the participant. It may not be set if the remote participant didn't set one.
    • name : the name of the participant.
    • role : the role of the participant.
    • participantId : the id of the participant.
  5. participantLeft(String? participantId)

    Called when a participant has left the conference.

    • participantId : the id of the participant that left.
  6. 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)

    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)

    Called when an endpoint text message is received.

    • senderId : the participantId of the sender
    • message : the content.
  9. 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)

    Called when a chat text message is received.

    • senderId : the id of the participant that sent the message.
    • message : the content of the message.
    • isPrivate : true if the message is private, false otherwise.
    • timestamp : the (optional) timestamp of the message.
  11. 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)

    Called when retrieveParticipantsInfo action is called

    • participantsInfo : a list of participants information as a string.
  13. readyToClose()

    Called when the SDK is ready to be closed. No meeting is happening at this point.

Example of listener:
var listener = JitsiMeetEventListener(
      conferenceJoined: (url) {
        debugPrint("conferenceJoined: url: $url");
      },

      participantJoined: (email, name, role, participantId) {
        debugPrint(
          "participantJoined: email: $email, name: $name, role: $role, "
              "participantId: $participantId",
        );
        participants.add(participantId!);
      },

      chatMessageReceived: (senderId, message, isPrivate) {
        debugPrint(
          "chatMessageReceived: senderId: $senderId, message: $message, "
              "isPrivate: $isPrivate",
        );
      },

      readyToClose: () {
        debugPrint("readyToClose");
      },
    );

References

While building this project inspiration from https://github.com/saibotma/jitsi_meet_wrapper was taken.

所屬分類

依賴

依賴清單 1 項

  • plugin_platform_interface^2.0.2

原始碼儲存庫

使用此套件的專案

暫無相關資料。