dart_webrtc
1.8.2Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
Readme
dart-webrtc
A webrtc interface wrapped in dart language.
Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
This library will be used for flutter-webrtc for flutter web plugin.
compile E2EE worker
dart compile js ./lib/src/e2ee.worker/e2ee.worker.dart -o web/e2ee.worker.dart.js
How to develop
git clone https://github.com/flutter-webrtc/dart-webrtc && cd dart-webrtcdart pub getdart pub global activate webdevwebdev serve --auto=refresh
Changelog
Changelog
[1.8.2] - 2026-09-04
fix: add OpenHarmony to isMobile detection for HarmonyOS WebView feat: remove package:js usage for full wasm compatibility refactor: wrap transform fn to return a JSPromise fix: casting fails as value is a dart value
[1.8.1] - 2026-03-26
- Fix wasm-safe transfer lists for frame cryptor worker messages.
- Fix scalabilityMode.
[1.8.0] - 2026-03-16
- Add enum KeyDerivationAlgorithm to KeyProviderOptions.
[1.7.0] - 2026-01-22
- feat: Priority control APIs.
[1.6.0] - 2025-09-13
- feat: data packet cryptor.
[1.5.3+hotfix.5] - 2025-08-11
- fixed E2EE bug for Chrome rejoin.
[1.5.3+hotfix.4] - 2025-07-29
- fixed E2EE issue for Chrome.
[1.5.3+hotfix.3] - 2025-07-24
- fixed E2EE issue for Chrome.
[1.5.3+hotfix.2] - 2025-04-25
- fix bug for dc.onMessage.
[1.5.3+hotfix.1] - 2025-04-25
- add getter override for dc.bufferedAmountLowThreshold.
[1.5.3] - 2025-03-24
- add getBufferedAmount for DC.
[1.5.2+hotfix.1] - 2025-02-23.
- remove platform_detect.
[1.5.2] - 2025-02-23.
- fix stats for web.
[1.5.1] - 2025-02-15
- fix E2EE for firefox.
[1.5.0] - 2025-02-13
- remove js_util.
[1.4.10] - 2024-012-16
- fix compiler errors.
[1.4.9] - 2024-09-04
- bump web version to 1.0.0.
[1.4.8] - 2024-07-12
- fix: missing streamCompleter complete for getUserMedia.
- fix: RTCPeerConnectionWeb.getRemoteStreams.
[1.4.7] - 2024-07-12
- fix: MediaStreamTrack.getSettings.
[1.4.6+hotfix.1] - 2024-06-07
- Wider version dependencies for js/http.
[1.4.6] - 2024-06-05
- chore: bump version for js and http.
- fix: decrypting audio when e2ee.
- fix: translate audio constraints for web.
- fix: missing fault tolerance, better worker reports and a increased timeout for worker tasks.
- fix type cast exception in getConstraints()
[1.4.5] - 2024-05-13
- fix: negotiationNeeded listener.
- fix: fix type cast exception in getConstraints().
[1.4.4] - 2024-04-24
- fix: datachannel message parse for Firefox.
- fix: tryCatch editing mediaConstraints #34
[1.4.3] - 2024-04-18
- fix: do not fail if removing constraint fails
[1.4.2] - 2024-04-15
- fix.
[1.4.1] - 2024-04-12
- remove RTCConfiguration convert.
[1.4.0] - 2024-04-09
- Fixed bug for RTCConfiguration convert.
[1.3.3] - 2024-04-09
- Fix DC data parse.
[1.3.2] - 2024-04-09
- Fix error when constructing RTCDataChannelInit.
[1.3.1] - 2024-04-08
- Add keyRingSize/discardFrameWhenCryptorNotReady to KeyProviderOptions.
[1.3.0] - 2024-04-08
- update to package:web by @jezell in #29.
[1.2.1] - 2024-02-05
- Downgrade some dependencies make more compatible.
[1.2.0] - 2024-02-05
- Make E2EE events to be consistent with native.
- E2EE imporve, and fix issue on Firefox.
[1.1.2] - 2023-09-14
- Add more frame cryptor api.
[1.1.2] - 2023-08-14
- Add async functions for get pc states.
[1.1.1] - 2023-06-29
- downgrade collection to ^1.17.1.
[1.1.0] - 2023-06-29
- Add FrameCryptor support.
[1.0.17] - 2023-06-14
- Fix facingMode for mobile.
[1.0.16] - 2023-04-10
- Add addStreams to RTCRtpSender.
[1.0.15] - 2023-02-10
- add bufferedamountlow
- Fix bug for firefox.
[1.0.14] - 2023-01-30
- Add support for getCapabilities/setCodecPreferences.
[1.0.13] - 2022-12-12
- export jsRtpReciver.
[1.0.12] - 2022-12-12
- fix: Convert iceconnectionstate to connectionstate for Firefox.
[1.0.11] - 2022-11-12
- Change MediaStream.clone to async.
[1.0.10] - 2022-11-02
- Update MediaRecorder interface.
[1.0.9] - 2022-10-10
- Use RTCPeerConnection::onConnectionStateChange.
[1.0.8] - 2022-09-06
- Bump version for webrtc-interface.
[1.0.7] - 2022-08-04
- Bump version for webrtc-interface.
[1.0.6] - 2022-05-08
- Support null tracks in replaceTrack/setTrack.
[1.0.5] - 2022-03-31
- Added RTCDataChannel.id
[1.0.4] - 2022-02-07
- Add restartIce.
- Bump version for webrtc-interface.
[1.0.3] - 2021-12-28
- export media_stream_impl.dart to fix do not import impl files.
[1.0.2] - 2021-11-27
- Fix the type error of minified function in release mode.
[1.0.1] - 2021-11-25
- Bump interface version to 1.0.1
- Reduce code.
1.0.0
- Refactor using webrtc_interface.
0.2.3
- Fix bug for simulcast.
0.2.2
- Fix bug for unified-plan.
0.2.1
- Fix getStats.
0.2.0
- Implement basic functions.
0.1.0
- First working version.
0.0.1
- Initial version, created by Stagehand
Installing
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add dart_webrtcpubspec.yaml
name: dart_webrtc
description: Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
version: 1.8.2
homepage: https://github.com/flutter-webrtc/dart-webrtc
environment:
sdk: '>=3.3.0 <4.0.0'
dependencies:
collection: ^1.17.1
logging: ^1.1.0
meta: ^1.8.0
synchronized: ^3.0.0+3
web: ^1.0.0
webrtc_interface: ^1.5.1
dev_dependencies:
build_runner: ^2.3.3
build_web_compilers:
http: ">0.13.0 <1.3.0"
import_sorter: ^4.6.0
pedantic: ^1.9.0
protoo_client: ^0.3.0
test: ^1.15.4
Version history
| Version | Published | Archive | SHA-256 |
|---|---|---|---|
| 0.0.1 | On demand | Download | 861eb26c…87bee6 |
| 0.1.0 | On demand | Download | 8228e2e8…18b278 |
| 0.2.0 | On demand | Download | d525804f…26e08e |
| 0.2.1 | On demand | Download | 81a3cb69…927ce6 |
| 0.2.2 | On demand | Download | c6c394dd…55a247 |
| 0.2.3 | On demand | Download | 75494312…701bcb |
| 1.0.0 | On demand | Download | e8070c36…255148 |
| 1.0.1 | On demand | Download | b3173a9f…3ab0cd |
| 1.0.2 | On demand | Download | 4fe71223…f478a5 |
| 1.0.3 | On demand | Download | 19f9ccf5…b0e049 |
| 1.0.4 | On demand | Download | 4a917395…9304f2 |
| 1.0.5 | On demand | Download | 15eaba23…ab7d75 |
| 1.0.6 | On demand | Download | b873347c…3dc4ef |
| 1.0.7 | On demand | Download | 7c864131…12dbe4 |
| 1.0.8 | On demand | Download | b65314b3…00a7c4 |
| 1.0.9 | On demand | Download | 10b71827…9d9271 |
| 1.0.10 | On demand | Download | c6d5a8af…cb4f85 |
| 1.0.11 | On demand | Download | e3d2bef2…802cb0 |
| 1.0.12 | On demand | Download | 5d53ae88…b85158 |
| 1.0.13 | On demand | Download | f1449986…5b2c82 |
| 1.0.14 | On demand | Download | 6860e438…b8b134 |
| 1.0.15 | On demand | Download | a8244b36…8b6ea8 |
| 1.0.16 | On demand | Download | a34e59ac…1e4922 |
| 1.0.17 | On demand | Download | 89493010…7cca38 |
| 1.1.0 | On demand | Download | 2f62d624…f160c7 |
| 1.1.1 | On demand | Download | 3f581ea7…5c5c1a |
| 1.1.2 | On demand | Download | dfe42714…eb74a3 |
| 1.1.3 | On demand | Download | 5897a3bd…6745a9 |
| 1.2.0 | On demand | Download | cc401713…0cd597 |
| 1.2.1 | On demand | Download | 5cbc40bd…9ef857 |
| 1.3.0 | On demand | Download | f6c65206…ca5ceb |
| 1.3.1 | On demand | Download | e89fff8d…b78070 |
| 1.3.2 | On demand | Download | 8bcc17fa…d38174 |
| 1.3.3 | On demand | Download | a51163a6…1fc864 |
| 1.4.0 | On demand | Download | 7c2f527f…9d1bc9 |
| 1.4.1 | On demand | Download | 4565f3b0…617473 |
| 1.4.2 | On demand | Download | 6b101f35…fd969d |
| 1.4.3 | On demand | Download | ef3ba75d…889d9e |
| 1.4.4 | On demand | Download | b3a4f109…ad7a3b |
| 1.4.5 | On demand | Download | fe4db21d…e4d516 |
| 1.4.6 | On demand | Download | 2b7715ad…c1cd91 |
| 1.4.6+hotfix.1 | On demand | Download | d663abfe…57b65e |
| 1.4.7 | On demand | Download | dc97a87e…21e227 |
| 1.4.8 | On demand | Download | ac7ef077…ca2e47 |
| 1.4.9 | On demand | Download | c664ad88…6a51f6 |
| 1.4.10 | On demand | Download | e65506ed…7f3d86 |
| 1.5.0 | On demand | Download | 3b3ff59c…aa27c5 |
| 1.5.1 | On demand | Download | 03df5b41…7760cc |
| 1.5.2 | On demand | Download | 8ef852a0…f326b7 |
| 1.5.2+hotfix.1 | On demand | Download | b34e90bc…bef694 |
| 1.5.3 | On demand | Download | 8565f1f1…9a0202 |
| 1.5.3+hotfix.1 | On demand | Download | c8c4d013…639a4a |
| 1.5.3+hotfix.2 | On demand | Download | 5b76fd85…297116 |
| 1.5.3+hotfix.3 | On demand | Download | 77da1836…aa9ff7 |
| 1.5.3+hotfix.4 | On demand | Download | a2ae542c…69e28c |
| 1.5.3+hotfix.5 | On demand | Download | 3bfa069a…53d075 |
| 1.5.4 | On demand | Download | a23c7d21…f5b541 |
| 1.6.0 | On demand | Download | 51bcda4b…4ef65f |
| 1.7.0 | On demand | Download | 4ed7b9fa…625086 |
| 1.8.0 | On demand | Download | 63a3ed6b…e5d844 |
| 1.8.1 | On demand | Download | f6d615bd…d7edb2 |
| 1.8.2 | Cached · Upstream SHA-256 matched | Download | 078e3c43…e62716 |
Dependencies
collection "^1.17.1"
logging "^1.1.0"
meta "^1.8.0"
synchronized "^3.0.0+3"
web "^1.0.0"
webrtc_interface "^1.5.1"