dart_webrtc

1.8.2

Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.

Download archive

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-webrtc
  • dart pub get
  • dart pub global activate webdev
  • webdev 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_webrtc
pubspec.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

VersionPublishedArchiveSHA-256
0.0.1On demandDownload861eb26c…87bee6
0.1.0On demandDownload8228e2e8…18b278
0.2.0On demandDownloadd525804f…26e08e
0.2.1On demandDownload81a3cb69…927ce6
0.2.2On demandDownloadc6c394dd…55a247
0.2.3On demandDownload75494312…701bcb
1.0.0On demandDownloade8070c36…255148
1.0.1On demandDownloadb3173a9f…3ab0cd
1.0.2On demandDownload4fe71223…f478a5
1.0.3On demandDownload19f9ccf5…b0e049
1.0.4On demandDownload4a917395…9304f2
1.0.5On demandDownload15eaba23…ab7d75
1.0.6On demandDownloadb873347c…3dc4ef
1.0.7On demandDownload7c864131…12dbe4
1.0.8On demandDownloadb65314b3…00a7c4
1.0.9On demandDownload10b71827…9d9271
1.0.10On demandDownloadc6d5a8af…cb4f85
1.0.11On demandDownloade3d2bef2…802cb0
1.0.12On demandDownload5d53ae88…b85158
1.0.13On demandDownloadf1449986…5b2c82
1.0.14On demandDownload6860e438…b8b134
1.0.15On demandDownloada8244b36…8b6ea8
1.0.16On demandDownloada34e59ac…1e4922
1.0.17On demandDownload89493010…7cca38
1.1.0On demandDownload2f62d624…f160c7
1.1.1On demandDownload3f581ea7…5c5c1a
1.1.2On demandDownloaddfe42714…eb74a3
1.1.3On demandDownload5897a3bd…6745a9
1.2.0On demandDownloadcc401713…0cd597
1.2.1On demandDownload5cbc40bd…9ef857
1.3.0On demandDownloadf6c65206…ca5ceb
1.3.1On demandDownloade89fff8d…b78070
1.3.2On demandDownload8bcc17fa…d38174
1.3.3On demandDownloada51163a6…1fc864
1.4.0On demandDownload7c2f527f…9d1bc9
1.4.1On demandDownload4565f3b0…617473
1.4.2On demandDownload6b101f35…fd969d
1.4.3On demandDownloadef3ba75d…889d9e
1.4.4On demandDownloadb3a4f109…ad7a3b
1.4.5On demandDownloadfe4db21d…e4d516
1.4.6On demandDownload2b7715ad…c1cd91
1.4.6+hotfix.1On demandDownloadd663abfe…57b65e
1.4.7On demandDownloaddc97a87e…21e227
1.4.8On demandDownloadac7ef077…ca2e47
1.4.9On demandDownloadc664ad88…6a51f6
1.4.10On demandDownloade65506ed…7f3d86
1.5.0On demandDownload3b3ff59c…aa27c5
1.5.1On demandDownload03df5b41…7760cc
1.5.2On demandDownload8ef852a0…f326b7
1.5.2+hotfix.1On demandDownloadb34e90bc…bef694
1.5.3On demandDownload8565f1f1…9a0202
1.5.3+hotfix.1On demandDownloadc8c4d013…639a4a
1.5.3+hotfix.2On demandDownload5b76fd85…297116
1.5.3+hotfix.3On demandDownload77da1836…aa9ff7
1.5.3+hotfix.4On demandDownloada2ae542c…69e28c
1.5.3+hotfix.5On demandDownload3bfa069a…53d075
1.5.4On demandDownloada23c7d21…f5b541
1.6.0On demandDownload51bcda4b…4ef65f
1.7.0On demandDownload4ed7b9fa…625086
1.8.0On demandDownload63a3ed6b…e5d844
1.8.1On demandDownloadf6d615bd…d7edb2
1.8.2Cached · Upstream SHA-256 matchedDownload078e3c43…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"