Giter VIP home page Giter VIP logo

flutter-webrtc-demo's Introduction

flutter-webrtc-demo

slack

Flutter WebRTC plugin Demo

Online Demo: https://flutter-webrtc.github.io/flutter-webrtc-demo/

Usage

  • git clone https://github.com/cloudwebrtc/flutter-webrtc-demo
  • cd flutter-webrtc-demo
  • flutter packages get
  • flutter run

Note

  • If you want to test P2P Call Sample, please use the webrtc-flutter-server, and enter your server address into the example app.

screenshots

iOS

Android

flutter-webrtc-demo's People

Contributors

carlogrisetti avatar cloudwebrtc avatar colleserre avatar coreycole avatar ham3d avatar jeesang7 avatar jhswedeveloper avatar kangshaojun avatar linusu avatar lumec avatar mayursmahajan avatar milochen0418 avatar mitchross avatar renovate-bot avatar vasopikof avatar xiaowei-guan avatar ycherniavskyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-webrtc-demo's Issues

loopback_sample.dart Error: Too few positional arguments

My flutter environment is working properly. This is a compilation error I got.

Initializing gradle...1.9s
Resolving dependencies...3.6s

Compiler message:
lib/src/basic_sample/loopback_sample.dart:46:65: Error: Too few positional arguments: 1 required, 0 given.
List reports = await _peerConnection.getStats();
^
Compiler failed on ~workdir/flutter-webrtc-demo/lib/main.dart

Can not see the other side video

When run the flutter-webrtc-server h5 demo on pc chrome browser, result is that:

  1. Can see the other side video when not using relay mode.
  2. Can not see the other side video when using relay mode.

When run the flutter-webrtc-server h5 demo on pc chrome browser and run the flutter-webrtc-demo on Android , result is that:

Can not see the other side video on Android whether or not using relay mode.

My Android phone is XiaoMi 5X.

OpenVidu Flutter problem

Hello, I took this flutter-webrtc-demo app and tried to connect it to OpenVidu webrtc server because I need to have multiple users to be able to participate in the same call. I used https://github.com/OpenVidu/openvidu-android-app which works with OpenVidu server v1.5.0 (the latest is v2.7.0, and we set up our own instance with v1.5.0 at openvidu.hot-soup.com) and refactored Signaling class to work as this Android app works.

The problem is when I connect my Flutter app with Android app, the stream from Android app is visible on Flutter app but the stream from Flutter app is not visible on Android app and I can't find out why. I examined the logs from both apps and it seems to me that signaling with the server through websocket connection works in the same way, but something is wrong because stream from Flutter app is not visible on the other side.

Here is the link of Android app that is connected to openvidu.hot-soup.com: https://drive.google.com/open?id=1ln8rHhgUq8PEanoxT7ciYNHkcAZfeIjt

And here is the link of Flutter app connected to the same server: https://drive.google.com/open?id=1cXfNCG7UAvDZ0gN0FmmPpSpORZJo5f9x

Can you maybe take a look or do you have any idea why this doesn't work and the example connected to demo.cloudwebrtc.com server works great?

Unhandled Exception: NoSuchMethodError

i download the server from here and starts it successfully but when i run application and click on P2P call sample then following exception occuring:

E/flutter ( 1602): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'closeCode' was called on null.
E/flutter ( 1602): Receiver: null
E/flutter ( 1602): Tried calling: closeCode
E/flutter ( 1602): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
E/flutter ( 1602): #1      SimpleWebSocket.connect (package:flutter_webrtc_demo/src/utils/websocket.dart:29:28)
E/flutter ( 1602): <asynchronous suspension>
E/flutter ( 1602): #2      Signaling.connect (package:flutter_webrtc_demo/src/call_sample/signaling.dart:292:19)
E/flutter ( 1602): #3      _CallSampleState._connect (package:flutter_webrtc_demo/src/call_sample/call_sample.dart:50:45)
E/flutter ( 1602): #4      _CallSampleState.initState (package:flutter_webrtc_demo/src/call_sample/call_sample.dart:32:5)
E/flutter ( 1602): #5      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
E/flutter ( 1602): #6      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)

i also change the following line in main.dart file:

//_serverAddress = keyValueStore.getString('server') ?? 'demo.cloudwebrtc.com';
      _serverAddress = keyValueStore.getString('server') ?? '192.168.x.xxx:8086';

Group Chat

How to create multiple connections with peers?

Full screen video

First of all, thanks for this brave initiative.

Secondly, is it possible to make the video on mobile full screen?

Thanks

P2P Call Sample

I run this demo in two Android devices (Name : device-A , device-B).

I can get device-B`s info ( room id ) in device-A....

but I cant get and video data between A & B ......

how can fix this problem?

P2P Call Sample not working on LTE mobile data

I'm running the demo app on two Samsung phones (S8 and S9). The P2P Call sample works great when both phones are on Wifi on the same local network, but when I switch one of them to the LTE mobile network, the devices never connect. Neither audio nor video is coming through either device. On each phone I can only see the top left, front camera video, the big section meant for the other phone's front camera is just the gray widget background color.

The signaling seems to be working fine. When I hang up one device, the other disconnects automatically.

In my branch I add some print statements and statistics collecting on the ssrc/jitter values in the P2P example. When this issue's bug occurs, I get audio stats values of 0:

{totalAudioEnergy: 0, googCodecName: , transportId: Channel-audio-1, googDecodingCTSG: 0, googAccelerateRate: 0, googCaptureStartNtpTimeMs: 0, googSpeechExpandRate: 0, packetsLost: 0, googTrackId: 5f4a4611-a3a2-47b5-96fd-357b843e2fc5, googJitterBufferMs: 0, googPreemptiveExpandRate: 0, googPreferredJitterBufferMs: 0, ssrc: 2551058670, googSecondaryDecodedRate: 0, googExpandRate: 0, mediaType: audio, totalSamplesDuration: 0, googDecodingPLCCNG: 0, googSecondaryDiscardedRate: 0, bytesReceived: 0, googDecodingPLC: 0, packetsReceived: 0, googDecodingCTN: 0, googDecodingCNG: 0, googDecodingNormal: 0, googCurrentDelayMs: 0, googJitterReceived: 0, googDecodingMuted: 0}

When I run both devices on Wifi, these stats from the P2P call seem appropriate.

I've checked out the latest master without my stats changes and here are those logs from attempting to connect two devices (one on Wifi and one on LTE) below:

I/flutter ( 5702): onOpen
I/flutter ( 5702): send: {"name":"localhost(android)","id":"136345","user_agent":"flutter-webrtc/android-plugin 0.0.1","type":"new"}
I/flutter ( 5702): Recivied data: {"type":"peers","data":[{"id":"136345","name":"localhost(android)","user_agent":"flutter-webrtc/android-plugin 0.0.1"}]}
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/flutter (18467): onOpen
I/flutter (18467): send: {"name":"localhost(android)","id":"855855","user_agent":"flutter-webrtc/android-plugin 0.0.1","type":"new"}
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4010 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4010 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/flutter (18467): Recivied data: {"type":"peers","data":[{"id":"136345","name":"localhost(android)","user_agent":"flutter-webrtc/android-plugin 0.0.1"},{"id":"855855","name":"localhost(android)","user_agent":"flutter-webrtc/android-plugin 0.0.1"}]}
I/flutter ( 5702): Recivied data: {"type":"peers","data":[{"id":"136345","name":"localhost(android)","user_agent":"flutter-webrtc/android-plugin 0.0.1"},{"id":"855855","name":"localhost(android)","user_agent":"flutter-webrtc/android-plugin 0.0.1"}]}
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4013 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4020 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4017 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
D/ViewRootImpl@98c5248[MainActivity](18467): ViewPostIme pointer 0
D/ViewRootImpl@98c5248[MainActivity](18467): ViewPostIme pointer 1
I/FlutterWebRTCPlugin(18467): getUserMedia(audio): mandatory: [], optional: [googNoiseSuppression: true, googEchoCancellation: true, echoCancellation: true, googEchoCancellation2: true, googDAEchoCancellation: true]
I/FlutterWebRTCPlugin(18467): getUserMedia(video): com.cloudwebrtc.webrtc.utils.ConstraintsMap@5a8ddb7
I/CameraManagerGlobal(18467): Connecting to camera service
D/VendorTagDescriptor(18467): addVendorDescriptor: vendor tag id 3854507339 added
D/FlutterWebRTCPlugin(18467): Creating video capturer using Camera2 API.
D/FlutterWebRTCPlugin(18467): Create front camera 1 succeeded
I/org.webrtc.Logging(18467): EglBase14Impl: Using OpenGL ES version 2
I/org.webrtc.Logging(18467): CameraCapturer: startCapture: 640x480@30
D/FlutterWebRTCPlugin(18467): changeCaptureFormat: 640x480@30
I/org.webrtc.Logging(18467): Camera2Session: Create new camera2 session on camera 1
I/org.webrtc.Logging(18467): Camera2Session: start
D/FlutterWebRTCPlugin(18467): MediaStream id: 93a3ea29-1cfc-4991-a979-1a0b63ebfb07
I/org.webrtc.Logging(18467): EglRenderer: Releasing.
I/org.webrtc.Logging(18467): EglRenderer: eglBase detach and release.
I/org.webrtc.Logging(18467): EglRenderer: Quitting render thread.
I/org.webrtc.Logging(18467): EglRenderer: Releasing done.
I/org.webrtc.Logging(18467): EglRenderer: Initializing EglRenderer
I/org.webrtc.Logging(18467): EglRenderer: EglBase.create shared context
I/org.webrtc.Logging(18467): EglBase14Impl: Using OpenGL ES version 2
I/org.webrtc.Logging(18467): Camera2Session: Available preview sizes: [2560x1920, 2048x1536, 2048x1152, 1920x1080, 1280x960, 1280x720, 800x600, 720x480, 640x480, 640x360, 512x288, 432x288, 384x384, 352x288, 320x240, 256x154, 176x144, 2640x1288, 2640x1980, 2640x1488, 1968x1968, 1920x932]
I/org.webrtc.Logging(18467): Camera2Session: Available fps ranges: [[15.0:15.0], [24.0:24.0], [7.0:30.0], [15.0:30.0], [30.0:30.0]]
I/org.webrtc.Logging(18467): Camera2Session: Using capture format: 640x480@[7.0:30.0]
I/org.webrtc.Logging(18467): Camera2Session: Opening camera 1
D/FlutterWebRTCPlugin(18467): CameraEventsHandler.onCameraOpening: cameraName=1
I/org.webrtc.Logging(18467): Camera2Session: Camera opened.
D/FlutterWebRTCPlugin(18467): addStreamcom.cloudwebrtc.webrtc.utils.AnyThreadResult@ebf0c8e
D/FlutterWebRTCPlugin(18467): peerConnectionSetLocalDescription() start
I/flutter (18467): send: {"to":"136345","description":{"sdp":"v=0\r\no=- 5088572689760621605 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS 93a3ea29-1cfc-4991-a979-1a0b63ebfb07\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:zaRf\r\na=ice-pwd:kkv9AYNdTd/IIiU3U/uMKpFw\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 34:A9:E1:7B:77:4C:A3:F7:71:80:C6:E3:F7:2F:2C:66:BD:30:ED:0E:E8:42:25:85:F7:B3:B8:EB:53:32:F8:8B\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/
I/org.webrtc.Logging(18467): WebRtcAudioRecordExternal: enableBuiltInAEC(false)
I/org.webrtc.Logging(18467): WebRtcAudioEffectsExternal: setAEC(false)
I/org.webrtc.Logging(18467): WebRtcAudioRecordExternal: enableBuiltInNS(true)
I/org.webrtc.Logging(18467): WebRtcAudioEffectsExternal: setNS(true)
I/org.webrtc.Logging(18467): NetworkMonitor: Start monitoring with native observer 497628474496
D/ConnectivityManager(18467): sendRequestForNetwork CallingUid : 10302, CallingPid : 18467
D/ConnectivityManager(18467): requestNetwork; CallingUid : 10302, CallingPid : 18467
D/ConnectivityManager(18467): requestNetwork; CallingUid : 10302, CallingPid : 18467
W/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: Null interface name for network 601
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: Network becomes available: 603
D/FlutterWebRTCPlugin(18467): peerConnectionSetLocalDescription() end
D/FlutterWebRTCPlugin(18467): onIceGatheringChangeGATHERING
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -64 SSID: "Juno2"]
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: link properties changed: {InterfaceName: wlan0 LinkAddresses: [fe80::477d:e1a:c1ea:c0c8/64,192.168.1.13/24,]  Routes: [fe80::/64 -> :: wlan0,192.168.1.0/24 -> 0.0.0.0 wlan0,0.0.0.0/0 -> 192.168.1.1 wlan0,] DnsAddresses: [192.168.1.1,] UsePrivateDns: false PrivateDnsServerName: null Domains: null MTU: 0 TcpBufferSizes: 524288,1048576,4194304,524288,1048576,4194304}
D/FlutterWebRTCPlugin(18467): onIceCandidate
D/FlutterWebRTCPlugin(18467): onIceCandidate
D/FlutterWebRTCPlugin(18467): onIceCandidate
D/FlutterWebRTCPlugin(18467): onIceCandidate
I/chatty  (18467): uid=10302(com.cloudwebrtc.flutterwebrtcdemo) signaling_threa identical 1 line
D/FlutterWebRTCPlugin(18467): onIceCandidate
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:3787395334 1 udp 2122260223 192.168.1.13 41393 typ host generation 0 ufrag zaRf network-id 3 network-cost 10"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:559267639 1 udp 2122202367 ::1 37194 typ host generation 0 ufrag zaRf network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 58821 typ host generation 0 ufrag zaRf network-id 1"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:3787395334 1 udp 2122260223 192.168.1.13 40090 typ host generation 0 ufrag zaRf network-id 3 network-cost 10"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:559267639 1 udp 2122202367 ::1 54265 typ host generation 0 ufrag zaRf network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 56841 typ host generation 0 ufrag zaRf network-id 1"},"session_id":"855855-136345","type":"candidate"}
D/FlutterWebRTCPlugin(18467): onIceCandidate
D/FlutterWebRTCPlugin(18467): onIceCandidate
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:842163049 1 udp 1686052607 73.169.182.142 41393 typ srflx raddr 192.168.1.13 rport 41393 generation 0 ufrag zaRf network-id 3 network-cost 10"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:842163049 1 udp 1686052607 73.169.182.142 40090 typ srflx raddr 192.168.1.13 rport 40090 generation 0 ufrag zaRf network-id 3 network-cost 10"},"session_id":"855855-136345","type":"candidate"}
D/FlutterWebRTCPlugin(18467): onIceCandidate
I/chatty  (18467): uid=10302(com.cloudwebrtc.flutterwebrtcdemo) signaling_threa identical 2 lines
D/FlutterWebRTCPlugin(18467): onIceCandidate
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1876313031 1 tcp 1518222591 ::1 40427 typ host tcptype passive generation 0 ufrag zaRf network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 43923 typ host tcptype passive generation 0 ufrag zaRf network-id 1"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:1876313031 1 tcp 1518222591 ::1 55111 typ host tcptype passive generation 0 ufrag zaRf network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter (18467): send: {"to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 56015 typ host tcptype passive generation 0 ufrag zaRf network-id 1"},"session_id":"855855-136345","type":"candidate"}
I/org.webrtc.Logging(18467): Camera2Session: Camera capture session configured.
I/org.webrtc.Logging(18467): Camera2Session: Stabilization not available.
I/org.webrtc.Logging(18467): Camera2Session: Using continuous video auto-focus.
I/org.webrtc.Logging(18467): Camera2Session: Camera device successfully started.
I/org.webrtc.Logging(18467): CameraCapturer: Create session done. Switch state: IDLE
I/org.webrtc.Logging(18467): SurfaceTextureHelper: Setting listener to org.webrtc.Camera2Session$CaptureSessionCallback$$Lambda$0@fe0c243
D/FlutterWebRTCPlugin(18467): CameraEventsHandler.onFirstFrameAvailable
I/flutter ( 5702): Recivied data: {"type":"offer","data":{"to":"136345","from":"855855","media":"video","session_id":"855855-136345","description":{"sdp":"v=0\r\no=- 5088572689760621605 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS 93a3ea29-1cfc-4991-a979-1a0b63ebfb07\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:zaRf\r\na=ice-pwd:kkv9AYNdTd/IIiU3U/uMKpFw\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 34:A9:E1:7B:77:4C:A3:F7:71:80:C6:E3:F7:2F:2C:66:BD:30:ED:0E:E8:42:25:85:F7:B3:B8:EB:53:32:F8:8B\r\na=setup:actpass\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\
I/FlutterWebRTCPlugin( 5702): getUserMedia(audio): mandatory: [], optional: [googNoiseSuppression: true, googEchoCancellation: true, echoCancellation: true, googEchoCancellation2: true, googDAEchoCancellation: true]
I/FlutterWebRTCPlugin( 5702): getUserMedia(video): com.cloudwebrtc.webrtc.utils.ConstraintsMap@e0136d6
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:3787395334 1 udp 2122260223 192.168.1.13 41393 typ host generation 0 ufrag zaRf network-id 3 network-cost 10"}}}
I/CameraManagerGlobal( 5702): Connecting to camera service
D/VendorTagDescriptor( 5702): addVendorDescriptor: vendor tag id 3854507339 added
D/FlutterWebRTCPlugin( 5702): Creating video capturer using Camera2 API.
D/FlutterWebRTCPlugin( 5702): Create front camera 1 succeeded
I/org.webrtc.Logging( 5702): EglBase14Impl: Using OpenGL ES version 2
I/org.webrtc.Logging( 5702): CameraCapturer: startCapture: 640x480@30
D/FlutterWebRTCPlugin( 5702): changeCaptureFormat: 640x480@30
D/FlutterWebRTCPlugin( 5702): MediaStream id: f9ed814f-5756-4073-b46e-0515c7830d4b
I/org.webrtc.Logging( 5702): EglRenderer: Releasing.
I/org.webrtc.Logging( 5702): EglRenderer: eglBase detach and release.
I/org.webrtc.Logging( 5702): EglRenderer: Releasing done.
I/org.webrtc.Logging( 5702): EglRenderer: Initializing EglRenderer
I/org.webrtc.Logging( 5702): EglRenderer: Quitting render thread.
I/org.webrtc.Logging( 5702): EglRenderer: EglBase.create shared context
I/org.webrtc.Logging( 5702): Camera2Session: Create new camera2 session on camera 1
I/org.webrtc.Logging( 5702): Camera2Session: start
I/org.webrtc.Logging( 5702): EglBase14Impl: Using OpenGL ES version 2
D/FlutterWebRTCPlugin( 5702): addStreamcom.cloudwebrtc.webrtc.utils.AnyThreadResult@9f6d7f3
I/org.webrtc.Logging( 5702): Camera2Session: Available preview sizes: [3264x2448, 3264x1836, 2880x2160, 2560x1920, 2560x1440, 2560x1080, 2448x2448, 2160x2160, 2048x1152, 1920x1080, 1440x1080, 1280x960, 1280x720, 720x480, 640x480, 320x240, 176x144]
D/FlutterWebRTCPlugin( 5702): peerConnectionSetRemoteDescription() start
I/org.webrtc.Logging( 5702): Camera2Session: Available fps ranges: [[15.0:15.0], [20.0:20.0], [24.0:24.0], [7.0:30.0], [30.0:30.0]]
I/org.webrtc.Logging( 5702): Camera2Session: Using capture format: 640x480@[7.0:30.0]
I/org.webrtc.Logging( 5702): Camera2Session: Opening camera 1
D/FlutterWebRTCPlugin( 5702): CameraEventsHandler.onCameraOpening: cameraName=1
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp8 type: VP8 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp9 type: VP9 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.avc type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.google.h264.decoder type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
D/FlutterWebRTCPlugin( 5702): onAddTrack
D/FlutterWebRTCPlugin( 5702): onAddTrack
D/FlutterWebRTCPlugin( 5702): peerConnectionSetRemoteDescription() end
I/org.webrtc.Logging( 5702): Camera2Session: Camera opened.
I/org.webrtc.Logging( 5702): Camera2Session: Camera capture session configured.
I/org.webrtc.Logging( 5702): Camera2Session: Stabilization not available.
I/org.webrtc.Logging( 5702): Camera2Session: Using continuous video auto-focus.
I/org.webrtc.Logging( 5702): Camera2Session: Camera device successfully started.
I/org.webrtc.Logging( 5702): CameraCapturer: Create session done. Switch state: IDLE
I/org.webrtc.Logging( 5702): SurfaceTextureHelper: Setting listener to org.webrtc.Camera2Session$CaptureSessionCallback$$Lambda$0@ed263ba
I/org.webrtc.Logging( 5702): EglRenderer: Releasing.
I/org.webrtc.Logging( 5702): EglRenderer: eglBase detach and release.
I/org.webrtc.Logging( 5702): EglRenderer: Releasing done.
I/org.webrtc.Logging( 5702): EglRenderer: Quitting render thread.
I/org.webrtc.Logging( 5702): EglRenderer: Initializing EglRenderer
I/org.webrtc.Logging( 5702): EglRenderer: EglBase.create shared context
I/org.webrtc.Logging( 5702): EglBase14Impl: Using OpenGL ES version 2
D/FlutterWebRTCPlugin( 5702): peerConnectionSetLocalDescription() start
I/flutter ( 5702): send: {"to":"855855","description":{"sdp":"v=0\r\no=- 6351825914022332024 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS f9ed814f-5756-4073-b46e-0515c7830d4b\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:tWtZ\r\na=ice-pwd:/iuD+w4SwJha+wjaa8HNGpKz\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 BF:46:F7:4F:31:2F:52:8D:0C:6F:2F:80:1E:58:F1:3B:90:0F:11:5D:91:02:08:94:08:5A:76:2B:7B:1A:46:4F\r\na=setup:active\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/3
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: initPlayout(sampleRate=48000, channels=1)
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: byteBuffer.capacity: 960
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:559267639 1 udp 2122202367 ::1 37194 typ host generation 0 ufrag zaRf network-id 2"}}}
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrack.getMinBufferSize: 7696
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: createAudioTrackOnLollipopOrHigher
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: nativeOutputSampleRate: 48000
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 58821 typ host generation 0 ufrag zaRf network-id 1"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:3787395334 1 udp 2122260223 192.168.1.13 40090 typ host generation 0 ufrag zaRf network-id 3 network-cost 10"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:559267639 1 udp 2122202367 ::1 54265 typ host generation 0 ufrag zaRf network-id 2"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:1510613869 1 udp 2122129151 127.0.0.1 56841 typ host generation 0 ufrag zaRf network-id 1"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:842163049 1 udp 1686052607 73.169.182.142 41393 typ srflx raddr 192.168.1.13 rport 41393 generation 0 ufrag zaRf network-id 3 network-cost 10"}}}
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrack: session ID: 385, channels: 1, sample rate: 48000, max gain: 1.0
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrack: buffer size in frames: 3848
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrack: buffer capacity in frames: 3848
I/org.webrtc.Logging( 5702): VolumeLogger: start@[name=worker_thread - 5880, id=2641]
I/org.webrtc.Logging( 5702): VolumeLogger: audio mode is: MODE_NORMAL
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:842163049 1 udp 1686052607 73.169.182.142 40090 typ srflx raddr 192.168.1.13 rport 40090 generation 0 ufrag zaRf network-id 3 network-cost 10"}}}
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: startPlayout
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1876313031 1 tcp 1518222591 ::1 40427 typ host tcptype passive generation 0 ufrag zaRf network-id 2"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 43923 typ host tcptype passive generation 0 ufrag zaRf network-id 1"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:1876313031 1 tcp 1518222591 ::1 55111 typ host tcptype passive generation 0 ufrag zaRf network-id 2"}}}
I/flutter ( 5702): Recivied data: {"type":"candidate","data":{"from":"855855","to":"136345","candidate":{"sdpMLineIndex":1,"sdpMid":"video","candidate":"candidate:344579997 1 tcp 1518149375 127.0.0.1 56015 typ host tcptype passive generation 0 ufrag zaRf network-id 1"}}}
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrackThread@[name=AudioTrackJavaThread, id=2655]
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp8 type: VP8 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp9 type: VP9 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.avc type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.google.h264.decoder type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp8 type: VP8 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp9 type: VP9 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.avc type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): AndroidVideoDecoder: ctor name: OMX.google.h264.decoder type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@ac84aae
I/org.webrtc.Logging( 5702): WebRtcAudioRecordExternal: enableBuiltInAEC(false)
I/org.webrtc.Logging( 5702): WebRtcAudioEffectsExternal: setAEC(false)
I/org.webrtc.Logging( 5702): WebRtcAudioRecordExternal: enableBuiltInNS(true)
I/org.webrtc.Logging( 5702): WebRtcAudioEffectsExternal: setNS(true)
I/org.webrtc.Logging( 5702): NetworkMonitor: Start monitoring with native observer 517290775616
D/ConnectivityManager( 5702): sendRequestForNetwork CallingUid : 10403, CallingPid : 5702
D/ConnectivityManager( 5702): requestNetwork; CallingUid : 10403, CallingPid : 5702
D/ConnectivityManager( 5702): requestNetwork; CallingUid : 10403, CallingPid : 5702
I/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: Network becomes available: 624
W/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: Null interface name for network 601
D/FlutterWebRTCPlugin( 5702): peerConnectionSetLocalDescription() end
D/FlutterWebRTCPlugin( 5702): onIceGatheringChangeGATHERING
I/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: capabilities changed: [ Transports: CELLULAR Capabilities: MMS&SUPL&XCAP&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=51200Kbps LinkDnBandwidth>=102400Kbps Specifier: <1>]
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
I/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: link properties changed: {InterfaceName: rmnet_data0 LinkAddresses: [2607:fb90:b2e9:21c0:d184:2bb8:1eed:f71/64,]  Routes: [::/0 -> fe80::648e:370d:ba24:8bf9 rmnet_data0,2607:fb90:b2e9:21c0::/64 -> :: rmnet_data0,] DnsAddresses: [fd00:976a::9,fd00:976a::10,] UsePrivateDns: false PrivateDnsServerName: null PcscfAddresses: [fd00:976a:c206:20::7,fd00:976a:c202:1d::9,fd00:976a:c202:1d::10,] Domains: null MTU: 1440 TcpBufferSizes: 2097152,4194304,8388608,262144,524288,1048576 Stacked: [ [{InterfaceName: v4-rmnet_data0 LinkAddresses: [192.0.0.4/32,]  Routes: [0.0.0.0/0 -> 192.0.0.4 v4-rmnet_data0,] DnsAddresses: [] UsePrivateDns: false PrivateDnsServerName: null Domains: null MTU: 0} ],] }
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): onIceCandidate
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): onIceCandidate
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): onIceCandidate
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin( 5702): peerConnectionAddICECandidate() end
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1908940333 1 udp 2122262783 2607:fb90:b2e9:21c0:d184:2bb8:1eed:f71 45392 typ host generation 0 ufrag tWtZ network-id 3 network-cost 900"},"session_id":"855855-136345","type":"candidate"}
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:559267639 1 udp 2122071295 ::1 48661 typ host generation 0 ufrag tWtZ network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1510613869 1 udp 2121998079 127.0.0.1 51201 typ host generation 0 ufrag tWtZ network-id 1"},"session_id":"855855-136345","type":"candidate"}
D/FlutterWebRTCPlugin( 5702): onIceCandidate
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -63]
I/chatty  ( 5702): uid=10403(com.cloudwebrtc.flutterwebrtcdemo) signaling_threa identical 2 lines
D/FlutterWebRTCPlugin( 5702): onIceCandidate
D/FlutterWebRTCPlugin( 5702): CameraEventsHandler.onFirstFrameAvailable
I/org.webrtc.Logging( 5702): HardwareVideoEncoder: initEncode: 640 x 480. @ 300kbps. Fps: 60 Use surface mode: true
I/ACodec  ( 5702):  [] Now uninitialized
I/ACodec  ( 5702): [] onAllocateComponent
I/OMXClient( 5702): IOmx service obtained
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:2653102537 1 tcp 1518217471 2607:fc20:b2d1:d0fd:0:e:60f7:ea01 9 typ host tcptype active generation 0 ufrag tWtZ network-id 4 network-cost 900"},"session_id":"855855-136345","type":"candidate"}
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:3865011119 1 tcp 1518149375 192.0.0.4 9 typ host tcptype active generation 0 ufrag tWtZ network-id 5 network-cost 900"},"session_id":"855855-136345","type":"candidate"}
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1876313031 1 tcp 1518091519 ::1 57636 typ host tcptype passive generation 0 ufrag tWtZ network-id 2"},"session_id":"855855-136345","type":"candidate"}
I/flutter ( 5702): send: {"to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:344579997 1 tcp 1518018303 127.0.0.1 41917 typ host tcptype passive generation 0 ufrag tWtZ network-id 1"},"session_id":"855855-136345","type":"candidate"}
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Loaded
I/org.webrtc.Logging( 5702): HardwareVideoEncoder: Format: {color-format=2130708361, i-frame-interval=100, mime=video/x-vnd.on2.vp8, width=640, bitrate-mode=2, bitrate=300000, frame-rate=60, height=480}
W/OMXUtils( 5702): do not know color format 0x7fa30c06 = 2141391878
W/OMXUtils( 5702): do not know color format 0x7fa30c04 = 2141391876
W/OMXUtils( 5702): do not know color format 0x7fa30c08 = 2141391880
W/OMXUtils( 5702): do not know color format 0x7fa30c07 = 2141391879
W/OMXUtils( 5702): do not know color format 0x7f000789 = 2130708361
I/ACodec  ( 5702): app-name : com.cloudwebrtc.flutterwebrtcdemo
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] cannot encode HDR static metadata. Ignoring.
I/ACodec  ( 5702): setupVideoEncoder succeeded
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] configure, AMessage : AMessage(what = 'conf', target = 1) = {
I/ACodec  ( 5702):   int32_t color-format = 2130708361
I/ACodec  ( 5702):   int32_t i-frame-interval = 100
I/ACodec  ( 5702):   string mime = "video/x-vnd.on2.vp8"
I/ACodec  ( 5702):   int32_t width = 640
I/ACodec  ( 5702):   int32_t bitrate-mode = 2
I/ACodec  ( 5702):   int32_t bitrate = 300000
I/ACodec  ( 5702):   int32_t frame-rate = 60
I/ACodec  ( 5702):   int32_t height = 480
I/ACodec  ( 5702):   int32_t encoder = 1
I/ACodec  ( 5702): }
W/OMXUtils( 5702): do not know color format 0x7f000789 = 2130708361
I/org.webrtc.Logging( 5702): EglBase14Impl: Using OpenGL ES version 2
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Loaded->Idle
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Idle->Executing
I/MediaCodec( 5702): setCodecState state : 0
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Executing
I/flutter (18467): Recivied data: {"type":"answer","data":{"from":"136345","to":"855855","description":{"sdp":"v=0\r\no=- 6351825914022332024 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE audio video\r\na=msid-semantic: WMS f9ed814f-5756-4073-b46e-0515c7830d4b\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 102 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:tWtZ\r\na=ice-pwd:/iuD+w4SwJha+wjaa8HNGpKz\r\na=ice-options:trickle renomination\r\na=fingerprint:sha-256 BF:46:F7:4F:31:2F:52:8D:0C:6F:2F:80:1E:58:F1:3B:90:0F:11:5D:91:02:08:94:08:5A:76:2B:7B:1A:46:4F\r\na=setup:active\r\na=mid:audio\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendrecv\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:102 ILBC/8000\r\na=rtpmap:0 PCMU/
D/FlutterWebRTCPlugin(18467): peerConnectionSetRemoteDescription() start
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1908940333 1 udp 2122262783 2607:fb90:b2e9:21c0:d184:2bb8:1eed:f71 45392 typ host generation 0 ufrag tWtZ network-id 3 network-cost 900"}}}
I/org.webrtc.Logging(18467): WebRtcAudioRecordExternal: enableBuiltInAEC(false)
I/org.webrtc.Logging(18467): WebRtcAudioEffectsExternal: setAEC(false)
I/org.webrtc.Logging(18467): WebRtcAudioRecordExternal: enableBuiltInNS(true)
I/org.webrtc.Logging(18467): WebRtcAudioEffectsExternal: setNS(true)
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: initPlayout(sampleRate=48000, channels=1)
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: byteBuffer.capacity: 960
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: AudioTrack.getMinBufferSize: 7696
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: createAudioTrackOnLollipopOrHigher
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:559267639 1 udp 2122071295 ::1 48661 typ host generation 0 ufrag tWtZ network-id 2"}}}
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: nativeOutputSampleRate: 48000
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1510613869 1 udp 2121998079 127.0.0.1 51201 typ host generation 0 ufrag tWtZ network-id 1"}}}
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: AudioTrack: session ID: 697, channels: 1, sample rate: 48000, max gain: 1.0
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: AudioTrack: buffer size in frames: 3848
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: AudioTrack: buffer capacity in frames: 3848
I/org.webrtc.Logging(18467): VolumeLogger: start@[name=worker_thread - 18585, id=7381]
I/org.webrtc.Logging(18467): VolumeLogger: audio mode is: MODE_NORMAL
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: startPlayout
I/org.webrtc.Logging(18467): WebRtcAudioTrackExternal: AudioTrackThread@[name=AudioTrackJavaThread, id=7396]
I/org.webrtc.Logging(18467): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp8 type: VP8 color format: 19 context: org.webrtc.EglBase14Impl$Context@4e11f9
I/org.webrtc.Logging(18467): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.vp9 type: VP9 color format: 19 context: org.webrtc.EglBase14Impl$Context@4e11f9
I/org.webrtc.Logging(18467): AndroidVideoDecoder: ctor name: OMX.qcom.video.decoder.avc type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@4e11f9
I/org.webrtc.Logging(18467): AndroidVideoDecoder: ctor name: OMX.google.h264.decoder type: H264 color format: 19 context: org.webrtc.EglBase14Impl$Context@4e11f9
D/FlutterWebRTCPlugin(18467): onAddTrack
I/org.webrtc.Logging(18467): HardwareVideoEncoder: initEncode: 640 x 480. @ 300kbps. Fps: 60 Use surface mode: true
D/FlutterWebRTCPlugin(18467): onAddTrack
D/FlutterWebRTCPlugin(18467): peerConnectionSetRemoteDescription() end
I/ACodec  (18467):  [] Now uninitialized
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
I/ACodec  (18467): [] onAllocateComponent
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
I/OMXClient(18467): IOmx service obtained
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:2653102537 1 tcp 1518217471 2607:fc20:b2d1:d0fd:0:e:60f7:ea01 9 typ host tcptype active generation 0 ufrag tWtZ network-id 4 network-cost 900"}}}
I/org.webrtc.Logging(18467): EglRenderer: Releasing.
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:3865011119 1 tcp 1518149375 192.0.0.4 9 typ host tcptype active generation 0 ufrag tWtZ network-id 5 network-cost 900"}}}
I/org.webrtc.Logging(18467): EglRenderer: eglBase detach and release.
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Loaded
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:1876313031 1 tcp 1518091519 ::1 57636 typ host tcptype passive generation 0 ufrag tWtZ network-id 2"}}}
I/org.webrtc.Logging(18467): EglRenderer: Quitting render thread.
I/org.webrtc.Logging(18467): HardwareVideoEncoder: Format: {color-format=2130708361, i-frame-interval=100, mime=video/x-vnd.on2.vp8, width=640, bitrate-mode=2, bitrate=300000, frame-rate=60, height=480}
I/org.webrtc.Logging(18467): EglRenderer: Releasing done.
I/org.webrtc.Logging(18467): EglRenderer: Initializing EglRenderer
I/org.webrtc.Logging(18467): EglRenderer: EglBase.create shared context
I/flutter (18467): Recivied data: {"type":"candidate","data":{"from":"136345","to":"855855","candidate":{"sdpMLineIndex":0,"sdpMid":"audio","candidate":"candidate:344579997 1 tcp 1518018303 127.0.0.1 41917 typ host tcptype passive generation 0 ufrag tWtZ network-id 1"}}}
I/org.webrtc.Logging(18467): EglBase14Impl: Using OpenGL ES version 2
I/ACodec  (18467): [HW_HDR] app-pid : 18467
W/OMXUtils(18467): do not know color format 0x7fa30c06 = 2141391878
W/OMXUtils(18467): do not know color format 0x7fa30c04 = 2141391876
W/OMXUtils(18467): do not know color format 0x7fa30c00 = 2141391872
W/OMXUtils(18467): do not know color format 0x7fa30c09 = 2141391881
W/OMXUtils(18467): do not know color format 0x7fa30c0a = 2141391882
W/OMXUtils(18467): do not know color format 0x7fa30c08 = 2141391880
W/OMXUtils(18467): do not know color format 0x7fa30c07 = 2141391879
W/OMXUtils(18467): do not know color format 0x7f000789 = 2130708361
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
I/ACodec  (18467): app-name : com.cloudwebrtc.flutterwebrtcdemo
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] cannot encode HDR static metadata. Ignoring.
I/ACodec  (18467): setupVideoEncoder succeeded
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] configure, AMessage : AMessage(what = 'conf', target = 1) = {
I/ACodec  (18467):   int32_t color-format = 2130708361
I/ACodec  (18467):   int32_t i-frame-interval = 100
I/ACodec  (18467):   string mime = "video/x-vnd.on2.vp8"
I/ACodec  (18467):   int32_t width = 640
I/ACodec  (18467):   int32_t bitrate-mode = 2
I/ACodec  (18467):   int32_t bitrate = 300000
I/ACodec  (18467):   int32_t frame-rate = 60
I/ACodec  (18467):   int32_t height = 480
I/ACodec  (18467):   int32_t encoder = 1
I/ACodec  (18467): }
W/OMXUtils(18467): do not know color format 0x7f000789 = 2130708361
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() start
D/FlutterWebRTCPlugin(18467): peerConnectionAddICECandidate() end
I/org.webrtc.Logging(18467): EglBase14Impl: Using OpenGL ES version 2
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Loaded->Idle
I/MediaCodec(18467): setCodecState state : 0
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Idle->Executing
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Executing
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -64]
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 23.
I/MediaCodec( 5702): setCodecState state : 0
I/MediaCodec(18467): setCodecState state : 0
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 21.
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -63]
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 85. Dropped: 0. Rendered: 84. Render fps: 21.0. Average render time: 2396 us. Average swapBuffer time: 1149 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -64]
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4002 ms. Frames received: 80. Dropped: 0. Rendered: 80. Render fps: 20.0. Average render time: 3174 us. Average swapBuffer time: 1543 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 20.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): NetworkMonitorAutoDetect: capabilities changed: [ Transports: WIFI Capabilities: NOT_METERED&INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN&VALIDATED&NOT_ROAMING&FOREGROUND&NOT_CONGESTED&NOT_SUSPENDED Unwanted:  LinkUpBandwidth>=1048576Kbps LinkDnBandwidth>=1048576Kbps SignalStrength: -63]
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 20.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4003 ms. Frames received: 95. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2505 us. Average swapBuffer time: 1199 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4004 ms. Frames received: 86. Dropped: 0. Rendered: 85. Render fps: 21.2. Average render time: 3131 us. Average swapBuffer time: 1520 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4003 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4004 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2593 us. Average swapBuffer time: 1293 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4007 ms. Frames received: 95. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2843 us. Average swapBuffer time: 1412 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 96. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2537 us. Average swapBuffer time: 1230 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2909 us. Average swapBuffer time: 1422 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4004 ms. Frames received: 95. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2574 us. Average swapBuffer time: 1226 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4010 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 3002 us. Average swapBuffer time: 1487 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4004 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2623 us. Average swapBuffer time: 1233 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4005 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2789 us. Average swapBuffer time: 1344 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4003 ms. Frames received: 95. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2787 us. Average swapBuffer time: 1369 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 95. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2778 us. Average swapBuffer time: 1359 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4004 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2606 us. Average swapBuffer time: 1230 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2853 us. Average swapBuffer time: 1481 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4009 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2537 us. Average swapBuffer time: 1227 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4004 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2918 us. Average swapBuffer time: 1447 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
D/FlutterWebRTCPlugin(18467): onIceGatheringChangeCOMPLETE
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2625 us. Average swapBuffer time: 1263 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
D/FlutterWebRTCPlugin( 5702): onIceGatheringChangeCOMPLETE
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 95. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2944 us. Average swapBuffer time: 1497 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4003 ms. Frames received: 96. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2406 us. Average swapBuffer time: 1193 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4008 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2787 us. Average swapBuffer time: 1448 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4009 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4006 ms. Frames received: 95. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2496 us. Average swapBuffer time: 1285 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4014 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2783 us. Average swapBuffer time: 1414 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4010 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2490 us. Average swapBuffer time: 1297 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4011 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2762 us. Average swapBuffer time: 1375 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4011 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4014 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4003 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2464 us. Average swapBuffer time: 1272 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4023 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 23.9. Average render time: 2799 us. Average swapBuffer time: 1437 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4009 ms. Frames received: 96. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2472 us. Average swapBuffer time: 1256 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4007 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2715 us. Average swapBuffer time: 1327 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4011 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 95. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2408 us. Average swapBuffer time: 1258 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4004 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2552 us. Average swapBuffer time: 1266 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2377 us. Average swapBuffer time: 1217 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4005 ms. Frames received: 95. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2608 us. Average swapBuffer time: 1292 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4011 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4005 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2381 us. Average swapBuffer time: 1231 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4008 ms. Frames received: 96. Dropped: 0. Rendered: 96. Render fps: 24.0. Average render time: 2628 us. Average swapBuffer time: 1349 us.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): EglRenderer: Duration: 4008 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/org.webrtc.Logging( 5702): CameraStatistics: Camera fps: 24.
D/ViewRootImpl@7cbef81[MainActivity]( 5702): ViewPostIme pointer 0
D/ViewRootImpl@7cbef81[MainActivity]( 5702): ViewPostIme pointer 1
I/flutter ( 5702): send: {"session_id":"855855-136345","from":"136345","type":"bye"}
I/org.webrtc.Logging(18467): EglRenderer: Duration: 4004 ms. Frames received: 95. Dropped: 0. Rendered: 95. Render fps: 23.7. Average render time: 2435 us. Average swapBuffer time: 1283 us.
I/org.webrtc.Logging(18467): CameraStatistics: Camera fps: 24.
I/flutter ( 5702): Recivied data: {"type":"bye","data":{"session_id":"855855-136345","from":"136345","to":"855855"}}
I/flutter ( 5702): bye: 855855-136345
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture: Nulling session
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture done
I/org.webrtc.Logging( 5702): CameraCapturer: dispose
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture: No session open
I/org.webrtc.Logging( 5702): CameraCapturer: Stop capture done
W/org.webrtc.Logging( 5702): CameraCapturer: onFrameCaptured from another session.
I/org.webrtc.Logging( 5702): Camera2Session: Stop camera2 session on camera 1
I/org.webrtc.Logging( 5702): Camera2Session: Stop internal
I/org.webrtc.Logging( 5702): SurfaceTextureHelper: stopListening()
I/org.webrtc.Logging( 5702): HardwareVideoEncoder: Releasing MediaCodec on output thread
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Executing->Idle
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Idle->Loaded
I/ACodec  ( 5702): [OMX.qcom.video.encoder.vp8] Now Loaded
I/ACodec  ( 5702):  [OMX.qcom.video.encoder.vp8] Now kWhatShutdownCompleted event : 8553
I/ACodec  ( 5702):  [OMX.qcom.video.encoder.vp8] Now uninitialized
I/ACodec  ( 5702):  [] Now kWhatShutdownCompleted event : 8553
I/MediaCodec( 5702): Codec shutdown complete
I/org.webrtc.Logging( 5702): HardwareVideoEncoder: Release on output thread done
I/org.webrtc.Logging( 5702): VolumeLogger: stop@[name=worker_thread - 5880, id=2641]
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: stopPlayout
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: underrun count: 1
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: stopThread
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: Stopping the AudioTrackThread...
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: Calling AudioTrack.stop...
D/AudioTrack( 5702): stop() called with 3638880 frames delivered
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrack.stop is done.
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: AudioTrackThread has now been stopped.
I/org.webrtc.Logging( 5702): WebRtcAudioTrackExternal: releaseAudioResources
I/org.webrtc.Logging( 5702): NetworkMonitor: Stop monitoring with native observer 517290775616
I/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: Unregister network callback
D/ConnectivityManager( 5702): unregisterNetworkCallback; CallingUid : 10403, CallingPid : 5702
I/flutter (18467): Recivied data: {"type":"bye","data":{"session_id":"855855-136345","from":"136345","to":"136345"}}
I/flutter (18467): bye: 855855-136345
I/org.webrtc.Logging( 5702): NetworkMonitorAutoDetect: Unregister network callback
D/ConnectivityManager( 5702): unregisterNetworkCallback; CallingUid : 10403, CallingPid : 5702
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture: Nulling session
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture done
I/org.webrtc.Logging(18467): CameraCapturer: dispose
I/org.webrtc.Logging(18467): Camera2Session: Stop camera2 session on camera 1
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture
I/org.webrtc.Logging(18467): Camera2Session: Stop internal
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture: No session open
I/org.webrtc.Logging(18467): SurfaceTextureHelper: stopListening()
I/org.webrtc.Logging(18467): CameraCapturer: Stop capture done
W/FlutterWebRTCPlugin( 5702): VideoTrack is null
W/FlutterWebRTCPlugin( 5702): VideoTrack is null
I/org.webrtc.Logging(18467): HardwareVideoEncoder: Releasing MediaCodec on output thread
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Executing->Idle
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Idle->Loaded
I/ACodec  (18467): [OMX.qcom.video.encoder.vp8] Now Loaded
I/ACodec  (18467):  [OMX.qcom.video.encoder.vp8] Now kWhatShutdownCompleted event : 8522
I/ACodec  (18467):  [OMX.qcom.video.encoder.vp8] Now uninitialized
I/ACodec  (18467):  [] Now kWhatShutdownCompleted event : 8522
I/MediaCodec(18467): Codec shutdown complete

"No video stream for react tag" on IOS simulator

When I try "GetUserMedia API Test" and make a "call" nothing is happening. Debug console says "No video stream for react tag: (Random string)"

I am pretty new at WebRTC so I may be missing something? Or maybe it is a bug? Can provide more data if needed.

Mobile build failing on Master flutter channel

The problem:


github.com/cloudwebrtc/flutter-webrtc-demo && flutter run -d all
Launching lib/main.dart on iPhone SE in debug mode...
Running Xcode build...                                                  
                                                   
Xcode build done.                                            2.2s
Failed to build iOS app
Error output from Xcode build:
↳
    2019-09-13 04:45:39.339 XCBBuildService[46127:2038156] Failed to remove:
    /Users/apple/Library/Developer/Xcode/DerivedData/Runner-cetgpfixclxuyldlteelhuhhrgej/Build/Intermediates.noindex/XCBuildData/97174e538c278bce242a0f927e548a1a-desc.xcbuild:
    unlink(/Users/apple/Library/Developer/Xcode/DerivedData/Runner-cetgpfixclxuyldlteelhuhhrgej/Build/Intermediates.noindex/XCBuildData/97174e538c278bce242a0f927e548a1a-desc.xcbuil
    d): No such file or directory (2)
    ** BUILD FAILED **


Xcode's output:
↳
    error: Multiple commands produce
    '/Users/apple/workspace/go/src/github.com/cloudwebrtc/flutter-webrtc-demo/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework':
    1) Target 'Runner' has copy command from '/Users/apple/workspace/go/src/github.com/cloudwebrtc/flutter-webrtc-demo/ios/Flutter/Flutter.framework' to
    '/Users/apple/workspace/go/src/github.com/cloudwebrtc/flutter-webrtc-demo/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
    2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
    warning: ignoring duplicated output file:
    '/Users/apple/workspace/go/src/github.com/cloudwebrtc/flutter-webrtc-demo/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' in shell script build phase
    '[CP] Embed Pods Frameworks'. This warning represents an extremely serious project misconfiguration and will likely cause some shell scripts in your project to be skipped
    entirely, leading to other build failures or missing files in the build directory. This will be a hard error in the future. (in target 'Runner')
    note: Using new build systemnote: Planning buildnote: Constructing build description


Context:

I am running on flutter master channel, so i get the latest desktop and web stuff.
I do NOT get this problem if i do a Flutter Create.


x-MacBook-Pro:~ apple$ flutter doctor -v
[✓] Flutter (Channel master, v1.10.2-pre.69, on Mac OS X 10.14.6 18G95, locale en-DE)
    • Flutter version 1.10.2-pre.69 at /Users/apple/fvm/master
    • Framework revision 7ca249126b (2 hours ago), 2019-09-12 18:03:32 -0700
    • Engine revision 7ea9884ab0
    • Dart version 2.5.0 (build 2.5.0-dev.4.0 be66176534)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/apple/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/apple/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

[✓] Xcode - develop for iOS and macOS (Xcode 10.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.3, Build version 10G8
    • CocoaPods version 1.7.5

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.38.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.4.1

[✓] Connected device (1 available)
    • iPhone SE • 18D80E89-328E-4BA6-954D-50CD74F3C3C3 • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)

This is the problem and the fix.

flutter/flutter#20685 (comment)

New demo does not build

When:
While getting packages

The flutter.plugin.platforms key cannot be used in combination with the oldflutter.plugin.{androidPackage,iosPrefix,pluginClass} keys.See: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin

Neither CLI nor VSCode builds it. The stable/master build gives no error if I add plugin to a another new project's pubspec (i.e. adding flutter_webrtc: ).

Adding current repo as plugin however throws the same error

  flutter_webrtc:
    git:
      url:
        https://github.com/cloudwebrtc/flutter-webrtc.git

Here is the flutter doctor output

[√] Flutter (Channel dev, v1.13.0, on Microsoft Windows [Version 10.0.17763.864], locale tr-TR)
    • Flutter version 1.13.0 at C:\src\flutter
    • Framework revision 09126abb22 (4 days ago), 2019-12-03 17:43:00 -0800
    • Engine revision 6179380243
    • Dart version 2.7.0 (build 2.7.0-dev.2.1 a4d799c402)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\User\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 41.0.2
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code
    • VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.7.0

[√] VS Code, 64-bit edition (version 1.40.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.7.0

[√] Connected device (3 available)
    • SM G935F   • 192.168.1.100:5555 • android-arm64  • Android 7.0 (API 24)
    • Chrome     • chrome             • web-javascript • Google Chrome 78.0.3904.108
    • Web Server • web-server         • web-javascript • Flutter Tools

Android手机连接服务器异常

1.flutter-webrtc-server在Mac电脑上部署成功
2.打开两个浏览器可以视频通讯
3.手机打开谷歌浏览器,也可以通讯,手机和PC浏览器使用的是同一个网
4.在手机运行flutte-webrtc-demo,Basic API测试没有问题
5.打开P2P Call Sample,填写IP地址,如10.10.50.24
最后连接出现异常,定位到代码 HttpClientRequest request = await client.getUrl(
Uri.parse('https://$host:$port/ws'));
异常提示:SocketException: OS Error: No route to host, errno = 113

这个不能手机和浏览器进行视频吗?

我自己搭的server,浏览器和浏览器没问题,但是手机和浏览器连接的时候,手机p2p call sample列表没有内容,是因为我的域名后面代端口的问题吗?我看作者的demo域名没端口,还有flutter项目代码里面也没有设置端口。

Unable to connect to demo-server in app

I've deployed the flutter-webrtc-server demo in my local network and it works fine while using it with my mobile browser (I'm able to call other users, etc).
However, while using the P2P Call Sample option in the demo Flutter app, when I tap "Connect" after introducing the address of the machine where the server has been deployed, nothing happens and the screen remains blank except for the blue navbar.

  • I can't see any activity in the log of the server
  • The app passes the basic API tests
  • Android 9.0 on OnePlus5

Thanks in advance! I'm really interested in getting this to work!

Crash app

Hello Team,

In flutter version 1.8 stable my app working well in both emulator and android android (after flutter build apk).

after that I have upgrade with latest version with 1.9 stable.. but after upgrading flutter. app getting crash when i open in android device (after flutter build apk). but its working well in emulator.

so please let me know. you can use flutter-webrtc-demo for creating release apk . and once its working then let me know what kinds of changes i have to do.

Thanks in Advance

Depreceated API warning

Hi, I am getting following warning message:

Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
## Though it installed and is working as mentioned below
Built build/app/outputs/apk/debug/app-debug.apk.
Installing build/app/outputs/apk/app.apk...

All the "Note" above gives warning about depreciated API

请问,这个demo 提供的P2P通话的问题

我使用demo 中的P2P功能 发现 接听方 并没有选择是否接通 而是直接就是接通模式,另外语音模式的时候 视频也是开着的,请问这个需要怎么设置,希望能修改成 微信的那种效果

Low Voice

Hello, i'm integrating this webrtc flutter into my own app and i found out that the voice streamed is so low that i can barely hear anything. The sound button doens't seems to be helping. Is there anything that i'm missing?

Inform new bugs in mobile client

I have found a few more issues.
I do the test by using 2 clients, Web-Chrome browser and Android Phone. I found 2 issues from the Android mobile app.

  1. From the Android mobile app, when I click the Video call, the Android app client makes the call to the web client, but the remoted video at the Android and Web client is not showing up
    in both Web and Android app.
  2. The microphone icon in the Android mobile app is always disabled, and nothing happens when clicking at it. So, I can't enable it.

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'closeCode' was called on null.

flutter: connect to wss://192.168.3.6:4443
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: NoSuchMethodError: The getter 'closeCode' was called on null.
Receiver: null
Tried calling: closeCode
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 SimpleWebSocket.connect (package:flutter_webrtc_demo/src/utils/websocket.dart:29:28)

#2 Signaling.connect (package:flutter_webrtc_demo/src/call_sample/signaling.dart:292:19)
#3 _CallSampleState._connect (package:flutter_webrtc_demo/src/call_sample/call_sample.dart:50:45)
#4 _CallSampleState.initState (package:flutter_webrtc_demo/src/call_sample/call_sample.dart:32:5)
#5 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4355:58)
#6 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4201:5)
#7 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3194:14)
#8 Element.updateChild (package:flutter/src/widgets/framework.dart:2988:12)
#9 SingleChildRenderObjectEle<…>

════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following NoSuchMethodError was thrown building Overlay-[LabeledGlobalKey#3fbe7](state: OverlayState#83867(entries: [OverlayEntry#e2090(opaque: true; maintainState: false), OverlayEntry#e08bc(opaque: false; maintainState: true)])):
The method 'close' was called on null.
Receiver: null
Tried calling: close()

The relevant error-causing widget was:
MaterialApp file:///Users/Mr-Han/Desktop/flutter-webrtc-demo-master/lib/main.dart:47:16
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1 SimpleWebSocket.close (package:flutter_webrtc_demo/src/utils/websocket.dart:41:13)
#2 Signaling.close (package:flutter_webrtc_demo/src/call_sample/signaling.dart:100:34)
#3 _CallSampleState.deactivate (package:flutter_webrtc_demo/src/call_sample/call_sample.dart:43:40)
#4 StatefulElement.deactivate (package:flutter/src/widgets/framework.dart:4428:12)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

certs

For DEV
https://blog.filippo.io/mkcert-valid-https-certificates-for-localhost/
https://github.com/FiloSottile/mkcert

  • this gets you a VALID HTTPS Cert ! Very needed for testing
  • works for Localhost :)
  • works for Mobiles !!
  • Perfect for DEV.
  • ALSO BECAUSE it uses proper Trust chain it works in Browsers !

For PROD
https://github.com/jsha/minica

  • Perfect for Making CA and user keys on devices.

Can we make a MakeFile to get all this working. Its difficult to test on emulators and real mobiles when the server is not using real certs.

Registration with webrtc server?

Hi,

Is there anyway to call another p2p user without knowing their address? For example, one peer registers with the webrtc server and calls an alias and then the server returns the right address? Similar to a SIP registration?

Or is this just pure p2p? How do you recommend handling this list of online peers?

Thanks.

question about this project

hi

first, I want to thank you

I want to make a conference app with this

or like skype more of the two users can join one call

the web client is not running in firefox

Can you guide me

thanks

Errors in demo

I am getting few errors
when i try to run a demo. I am also running https://0.0.0.0:8086/ on local,

Error 1
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: setState() called after dispose(): _GetUserMediaSampleState#15559(lifecycle state: defunct, not mounted)

Error 2
Note: /Users/bilalrabbi/Desktop/tools/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.5.1/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/bilalrabbi/Desktop/tools/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.5.6/android/src/main/java/io/flutter/plugins/sharedpreferences/SharedPreferencesPlugin.java:25: warning: [deprecation] getFlutterEngine() in FlutterPluginBinding has been deprecated
setupChannel(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
^
1 warning

Error 3
The method 'close' was called on null.
Receiver: null
Tried calling: close()

Flutter App Demo server not working 0.0.0.0

Hello guys. Im trying to connect to the webrtc server with this wss://0.0.0.0:4443 but I can't connect. I tried this wss://demo.cloudwebrtc.com:4443 and it works but the webrtc running on the node can;t connect to the demo app on mobile. can you help me with this one? i'm new with web rtc stuffs

Can't install?

Just checking this out... I tried to install the apk on my Redmi Note 4, and the app crashes on launch with the following report:

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.cloudwebrtc.flutterwebrtcdemo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.cloudwebrtc.flutterwebrtcdemo-1/lib/arm64, /data/app/com.cloudwebrtc.flutterwebrtcdemo-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libflutter.so"
	at java.lang.Runtime.loadLibrary0(Runtime.java:972)
	at java.lang.System.loadLibrary(System.java:1530)
	at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:157)
	at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:134)
	at io.flutter.app.FlutterApplication.onCreate(FlutterApplication.java:22)
	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5518)
	at android.app.ActivityThread.-wrap2(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1608)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:165)
	at android.app.ActivityThread.main(ActivityThread.java:6354)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:883)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:773)

Flutter doctor doesn't report any errors or warnings:

[✓] Flutter (Channel stable, v1.0.0, on Linux, locale en_US.UTF-8)
    • Flutter version 1.0.0 at /home/user/Projects/flutter-projects/flutter
    • Framework revision 5391447fae (4 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /home/user/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /opt/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] Android Studio (version 3.2)
    • Android Studio at /opt/android-studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.30.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.21.1

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)

Voice call and Video Call

is it possible to change from voice call into video call or vice versa while currently connected to other peer?

`flutter run` crash on MacOS

Analyzing dependencies

   Inspecting targets to integrate
     Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

   Fetching external sources
   -> Fetching podspec for `Flutter` from `Flutter`
   -> Fetching podspec for `flutter_webrtc` from `.symlinks/plugins/flutter_webrtc/ios`
   -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`

   Resolving dependencies of `Podfile`
     CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
   [!] CocoaPods could not find compatible versions for pod "flutter_webrtc":
     In Podfile:
       flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)

   Specs satisfying the `flutter_webrtc (from `.symlinks/plugins/flutter_webrtc/ios`)` dependency were found, but they required a higher minimum deployment target.

   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
   /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/resolver.rb:94:in `resolve'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:986:in `block in resolve_dependencies'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
   /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
   /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
   /usr/local/bin/pod:23:in `load'
   /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳

   [!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile.
   See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

本地预览播放视频 与 传输视频 分开

您好,
我想把本地预览播放的视频 与 传输给远程的视频分开,该怎么做 ?

比如:
我本地预览播放的视频是 1080p,但传输给远程是720p,两个视频源来自同一个摄像头。

Unable to get other peer video

I'm using your demo code and firestore as signalling server. But i can't understand how to accept answer when other person called.
Here is my signalling server code:


import 'dart:convert';
import 'dart:async';
import 'dart:io';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter_webrtc/webrtc.dart';
import 'auth.dart';

enum SignalingState {
  CallStateNew,
  CallStateRinging,
  CallStateInvite,
  CallStateConnected,
  CallStateBye,
  ConnectionOpen,
  ConnectionClosed,
  ConnectionError,
}

typedef void SignalingStateCallback(SignalingState state);
typedef void StreamStateCallback(MediaStream stream);
typedef void OtherEventCallback(dynamic event);
typedef void DataChannelMessageCallback(RTCDataChannel dc, data);

class Signaling{
  Signaling(this._name, this.peerID);
  String _selfId = currentUserModel.id;
  var _session_id;
  var _url;
  var _name, peerID;
  var _peerConnections = new Map<String, RTCPeerConnection>();
  var _daChannels = new Map<int, RTCDataChannel>();
  Timer _timer;
  MediaStream _localStream;
  List<MediaStream> _remoteStreams;
  SignalingStateCallback onStateChange;
  StreamStateCallback onLocalStream;
  StreamStateCallback onAddRemoteStream;
  StreamStateCallback onRemoveRemoteStream;
  OtherEventCallback onPeersUpdate;
  DataChannelMessageCallback onDataChannel;

  final ref = Firestore.instance;
  StreamSubscription<DocumentSnapshot> streamSub;
  Map<String, dynamic> _iceServers = {
    'iceServers': [
      {'url': 'stun:stun.l.google.com:19302'},
    ]
  };

  final Map<String, dynamic> _config = {
    'mandatory': {},
    'optional': [
      {'DtlsSrtpKeyAgreement': true},
    ],
  };

  final Map<String, dynamic> _constraints = {
    'mandatory': {
      'OfferToReceiveAudio': true,
      'OfferToReceiveVideo': true,
    },
    'optional': [],
  };

  void invite(String peerId, String media) {
    //this._session_id = this._selfId + '-' + peerId;
    if (_selfId.hashCode <= peerID.hashCode) {
      this._session_id = this._selfId+'-'+peerId;//'$this._selfId-$peerID';
    } else {
      this._session_id = peerId+'-'+this._selfId;//'$peerID-$_selfId';
    }
      print('line 67 VCS  $_session_id');
    if (this.onStateChange != null) {
      this.onStateChange(SignalingState.CallStateNew);
    }
      print('line 76 $peerId');
    _createPeerConnection(peerId, media).then((pc) {
      _peerConnections[peerId] = pc;
      _createOffer(peerId, pc, media);
    });
  }

  _createPeerConnection(String id, String media) async{
    print('line 84 id is $id');
    _localStream = await createStream();
    RTCPeerConnection pc = await createPeerConnection(_iceServers, _config);
    print('line 87 vcs-cpc');
    pc.addStream(_localStream);
    pc.onIceCandidate = (candidate) {
      _send('candidate', {
        'to': id,
        'candidate': {
          'sdpMLineIndex': candidate.sdpMlineIndex,
          'sdpMid': candidate.sdpMid,
          'candidate': candidate.candidate,
        },
        'session_id': this._session_id,
      });
    };

    pc.onAddStream = (stream) {
      if(this.onAddRemoteStream != null)
        this.onAddRemoteStream(stream);
      //_remoteStreams.add(stream);
    };

    pc.onRemoveStream = (stream) {
      if(this.onRemoveRemoteStream != null)
        this.onRemoveRemoteStream(stream);
      _remoteStreams.removeWhere((it) {
        return (it.id == stream.id);
      });
    };

    pc.onDataChannel = (channel) {
      _addDataChannel(id, channel);
    };
    print('line 118 vcs-cpc');
    return pc;

  }

  void _createOffer(String id, pc, String media) async{
    try {
      RTCSessionDescription s = await pc.createOffer(_constraints);
      pc.setLocalDescription(s);
      _send('offer', {
        'to': id,
        'description': {'sdp': s.sdp, 'type': s.type},
        'session_id': this._session_id,
        'media': media,
      });
    } catch (e) {
      print(e.toString());
    }
  }

  _addDataChannel(id, RTCDataChannel channel) {
    channel.onDataChannelState = (e) {};
    channel.onMessage = (data) {
      if(this.onDataChannel != null)
        this.onDataChannel(channel, data);
    };
    _daChannels[id] = channel;
  }

  Future<MediaStream> createStream() async {
    final Map<String, dynamic> mediaConstraints = {
      'audio': true,
      'video': {
        'mandatory': {
          'minWidth':
          '640', // Provide your own width, height and frame rate here
          'minHeight': '480',
          'minFrameRate': '30',
        },
        'facingMode': 'user',
        'optional': [],
      }
    };

    MediaStream stream = await navigator.getUserMedia(mediaConstraints);
    if(this.onLocalStream != null){
      this.onLocalStream(stream);
    }
    return stream;
  }

  void bye() {
    _send('bye', {
      'session_id': this._session_id,
      'from': this._selfId,
    });
   // streamSub.cancel();
  }

  void onMessage(Map message) async {
    print('line 160 VCS $message');
    Map<String, dynamic> mapData = message;

    var data = mapData;

    print('line 169 VCS $data');
    switch(mapData['type']){

//      case 'peers':
//        {
//          List<dynamic> peers = data;
//          if(this.onPeersUpdate != null) {
//            Map<String, dynamic> event = new  Map<String, dynamic>();
//            event['self'] = _self_id;
//            event['peers'] = peers;
//            this.onPeersUpdate(event);
//          }
//        }
//        break;
      case 'offer':
        {
         
          var id = data['from'];
          var description = data['description'];
          var media = data['media'];
          var session_id = data['session_id'];
          this._session_id = session_id;

          if (this.onStateChange != null) {
            this.onStateChange(SignalingState.CallStateNew);
          }

          _createPeerConnection(id, media).then((pc) {
            _peerConnections[id] = pc;
            pc.setRemoteDescription(
                new RTCSessionDescription(description['sdp'], description['type']));
            _createAnswer(id, pc);
          });
         
        }
        break;
      case 'answer':
        {
   
          var id = data['from'];
          var description = data['description'];

          var pc = _peerConnections[id];
          if (pc != null) {
            pc.setRemoteDescription(
                new RTCSessionDescription(description['sdp'], description['type']));
          }
        
        }
        break;
      case 'candidate':
        {
       
          var id = data['from'];
          var candidateMap = data['candidate'];
          var pc = _peerConnections[id];

          if (pc != null) {
            RTCIceCandidate candidate = new RTCIceCandidate(
                candidateMap['candidate'],
                candidateMap['sdpMid'],
                candidateMap['sdpMLineIndex']);
            pc.addCandidate(candidate);
          }
          
        }
        break;
      case 'leave':
        {
          var id = data;
          _peerConnections.remove(id);
          _daChannels.remove(id);

          if (_localStream != null) {
            _localStream.dispose();
            _localStream = null;
          }

          var pc = _peerConnections[id];
          if (pc != null) {
            pc.close();
            _peerConnections.remove(id);
          }
          this._session_id = null;
          if (this.onStateChange != null) {
            this.onStateChange(SignalingState.CallStateBye);
          }
        }
        break;
      case 'bye':
        {          var from = data['from'];
        var to = data['to'];
        var session_id = data['session_id'];
        print('bye: ' + session_id);

        if (_localStream != null) {
          _localStream.dispose();
          _localStream = null;
        }


        var pc = _peerConnections[to];
        if (pc != null) {
          pc.close();
          _peerConnections.remove(to);
        }
        this._session_id = null;
        if (this.onStateChange != null) {
          this.onStateChange(SignalingState.CallStateBye);
        }
        }
        break;
      case 'keepalive':
        {
          print('keepalive response!');
        }
        break;
      default:
        break;
    }
  }

  _createAnswer(String id, RTCPeerConnection pc) async {
    print('line 306');
    try {
      RTCSessionDescription s = await pc.createAnswer(_constraints);
      pc.setLocalDescription(s);
      _send('answer', {
        'to': id,
        'description': {'sdp': s.sdp, 'type': s.type},
        'session_id': this._session_id,
      });
    } catch (e) {
      print(e.toString());
    }
  }

  connect() async{
    if (_selfId.hashCode <= peerID.hashCode) {
      this._session_id = this._selfId+'-'+peerID;//'$this._selfId-$peerID';
    } else {
      this._session_id = peerID+'-'+this._selfId;//'$peerID-$_selfId';
    }
    if (this.onStateChange != null) {
      this.onStateChange(SignalingState.ConnectionOpen);
    }
    _send('new', {
      'name': _name,
      'id': _selfId,
      'user_agent': 'flutter-webrtc/'+ Platform.operatingSystem +'-plugin 0.0.1'
    });

    streamSub = ref.collection('VideoCall').document(_session_id).snapshots().listen((snap){
        print('Recivied data: ' + snap.data.toString());
        this.onMessage(snap.data);
    });


  }



  _send(event, data) {
    if (_selfId.hashCode <= peerID.hashCode) {
      this._session_id = this._selfId+'-'+peerID;//'$this._selfId-$peerID';
    } else {
      this._session_id = peerID+'-'+this._selfId;//'$peerID-$_selfId';
    }
    data['type'] = event;
    JsonEncoder encoder = new JsonEncoder();
    ref.collection('VideoCall').document(_session_id).setData(data);
    print('send: ' + encoder.convert(data));

  }
}

and my videocall Screen code

import 'package:flutter/material.dart';
import 'package:flutter_webrtc/webrtc.dart';
import 'auth.dart';
import 'video_call_signaling.dart';


class VideoCall extends StatefulWidget{
  final String peerId, peerDisplayName, peerPhotoUrl;
  VideoCall(this.peerId, this.peerDisplayName, this.peerPhotoUrl);
  _VideoCallState createState() => new _VideoCallState();
}

class _VideoCallState extends State<VideoCall> {
  Signaling _signaling;
  String peerId , peerDisplayName, peerPhotoUrl;
  String _displayName = currentUserModel.displayName;
  String _selfId;
  bool inCall = false;

  RTCVideoRenderer _localRenderer = new RTCVideoRenderer();
  RTCVideoRenderer _remoteRenderer = new RTCVideoRenderer();


  @override
  void initState() {
    print('init video call class');
    _selfId = currentUserModel.id;
    peerId = widget.peerId;
    peerDisplayName = widget.peerDisplayName;
    peerPhotoUrl = widget.peerPhotoUrl;
    initRenders();
    _connect();
    _invitePeer(context, peerId);
  }

  @override
  void dispose() {
    _hangUp();
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: inCall? buildInCallView() : buildConnectingView(),
      floatingActionButton: inCall
          ? FloatingActionButton(
        onPressed: _hangUp,
        tooltip: 'Hangup',
        child: new Icon(Icons.call_end),
      )
          : null,
    );
  }

  buildInCallView() {
    return  OrientationBuilder(builder: (context, orientation) {
      return  Container(
        child:  Stack(children: <Widget>[
           Positioned(
              left: 0.0,
              right: 0.0,
              top: 0.0,
              bottom: 0.0,
              child:  Container(
                margin:  EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 0.0),
                width: MediaQuery.of(context).size.width,
                height: MediaQuery.of(context).size.height,
                child: new RTCVideoView(_remoteRenderer),
                decoration: new BoxDecoration(color: Colors.black54),
              )),
           Positioned(
            left: 20.0,
            top: 20.0,
            child:  Container(
              width: orientation == Orientation.portrait ? 90.0 : 120.0,
              height:
              orientation == Orientation.portrait ? 120.0 : 90.0,
              child: new RTCVideoView(_localRenderer),
              decoration:  BoxDecoration(color: Colors.black54),
            ),
          ),
        ]),
      );
    });
  }

  buildConnectingView() {
    return OrientationBuilder(builder: (context, orientation){
      return Container(
        child: Stack(
          children: <Widget>[
            Container(
              child: Center(
                child: CircularProgressIndicator(),
              ),
            )
          ],
        ),
      );
    });
  }

  void initRenders() async{
    await _localRenderer.initialize();
    await _remoteRenderer.initialize();
  }



  _hangUp() {
    if (_signaling != null) {
      this.setState(() {
        _localRenderer.srcObject = null;
        _remoteRenderer.srcObject = null;
        inCall = false;

      });
      _signaling.bye();
    }
  }

  void _invitePeer(BuildContext context, String peerId) async{
    print('line 115invite peer, videocall');
    if (_signaling != null && peerId != _selfId) {
      _signaling.invite(peerId, 'video');
    }
  }

  void _connect() async{
    if (_signaling == null){
      _signaling = new Signaling( _displayName, peerId)
        ..connect();

      _signaling.onStateChange = (SignalingState state) {
        switch (state) {
          case SignalingState.CallStateNew:
            this.setState(() {
              inCall = true;
            });
            break;
          case SignalingState.CallStateBye:
            this.setState(() {
              _localRenderer.srcObject = null;
              _remoteRenderer.srcObject = null;
              inCall = false;
              print('line 140 videocall');
              Navigator.pop(context);
            });

            break;
          case SignalingState.CallStateInvite:
            print('line 152 videocall ');
            break;
          case SignalingState.CallStateConnected:
            print('line 155 videocall ');
            break;
          case SignalingState.CallStateInvite:
            print('line 158 videocall ');
            break;
          case SignalingState.CallStateRinging:
            print('line 161 videocall ');

            break;
          case SignalingState.ConnectionClosed:
            print('line 164 videocall ');
            break;
          case SignalingState.ConnectionError:
            print('line 167 videocall ');
            break;
          case SignalingState.ConnectionOpen:
            print('line 170 videocall ');
            break;
        }
        };
      _signaling.onLocalStream = ((stream) {
        _localRenderer.srcObject = stream;
      });
      _signaling.onAddRemoteStream = ((stream) {
        _remoteRenderer.srcObject = stream;
      });

      _signaling.onRemoveRemoteStream = ((stream) {
        _remoteRenderer.srcObject = null;
      });

    }
  }
}

I don't get how I have to show call lift screen such that both users can connect and see their other peer video.
Right now I'm getting only local stream video.

You have many callback unused like shown below. when and where to use them?

typedef void SignalingStateCallback(SignalingState state);
typedef void StreamStateCallback(MediaStream stream);
typedef void OtherEventCallback(dynamic event);
typedef void DataChannelMessageCallback(RTCDataChannel dc, data);

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.