Coder Social home page Coder Social logo

Comments (5)

wanchao-xu avatar wanchao-xu commented on June 6, 2024 1

I commit a patch to solve crash issue of empty IceCandidate. Please refer to #625
flutter-webrtc will use libwebrtc(https://github.com/webrtc-sdk/libwebrtc), and we use version 104 of libwebrtc on tizen platform.

from plugins.

xuelian-bai avatar xuelian-bai commented on June 6, 2024

@swift-kim is there better way to debug on release image?

from plugins.

swift-kim avatar swift-kim commented on June 6, 2024

@xuelian-bai I have no idea except for replacing dlog_print with printf in log.h (#619 (comment)).

from plugins.

wanchao-xu avatar wanchao-xu commented on June 6, 2024

I have updated libwebrtc with m114 version of webrtc sdk(https://github.com/webrtc-sdk/webrtc) on Tizen platform (#625).
I also tested the empty IceCandidate for 'addIceCandidate' api with debug libwebrtc. There is an error if candidate is empty

01-01 09:06:56.653+0900 I/ConsoleMessage(P10798, T10845): flutter: Received data: {"type":"candidate","data":{"to":"606143","from":"842756","candidate":{"sdpMLineIndex":0,"sdpMid":"0","candidate":""},"session_id":"842756-606143"}}
01-01 09:06:56.653+0900 I/TizenWebRTC(P10798, T10884): (webrtc_sdp.cc:424): Failed to parse: "". Reason: Expect line: candidate:<candidate-str>

webrtc sdk can't parse empty candidate.

I tested flutter_webrtc_demo with the empty candidate is ignored in flutter_webrtc plugin, he connection between peers is successfull.
The flutter_webrtc_demo can send empty candidate after below patch applied.

diff --git a/packages/flutter_webrtc/example/flutter_webrtc_demo/lib/src/call_sample/signaling.dart b/packages/flutter_webrtc/example/flutter_webrtc_demo/lib/src/call_sample/signaling.dart
index fc3fdb1..2227ec4 100644
--- a/packages/flutter_webrtc/example/flutter_webrtc_demo/lib/src/call_sample/signaling.dart
+++ b/packages/flutter_webrtc/example/flutter_webrtc_demo/lib/src/call_sample/signaling.dart
@@ -483,6 +483,24 @@ class Signaling {
               }));
     };

+    pc.onIceGatheringState = (state) async {
+      print("onIceGatheringState: " + state.toString());
+      if (state == RTCIceGatheringState.RTCIceGatheringStateComplete) {
+          await Future.delayed(
+                const Duration(seconds: 1),
+                () => _send('candidate', {
+                  'to': peerId,
+                  'from': _selfId,
+                  'candidate': {
+                    'sdpMLineIndex': 0,
+                    'sdpMid': '0',
+                    'candidate': '',
+                  },
+                  'session_id': sessionId,
+              }));
+      }
+    };
+
     pc.onIceConnectionState = (state) {};

The addIceCandidate method provides a remote candidate to the ICE Agent. This method can also be used to indicate the end of remote candidates when called with an empty string for the candidate member.

It maybe have no effect on peer connection even empty IceCandidate ignored.
Please refer to sample

If there is peer connection failed because of empty candidate, please share the test app to me.

from plugins.

xiaowei-guan avatar xiaowei-guan commented on June 6, 2024

@Vasques1995 We have fix IceCandidate issue, please apply latest flutter_webrtc_tizen version:

dependencies:
 flutter_webrtc: ^0.9.46
 flutter_webrtc_tizen: ^0.1.3

from plugins.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.