- Notifications
You must be signed in to change notification settings - Fork1.2k
WebRTC plugin for Flutter Mobile/Desktop/Web
License
flutter-webrtc/flutter-webrtc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
WebRTC plugin for Flutter Mobile/Desktop/Web
Sponsored with 💖 by
Enterprise Grade APIs for Feeds, Chat, & Video.Try the Flutter Video tutorial 💬
LiveKit - Open source WebRTC and realtime AI infrastructure
Feature | Android | iOS | Web | macOS | Windows | Linux | Embedded | Fuchsia |
---|---|---|---|---|---|---|---|---|
Audio/Video | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Data Channel | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Screen Capture | ✔️ | ✔️(*) | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Unified-Plan | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Simulcast | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
MediaRecorder | ✔️ | |||||||
End to End Encryption | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | |
Insertable Streams |
Additional platform/OS support from the other community
- flutter-tizen:https://github.com/flutter-tizen/plugins/tree/master/packages/flutter_webrtc
- flutter-elinux(WIP):sony/flutter-elinux-plugins#7
Addflutter_webrtc
as adependency in your pubspec.yaml file.
Add the following entry to yourInfo.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.
The WebRTC.xframework compiled after the m104 release no longer supports iOS arm devices, so need to add theconfig.build_settings['ONLY_ACTIVE_ARCH'] = 'YES'
to your ios/Podfile in your project
ios/Podfile
post_installdo |installer|installer.pods_project.targets.eachdo |target|flutter_additional_ios_build_settings(target)target.build_configurations.eachdo |config|# Workaround for https://github.com/flutter/flutter/issues/64502config.build_settings['ONLY_ACTIVE_ARCH']='YES'# <= this lineendendend
Ensure the following permission is present in your Android Manifest file, located in<project root>/android/app/src/main/AndroidManifest.xml
:
<uses-featureandroid:name="android.hardware.camera" /><uses-featureandroid:name="android.hardware.camera.autofocus" /><uses-permissionandroid:name="android.permission.CAMERA" /><uses-permissionandroid:name="android.permission.RECORD_AUDIO" /><uses-permissionandroid:name="android.permission.ACCESS_NETWORK_STATE" /><uses-permissionandroid:name="android.permission.CHANGE_NETWORK_STATE" /><uses-permissionandroid:name="android.permission.MODIFY_AUDIO_SETTINGS" />
If you need to use a Bluetooth device, please add:
<uses-permissionandroid:name="android.permission.BLUETOOTH"android:maxSdkVersion="30" /><uses-permissionandroid: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 inEglBase
interface. Just add this to your app levelbuild.gradle
:
android {//... compileOptions { sourceCompatibilityJavaVersion.VERSION_1_8 targetCompatibilityJavaVersion.VERSION_1_8 }}
If necessary, in the samebuild.gradle
you will need to increaseminSdkVersion
ofdefaultConfig
up to23
(currently default Flutter generator set it to16
).
When you compile the release apk, you need to add the following operations,Setup Proguard Rules
The project is inseparable from the contributors of the community.
- CloudWebRTC - Original Author
- RainwayApp - Sponsor
- 亢少军 - Sponsor
- ION - Sponsor
- reSipWebRTC - Sponsor
- 沃德米科技-36记手写板 - Sponsor
- 阿斯特网络科技有限公司 - Sponsor
For more examples, please refer toflutter-webrtc-demo.
This project exists thanks to all the people who contribute. [Contribute].
Become a financial contributor and help us sustain our community. [Contribute]
Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]
About
WebRTC plugin for Flutter Mobile/Desktop/Web