Giter Club home page Giter Club logo

waterbustech / waterbus-flutter-sdk Goto Github PK

View Code? Open in Web Editor NEW
13.0 0.0 3.0 3.05 MB

Flutter plugin of Waterbus. Build video call or online meeting app with SFU. Supports Android/iOS/MacOS/Web

Home Page: https://docs.waterbus.tech

License: Apache License 2.0

Dart 91.03% Shell 0.28% Kotlin 6.81% Swift 1.12% Ruby 0.77%
flutter-sdk realtime-messaging video-call webrtc webrtc-video websocket flutter-webrtc conferencing flutter video av1-codec voip

waterbus-flutter-sdk's Introduction

Important

Waterbus is an open source video conferencing app built on latest WebRTC SDK. Currently, Waterbus is an early release that is subject to the following limitations: it may have limited support, changes may not be compatible with other pre-general availability versions, and availability may change without notice.

Flutter Waterbus SDK

Flutter plugin of Waterbus. Build video call or online meeting application with SFU model. Supports iOS, Android. ExampleApp

Codec supported

Codec VP8 VP9 H264 H265 AV1
iOS ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐ŸŸข
Android ๐ŸŸข ๐ŸŸข ๐ŸŸข ๐ŸŸข

Features

  • Join room
    await WaterbusSdk.instance.joinRoom(
      roomId: roomCode,
      participantId: participantId,
      onNewEvent: (event) {
        switch (event.event) {
          case CallbackEvents.shouldBeUpdateState:
            // rebuild your ui
            break;
          case CallbackEvents.newParticipant:
            final String? participantId = event.participantId;
            if (participantId == null) return;

            // add new participant to your ui
            break;
          case CallbackEvents.participantHasLeft:
            final String? participantId = event.participantId;
            if (participantId == null) return;

            // remove participant to your ui
            break;
          default:
            break;
        }
      },
    );
  • Leave room
await WaterbusSdk.instance.leaveRoom();
  • Prepare Media (will prepare the camera and microphone for you to turn on and off before entering the meeting)
await WaterbusSdk.instance.prepareMedia();

Getting started

  • Include this package to your pubspec.yaml
waterbus_sdk:
    git:
      url: https://github.com/waterbustech/waterbus-flutter-sdk.git
      path: '.'
      ref: 0.0.1

Android

Ensure the following permission is present in your Android Manifest file, located in <project root>/android/app/src/main/AndroidManifest.xml:

<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

If you need to use a Bluetooth device, please add:

<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />

The Flutter project template adds it, so it may already be there.

Also you will need to set your build settings to Java 8, because official WebRTC jar now uses static methods in EglBase interface. Just add this to your app level build.gradle:

android {
    //...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

iOS

Add the following entry to your Info.plist file, located in <project root>/ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) Camera Usage!</string>
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) Microphone Usage!</string>

This entry allows your app to access camera and microphone.

Note for iOS.

The WebRTC.xframework compiled after the m104 release no longer supports iOS arm devices, so need to add the config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' to your ios/Podfile in your project

ios/Podfile

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
     target.build_configurations.each do |config|
      # Workaround for https://github.com/flutter/flutter/issues/64502
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'YES' # <= this line
     end
  end
end

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue if you encounter any problems or have suggestions for improvements.

Contact Information

If you have any questions or suggestions related to this application, please contact me via email: [email protected] or [email protected].

Reference: flutter_webrtc

License

Apache License 2.0

waterbus-flutter-sdk's People

Contributors

lambiengcode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

waterbus-flutter-sdk's Issues

Docs

Hey @lambiengcode looks like a promising package! i was trying to take a look but the docs site isn't available, all what i can see white page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.