diff --git a/lib/src/support/websocket/io.dart b/lib/src/support/websocket/io.dart index be65c1d86..99d711702 100644 --- a/lib/src/support/websocket/io.dart +++ b/lib/src/support/websocket/io.dart @@ -31,10 +31,7 @@ class LiveKitWebSocketIO extends LiveKitWebSocket { final WebSocketEventHandlers? options; late final StreamSubscription _subscription; - LiveKitWebSocketIO._( - this._ws, [ - this.options, - ]) { + LiveKitWebSocketIO._(this._ws, [this.options]) { _subscription = _ws.listen( (dynamic data) { if (isDisposed) { @@ -75,9 +72,13 @@ class LiveKitWebSocketIO extends LiveKitWebSocket { WebSocketEventHandlers? options, Map? headers, }) async { - logger.fine('[WebSocketIO] Connecting(uri: ${uri.toString()})...'); + final connectUri = uri.hasPort ? uri : uri.replace(port: uri.isScheme('wss') ? 443 : 80); + logger.fine('[WebSocketIO] Connecting(uri: ${connectUri.toString()})...'); try { - final ws = await io.WebSocket.connect(uri.toString(), headers: headers); + final ws = await io.WebSocket.connect( + connectUri.toString(), + headers: headers, + ); logger.fine('[WebSocketIO] Connected'); return LiveKitWebSocketIO._(ws, options); } catch (err) { diff --git a/pubspec.lock b/pubspec.lock index de5490229..e297459cd 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" checked_yaml: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: "direct main" description: name: dart_webrtc - sha256: "4ed7b9fa9924e5a81eb39271e2c2356739dd1039d60a13b86ba6c5f448625086" + sha256: "63a3ed6b958b5ba32d95ddba484c0dcf1cad4fd55eb551bb23c815b6f1e5d844" url: "https://pub.dev" source: hosted - version: "1.7.0" + version: "1.8.0" dbus: dependency: transitive description: @@ -300,10 +300,10 @@ packages: dependency: "direct main" description: name: flutter_webrtc - sha256: "0f86b518e9349e71a136a96e0ea11294cad8a8531b2bc9ae99e69df332ac898a" + sha256: "8b220dc006c4891266735e516f7679bd08b7caaf7c36b1a93fb9357cec555f92" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" frontend_server_client: dependency: transitive description: @@ -452,18 +452,18 @@ packages: dependency: transitive description: name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861 url: "https://pub.dev" source: hosted - version: "0.12.17" + version: "0.12.19" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.13.0" meta: dependency: "direct main" description: @@ -753,10 +753,10 @@ packages: dependency: transitive description: name: test_api - sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55 + sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a" url: "https://pub.dev" source: hosted - version: "0.7.7" + version: "0.7.10" timing: dependency: transitive description: @@ -841,10 +841,10 @@ packages: dependency: transitive description: name: webrtc_interface - sha256: ad0e5786b2acd3be72a3219ef1dde9e1cac071cf4604c685f11b61d63cdd6eb3 + sha256: c6f100eac5057d9a817a60473126f9828c796d42884d498af4f339c97b21014f url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.5.1" win32: dependency: transitive description: