Skip to content

Commit 2ba5bbc

Browse files
committed
release: 1.5.2+hotfix.1.
1 parent 439c8ef commit 2ba5bbc

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
--------------------------------------------
44

5+
[1.5.2+hotfix.1] - 2025-02-23.
6+
7+
* remove platform_detect.
8+
59
[1.5.2] - 2025-02-23.
610

711
* fix stats for web.

lib/src/rtc_peerconnection_impl.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'dart:js_interop';
44
import 'dart:js_interop_unsafe';
55

66
import 'package:dart_webrtc/dart_webrtc.dart';
7-
import 'package:platform_detect/platform_detect.dart';
87
import 'package:web/web.dart' as web;
98

109
import 'media_stream_track_impl.dart';
@@ -44,7 +43,7 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
4443
iceConnectionStateForString(_jsPc.iceConnectionState);
4544
onIceConnectionState?.call(_iceConnectionState!);
4645

47-
if (browser.isFirefox) {
46+
if (web.Device.isFirefox) {
4847
switch (_iceConnectionState!) {
4948
case RTCIceConnectionState.RTCIceConnectionStateNew:
5049
_connectionState = RTCPeerConnectionState.RTCPeerConnectionStateNew;
@@ -93,7 +92,7 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
9392

9493
_jsPc.addEventListener('signalingstatechange', onSignalingStateChange.toJS);
9594

96-
if (!browser.isFirefox) {
95+
if (!web.Device.isFirefox) {
9796
final void Function(JSAny) onConnectionStateChange = (_) {
9897
_connectionState = peerConnectionStateForString(_jsPc.connectionState);
9998
onConnectionState?.call(_connectionState!);
@@ -159,7 +158,7 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
159158
@override
160159
Future<RTCIceConnectionState?> getIceConnectionState() async {
161160
_iceConnectionState = iceConnectionStateForString(_jsPc.iceConnectionState);
162-
if (browser.isFirefox) {
161+
if (web.Device.isFirefox) {
163162
switch (_iceConnectionState!) {
164163
case RTCIceConnectionState.RTCIceConnectionStateNew:
165164
_connectionState = RTCPeerConnectionState.RTCPeerConnectionStateNew;
@@ -196,7 +195,8 @@ class RTCPeerConnectionWeb extends RTCPeerConnection {
196195

197196
@override
198197
Future<RTCPeerConnectionState?> getConnectionState() async {
199-
if (browser.isFirefox) {
198+
/// platform is Firefox
199+
if (web.Device.isFirefox) {
200200
await getIceConnectionState();
201201
} else {
202202
_connectionState = peerConnectionStateForString(_jsPc.connectionState);

pubspec.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: dart_webrtc
22
description: Use the dart/js library to re-wrap the webrtc js interface of the browser, to adapted common browsers.
3-
version: 1.5.2
3+
version: 1.5.2+hotfix.1
44
homepage: https://github.com/flutter-webrtc/dart-webrtc
55

66
environment:
@@ -11,7 +11,6 @@ dependencies:
1111
js: ">0.6.0 <0.8.0"
1212
logging: ^1.1.0
1313
meta: ^1.8.0
14-
platform_detect: ^2.1.5
1514
synchronized: ^3.0.0+3
1615
web: ^1.0.0
1716
webrtc_interface: ^1.2.1

0 commit comments

Comments
 (0)