Medea Flutter-WebRTC

pub libwebrtc


WebRTC plugin for Flutter, designed for and used in Medea Jason WebRTC client, built on top of prebuilt libwebrtc binaries.

Initially, represented a fork of the Flutter-WebRTC plugin, but at the moment, there is almost nothing left from the initial upstream version due to a complete rewrite.

Supported platforms

How it works

flowchart TD
    A[User App] -->|Dart| B[medea_flutter_webrtc] -->|Dart| C{Platform}
        C --> D["Mobile (Dart)"]
            D -->|Platform Channel| F["Native Mobile (Kotlin / Swift)"]
        C --> E["Desktop (Dart)"]
            E -->|"FFI (flutter_rust_bridge)"| G["medea-flutter-webrtc-native (Rust) "]
                G -->|Rust| H["libwebrtc-sys (Rust)"]
                    H -->|"FFI (cxx)"| I["Native Desktop (c++ / objc)"]


Add medea_flutter_webrtc as a dependency to your pubspec.yaml file.


Ensure that the following permissions are present in your AndroidManifest.xml file, located in <project_root>/android/app/src/main/AndroidManifest.xml:

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

If you need to use a Bluetooth device (like headphones), then also add:

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

The Flutter project template usually adds them, so they may already be there.

Also, you will need to set your build settings to Java 8, because the official WebRTC JAR on Android 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

If necessary, in the same build.gradle you need to increase minSdkVersion of defaultConfig up to 21 (currently, the default Flutter generator sets it to 16).

IMPORTANT: When you compile the release .apk, you need to add the following operations: Setup Proguard Rules.


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

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

These entries allow your app to access camera and microphone.


For more details, please see the medea_flutter_webrtc_example example.


Copyright © 2021-2023 Instrumentisto Team,

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at

The original upstream source code is licensed under MIT license with modifications following Apache License 2.0.