Coder Social home page Coder Social logo

ion-sdk-flutter's People

Contributors

adwpc avatar ayush412 avatar cgojin avatar cloudwebrtc avatar evaldofreu avatar gqadonis avatar kangshaojun avatar mattstarkey avatar renovate-bot avatar renovate[bot] avatar vedartm avatar vmwsree avatar xuantung95 avatar zjzhang-cn 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

ion-sdk-flutter's Issues

onnegotiationneeded error after adding video track with addTrack

Your environment.

  • Flutter version 2.2.3
  • Android 11
  • flutter_ion: ^0.5.3

What did you do?

Tried to add a camera video track to existing audio only localstream and published it with sfu.publish(). Camera stream is visible on local device.

ion.LocalStream _stream = await ion.LocalStream.getUserMedia(
            constraints: ion.Constraints.defaults);
await localStream.stream.addTrack(_stream.stream.getVideoTracks()[0]);
await sfu.publish(localStream);

What did you expect?

sfu.ontrack to trigger for all users

What happened?

onnegotiationneeded error thrown

[ion-sdk-flutter] ERROR: onnegotiationneeded: e => Bad state: Too many elements #0      ListMixin.singleWhere (dart:collection/list.dart:191:11)
I/flutter (19124): #1      CodecCapabilitySelector._mline             package:flutter_ion/src/utils.dart:97                                     
I/flutter (19124): #2      CodecCapabilitySelector.getCapabilities    package:flutter_ion/src/utils.dart:69
I/flutter (19124): #3      Client.setPreferredCodec                   package:flutter_ion/src/client.dart:231
I/flutter (19124): #4      Client.onnegotiationneeded                 package:flutter_ion/src/client.dart:217
I/flutter (19124): #5      Client.publish                             package:flutter_ion/src/client.dart:127

native crash

D/CrashReport-Native(10230): Re-sending signal 'SIGSEGV' to thread: 10566
F/libc (10230): Fatal signal 11 (SIGSEGV), code 0 (SI_USER) in tid 10566 (EncoderQueue - ), pid 10230 (openim.app.demo)


Build fingerprint: 'Redmi/cannon/cannon:11/RP1A.200720.011/V12.5.3.0.RJECNXM:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2023-03-13 17:04:51+0800
pid: 10230, tid: 10566, name: EncoderQueue - >>> io.openim.app.demo <<<
uid: 10318
signal 11 (SIGSEGV), code 0 (SI_USER), fault addr --------
x0 0000000000000000 x1 0000000000000000 x2 0000000000000010 x3 0000000000000007
x4 0000000000000038 x5 0000000000000000 x6 6b606d6668726d74 x7 7f7f7f7f7f7f7f7f
x8 b400006d8f678340 x9 0000000000000004 x10 00000000ffffffff x11 0000006d9be619ec
x12 000000000000f278 x13 32762d7265646f63 x14 0000000000000008 x15 00e8000000000000
x16 00000070136069b8 x17 00000070135fb84c x18 0000006d81ff4000 x19 0000000000000000
x20 0000000000000000 x21 b400006d8f9fe820 x22 0000000000000000 x23 b400006dea0441a8
x24 b400006f23c8af80 x25 0000006d8cf62000 x26 0000000000000001 x27 b400006dea043c00
x28 b400006dea043cd8 x29 0000006d8cf5fd10
lr 0000006de00c4eec sp 0000006d8cf5fd10 pc 0000006de00c4eec pst 0000000020001000
backtrace:
#00 pc 000000000051aeec /data/app/~~pCrFrUixLnvqUEYt8GJI

can not use on macos with flutter 3.13

[ERROR:flutter/shell/common/shell.cc(1004)] The 'FlutterWebRTC/peerConnectionEventA3753D88-5A15-4A1A-8D32-7B8AE3D89B23' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.

Unhandled Exception: type 'Null' is not a subtype of type 'String'

Your environment.

  • Version: ion-sdk-flutter v0.4.4, ion v1.9.0

What did you do?

  • Run ion-app-flutter

What happened?

Got this error after connected to room

I/flutter (30576): Get Message: {"receiver":{"receiverId":"f91130c6-6267-4936-a17d-85e769ab959b","rtpParameters":{"headerExtensions":[],"encodings":[],"codecs":[],"rtcp":{"cname":"","reducedSize":false},"transactionId":""},"track":{"kind":"audio","readyState":"LIVE","id":"f91130c6-6267-4936-a17d-85e769ab959b","label":"audio","enabled":true}},"sender":{"senderId":"6dd4c311-e253-401d-855a-2dc1dad942e4","rtpParameters":{"headerExtensions":[],"encodings":[],"codecs":[],"rtcp":{"cname":"","reducedSize":false},"transactionId":"fde3c233-2440-4572-a464-a9def316915c"},"ownsTrack":true,"track":{"kind":"audio","readyState":"LIVE","id":"6dd4c311-e253-401d-855a-2dc1dad942e4","label":"audio","enabled":true},"dtmfSender":{"duration":100,"dtmfSenderId":"6dd4c311-e253-401d-855a-2dc1dad942e4","interToneGap":50}},"mid":null,"transceiverId":null,"direction":"sendonly"}
E/flutter (30576): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
E/flutter (30576): #0      new RTCRtpTransceiverNative.fromMap (package:flutter_webrtc/src/native/rtc_rtp_transceiver_impl.dart:74:12)
E/flutter (30576): #1      RTCPeerConnectionNative.addTransceiver (package:flutter_webrtc/src/native/rtc_peerconnection_impl.dart:512:38)
E/flutter (30576): <asynchronous suspension>
E/flutter (30576): #2      LocalStream.publishTrack (package:flutter_ion/src/stream.dart:236:27)
E/flutter (30576): <asynchronous suspension>
E/flutter (30576): 
I/flutter (30576): Get Message: {"receiver":{"receiverId":"a1a646a8-6c89-48e0-baae-5138dc8c57f2","rtpParameters":{"headerExtensions":[],"encodings":[],"codecs":[],"rtcp":{"cname":"","reducedSize":false},"transactionId":""},"track":{"kind":"video","readyState":"LIVE","id":"a1a646a8-6c89-48e0-baae-5138dc8c57f2","label":"video","enabled":true}},"sender":{"senderId":"a4512cfe-12c4-4986-bf11-6b7ba02dd282","rtpParameters":{"headerExtensions":[],"encodings":[{"active":true,"maxBitrate":2500000,"numTemporalLayers":1,"scaleResolutionDownBy":1.0,"maxFramerate":30}],"codecs":[],"rtcp":{"cname":"","reducedSize":false},"transactionId":"3770804e-3a45-41a4-852e-0d1f5eab7a45"},"ownsTrack":true,"track":{"kind":"video","readyState":"LIVE","id":"a4512cfe-12c4-4986-bf11-6b7ba02dd282","label":"video","enabled":true},"dtmfSender":{"dtmfSenderId":"a4512cfe-12c4-4986-bf11-6b7ba02dd282"}},"mid":null,"transceiverId":null,"direction":"sendonly"}
E/flutter (30576): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: type 'Null' is not a subtype of type 'String'
E/flutter (30576): #0      new RTCRtpTransceiverNative.fromMap (package:flutter_webrtc/src/native/rtc_rtp_transceiver_impl.dart:74:12)
E/flutter (30576): #1      RTCPeerConnectionNative.addTransceiver (package:flutter_webrtc/src/native/rtc_peerconnection_impl.dart:512:38)
E/flutter (30576): <asynchronous suspension>
E/flutter (30576): #2      LocalStream.publishTrack (package:flutter_ion/src/stream.dart:236:27)
E/flutter (30576): <asynchronous suspension>
E/flutter (30576): 

I think the problems might relate to this block of code:

  void join(String sid, String uid) async {
    try {
      transports[RoleSub]!.pc!.onTrack = (RTCTrackEvent ev) {
        var remote = makeRemote(ev.streams[0], transports[RoleSub]!);
        ontrack?.call(ev.track, remote);
      };

      var pc = transports[RolePub]!.pc;
      if (pc != null) {
        var offer = await pc.createOffer({});
        await pc.setLocalDescription(offer);
        print('Step 1');
        var answer = await signal.join(sid, uid, offer);
        print('Step 2');                                         <-------- This line is never called
        await pc.setRemoteDescription(answer);
        transports[RolePub]!.hasRemoteDescription = true;
        transports[RolePub]!.candidates.forEach((c) => pc.addCandidate(c));
        pc.onRenegotiationNeeded = () => onnegotiationneeded();
      }
    } catch (e) {
      print('join: e => ${e.toString()}');
    }
  }

Error: Bad state: Cannot add event after closing

the rtc get a track also after room.leave(uid) and rtc.close();

_connector = Connector(IonConfig.IonHostHttp);
_room = Room(_connector!);
_rtc = RTC(_connector!);
_sig = room;
_uid = user;
close(){
_room?.leave(_uid!);
_room?.close();
_connector?.close();
}
when i join the same room again, the error :Error: Bad state: Cannot add event after closing

onPeerEvent not triggered upon joining a room

Your environment.

  • Flutter: 2.8.1
  • SDK Release: v1.0.0
  • Device: iOS and Android

What did you do?

Tested the ion-app-flutter with our own server. No modifications made to backend code. Audio and video work fine.

What did you expect?

Expected onPeerEvent to trigger for all users (those already in the room AND those who just joined) to retrieve Peer object for displaying user information.

What happened?

onPeerEvent is only triggered for users who are already in the room, not for the user joining. Once this user is in the room, onPeerEvent is triggered for every new user thereafter. This was not the behavior in previous releases (i.e. v0.5.4 and below)

If this is how it should behave, what method/listener should I rely on to get Peer information of existing users upon joining?

Side question - How can users update their Peer information (name, extrainfo, role, etc) and send the update to every user in the room?

Support for null safety

Flutter 2.0 is out with support for null safety in the stable branch. It would be really nice if ion-sdk-flutter supported sound null safety

Inverse camera

When I switched to the back camera using:
_localVideo.stream.getVideoTracks()[0].switchCamera();
the back camera display is inverse. Any solution to avoid this ?

nginx 配置websocket,被closed

nginx 配置websocket,room, rtc连接被closed,可能是因为room连接没有数据交互,被nginx closed,是否可以在websocket连接后,加入心跳消息, ping,pong message.

Add pre-made flutter app

About the native client of Android/iOS/macOS/Web,
We can use Google Flutter to build a native client outside the browser, which will allow the mobile/desktop to perfectly connect to the ion.

  • In the early stage, we can pre-compile APK or IPA using CodeMagic?
  • When we have the official ion service, we can upload the app to App Store and GooglePlay,

(Linux, Windows, Fuchsia will be supported in the future)

peer close

i cannot connect with ws sever

when connect http://$host:8443 then i revicive message peer close event and close , but change ws://$host:8443i have error unsppor ws protocol.

Please help me. Thanks

ontrack not being called/local track not being published

Your environment.

  • Version: Flutter v2.8.1
  • Browser: Chrome v97
  • flutter_ion v1.0.0
  • flutter_webrtc v0.7.0
  • my config.toml has ice server with same stun url setup, public ip for nat 1:1, I have the embedded turn server enabled as well, not sure if any of this is making a difference

What did you do?

I am running sfu-ion (./cmd/signal/json-rpc/main.go) on a ec2 instance and am able to connect fine using my own domain with caddy reverse proxy and websockets.

What did you expect?

When another peer joins the same session, I would expect ontrack to be called so I can get the remote stream

What happened?

When another peer joins the same session id, ontrack never gets called so I don't have the remote stream. This could be something very small I am overlooking, but can't seem to figure out what I am missing.

Screenshots
Capture2

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
Dockerfile
  • debian stretch
github-actions
.github/workflows/build.yml
  • actions/checkout v2
  • actions/setup-java v1
  • subosito/flutter-action v1.5.3
pub
example/pubspec.yaml
  • cupertino_icons ^1.0.0
  • flutter no version found
  • flutter_icons ^1.0.0
  • flutter_ion no version found
  • flutter_test no version found
pubspec.yaml
  • events2 ^1.0.0
  • flutter_webrtc ^0.7.0
  • grpc ^3.0.0
  • protobuf ^2.0.0
  • sdp_transform ^0.3.2
  • uuid ^3.0.4
  • web_socket_channel ^2.1.0
  • flutter_test no version found
  • pedantic ^1.11.1
  • test ^1.16.8

  • Check this box to trigger a request for Renovate to run again on this repository

用release模式编译apk,运行出现的问题

Your environment.

  • Flutter Version:2.10.1
  • Dart Version:2.16.1

What did you do?

example 示例代码,如果以debug方式运行,一切正常
但是用release方式打包apk运行,会停滞在
await _rtc.join(_room, _uid, JoinConfig());
这句一直等待,最后一条收到的状态是:
D/FlutterWebRTCPlugin: onIceGatheringChange GATHERING
一直都没有COMPLETE消息,但是如果取消await关键字来调用
_rtc.join(_room, _uid, JoinConfig());
不等待的话,就可以正常通讯,也可以收到COMPLETE消息
我还试着clone了[ion-app-flutter]项目来以release方式打包,出现了一样的问题,也是在rtc.join时候卡住,但是debug模式却正常

What did you expect?

不知道是我环境问题,还是什么问题?我需要如何解决这个问题

Setting your role on the server

Summary

I want to init a client and set its role on the session (Publisher or Subscriber or both).
A publisher will only send data.
A subscriber will only receive data.

Motivation

I want to create an app where theres 1 subscriber and multiple publishers but I want them all on the same session.
There are N publishers and 1 subscriber.
I want the server to only route the video of the publishers to the subscriber, and not to the other publishers since they are not going to consume any video, only send.

Describe alternatives you've considered

client.create({
 sid: sid,
 uid: uid,
 signal: signal,
 role: role // Maybe this can be an array of roles
});

Example app crashes when captureFrame is invoked

Your environment.

  • Flutter version: Flutter (Channel master, v1.18.1-pre.9, on Mac OS X 10.15.1 19B88, locale en-RS)
  • Android studio details:
Android Studio 3.6.1
Build #AI-192.7142.36.36.6241897, built on February 27, 2020
Runtime version: 1.8.0_212-release-1586-b4-5784211 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.15.1
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Registry: ide.new.welcome.screen.force=true, ide.mac.allowDarkWindowDecorations=true, debugger.showTypes=false, ide.balloon.shadow.size=0

What did you do?

Due to our project requirements, we need to have an ability for a user to take a photo during video calls and send that image to the other participants. In order to do something like that we explored multiple approaches and the only viable approach would be to use captureFrame(path) method that Flutter WebRTC provides on local video MediaStreamTrack. The main reason for such a decision is that Ion SDK "locks" the camera even when you disabled it, and you can't open a second session for that camera until local video stream is connected. It would be very bad UX that user just disappears when he wants to take the photo and that is why we chose to utilize captureFrame(path) method since it exists.

In order to do something like this we simply changed in your example project in pubspec.yaml we added a dependency:

path_provider:

and in the meeting_page.dart:

//Switch local camera
  _switchCamera() async {
    if (_localVideo != null && _localVideo.stream.getVideoTracks().length > 0) {
      //_localVideo.stream.getVideoTracks()[0].switchCamera();
      final storagePath = await getTemporaryDirectory();
      final filePath = storagePath.path + '/test.jpg';
      _localVideo.stream.getVideoTracks()[0].captureFrame(filePath);
    } else {
      _showSnackBar(":::Unable to switch the camera:::");
    }
  }

In ios/Runner/Info.plist we added:

<key>NSPhotoLibraryAddUsageDescription</key>
<string>write</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>write</string>

What did you expect?

Application should capture a frame and save it in the JPG file.

What happened?

The application crashed without any stacktrace when run on iOS 13.2.

We also tested the official Web RTC sample which supports captureFrame and it worked as expected without any crash.

Flutter web support & cast

Flutter Web

It would be nice if it directly supports flutter web

Flutter Android/iOS

How can I share my mobile screen between peers?

能否更新项目的依赖到最新版,以确保稳定性(偶尔会崩溃的问题),拜托了

Summary

One paragraph explanation of the feature.

Motivation

Why are we doing this? What use cases does it support? What is the expected outcome? Is this available in other implementations? Can this not be implemented using primitives?

Describe alternatives you've considered

A clear and concise description of the alternative solutions you've considered.

Additional context

Add any other context or screenshots about the feature request here.

[web] Event emitter causing error in release builds and alternative browsers -- workaround found

When connecting and on subsequent client connections, the web app throws an uncaught type error. Chrome points to zone.dart line 1175, firefox does the same but points to client.dart line 487.

Reopened in sdk as this issue is caused by the event emitter library, events2. I was able to fix by changing the dependency and converting the library to use https://pub.dev/packages/eventify. This workaround is not viable for most users, but does resolve the problem.

Your environment.

  • Version: 6512fefd01d606662228b838a8196ffff6c9ae1a
  • Browser: issue persists

What did you do?

flutter create .
flutter build web --release
host it

Chrome

Uncaught TypeError: func.call$1 is not a function
    at Client.callback$7 (event_emitter.dart:29)
    at EventEmitter_emit_closure.call$1 (event_emitter.dart:64)
    at Interceptor.forEach$1 (js_array.dart:257)
    at Object.forEach$1$ax (main.dart.js:7204)
    at Client.emit$5 (event_emitter.dart:63)
    at Client._handleNotification$1 (client.dart:506)
    at Object.eval (eval at Closure_forwardCallTo (js_helper.dart:2182), <anonymous>:3:41)
    at Peer.callback$7 (event_emitter.dart:29)
    at EventEmitter_emit_closure.call$1 (event_emitter.dart:64)
    at Interceptor.forEach$1 (js_array.dart:257)

Firefox:

Uncaught Error: undefined
    wrapException js_helper.dart:1129
    firstWhere$2$orElse js_array.dart:327
    firstWhere$1 main.dart.js:40658
    2 meeting_page.dart:64
    protected main.dart.js:7440
    call$2 async_patch.dart:340
    _asyncStartSync async_patch.dart:245
    call$2 meeting_page.dart:64
    callback$7 event_emitter.dart:32
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$3 main.dart.js:53619
    _handleNotification$1 client.dart:514
    anonymous main.dart.js line 4671 > Function:3
    callback$7 event_emitter.dart:29
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$2 main.dart.js:53613
    call$1 peer.dart:120
    callback$7 event_emitter.dart:29
    call$1 event_emitter.dart:64
    forEach$1 js_array.dart:257
    forEach$1$ax main.dart.js:7204
    emit$5 event_emitter.dart:63
    emit$2 main.dart.js:53613
    call$1 main.dart.js:102223
    1 websocket_web_impl.dart:36
    protected main.dart.js:7440
    call$2 async_patch.dart:340
    _asyncStartSync async_patch.dart:245
    $call$body$WebSocketImpl_connect_closure websocket_web_impl.dart:30
    call$1 websocket_web_impl.dart:30
    call$1 html_dart2js.dart:37188
    invokeClosure js_helper.dart:1825
    function main.dart.js:4533

What did you expect?

I expected it to join the room and conferencing to work.

What happened?

Client joins but hangs at waiting for others to join. You can see your own camera and hear your own audio, but you cannot hear any other participants as they never show joined to the room. The SFU logs indicate multiple peers are connected, and publishing.

image

摄像头在挂断视频会议后仍然被调用

安卓环境下:
摄像头在挂断视频会议后仍然会被调用。控制台还能看到输出的本地视频流的信息

I/org.webrtc.Logging(16416): EglRenderer: Duration: 4007 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

chrome for pc and firefox for mobile can't see video or hear audio from each other.

Your environment.

mac 10.14.5
chrome pc 83.0.* (64bit)
firefox mobile
vscode 1.47.0

What did you do?

1.git clone https://github.com/pion/ion-app-flutter.git
2.cd ion-app-flutter
3.flutter build web --release
4.copy ion-app-flutter/build/web to nginx web directory
5. bind https://***.com, and set ssl

What did you expect?

chrome web open https://.com
firefox mobile open https://
.com

What happened?

They can't see video or hear audio from each other, but can chat to each other

Call _sfu?.publish first, then call (_stream as ion.LocalStream).unpublish(), and then call _sfu?.publish to report an error

_sfu?.publish(localStream1);
localStream1.unpublish();
_sfu?.publish(localStream2);

27416): [ion-sdk-flutter] ERROR: onnegotiationneeded: e => Bad state: Too many elements #0 ListMixin.singleWhere (dart:collection/list.dart:191:11)
I/flutter (27416): #1 CodecCapabilitySelector._mline (package:flutter_ion/src/utils.dart:97:18)
I/flutter (27416): #2 CodecCapabilitySelector.getCapabilities (package:flutter_ion/src/utils.dart:69:17)
I/flutter (27416): #3 Client.setPreferredCodec (package:flutter_ion/src/client.dart:231:24)
I/flutter (27416): #4 Client.onnegotiationneeded (package:flutter_ion/src/client.dart:217:9)
I/flutter (27416):
I/flutter (27416): #5 Client.publish (package:flutter_ion/src/client.dart:127:5)
I/flutter (27416):
I/flutter (27416): #6 RoomController.join. (package:room/pages/room_page.dart:208:11)
I/flutter (27416):
I/flutter (27416): v=0
I/flutter (27416): o=- 4428287673785843710 5 IN IP4 127.0.0.1
I/flutter (27416): s=-
I/flutter (27416): t=0 0
I/flutter (27416): a=group:BUNDLE 0 1 3

Camera is not disposing

I am using the sample app. When I hand the call on android. The camera is still on. I can see the logs

I/org.webrtc.Logging( 406): EglRenderer: Duration: 4002 ms. Frames received: 0. Dropped: 0. Rendered: 0. Render fps: .0. Average render time: NA. Average swapBuffer time: NA.

I/org.webrtc.Logging( 406): CameraStatistics: Camera fps: 31.

How to create handlers in current null safe version.

What did you do?

// Setup handlers
client.on('peer-join', (rid, id, info) async {});

client.on('peer-leave', (rid, id) async {});

client.on('transport-open', () {}));

client.on('transport-closed', () {});

client.on('stream-add', (rid, mid, info, tracks) async {
// handle stream-add
});

client.on('stream-remove', (rid, mid) async {
// handle stream-remove
});

client.on('broadcast', (rid, uid, info) async {
// handle broadcast
});

What did you expect?

I need to know how to handle these request in Current version. In current version there is only ontrack?

Unhandled Exception: Bad state: Cannot add event after closing

This is full error log.

[ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Bad state: Cannot add event after closing
#0      _StreamController.add (dart:async/stream_controller.dart:553:24)
#1      GRPCWebSignal.trickle (package:flutter_ion/src/signal/signal_grpc_impl.dart:132:20)
#2      Transport.create.<anonymous closure> (package:flutter_ion/src/client.dart:45:14)
#3      RTCPeerConnectionNative.eventListener (package:flutter_webrtc/src/native/rtc_peerconnection_impl.dart:102:25)
#4      _rootRunUnary (dart:async/zone.dart:1362:47)
#5      _CustomZone.runUnary (dart:async/zone.dart:1265:19)
#6      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)
#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#8      _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#9      _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
#10     _PendingEvents.schedule.<anonymous closure> (dart:async/stream_impl.dart:663:7)
#11     _rootRun (dart:async/zone.dart:1346:47)
#12     _CustomZone.run (dart:async/zone.dart:1258:19)
#13     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#14     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
#15     _rootRun (dart:async/zone.dart:1354:13)
#16     _CustomZone.run (dart:async/zone.dart:1258:19)
#17     _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
#19     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#20     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

This is flutter doctor

[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19043.1110], locale en-US)
    • Flutter version 2.2.3 at C:\src\flutter
    • Framework revision f4abaa0735 (5 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\omshivay\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\omshivay\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    • All Android licenses accepted.

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

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)

[√] Connected device (3 available)
    • SM A500G (mobile) • ee1ddaed • android-arm    • Android 6.0.1 (API 23)
    • Chrome (web)      • chrome   • web-javascript • Google Chrome 92.0.4515.131
    • Edge (web)        • edge     • web-javascript • Microsoft Edge 92.0.902.62

• No issues found!

I am using
flutter_ion: ^0.5.1

run pubsub_view throw ice candidate exception

signal server is latest version ion from master branch
ion.JsonRPCSignal('wss://ip:8443/ws?uid=uuid');

debug with chrome

[ion-sdk-flutter] DEBUG: msg: {"id":"1f924ff8-b9a2-4ce0-9605-27d55c094474","result":{"type":"answer","sdp":"v=0\r\no=- 4866327441167300290 1607673876 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=fingerprint:sha-256 23:09:0D:BF:64:D4:18:83:DA:AA:5B:04:78:54:19:40:CF:97:2E:C7:9F:12:88:D3:4E:6F:58:BF:1C:22:17:A5\r\na=group:BUNDLE 0\r\nm=application 9 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=setup:active\r\na=mid:0\r\na=sendrecv\r\na=sctpmap:5000 webrtc-datachannel 1024\r\na=ice-ufrag:qilePTdhhPsHBOiG\r\na=ice-pwd:DSfSezGroySAPKMCmIaXedWTbJVNQnDQ\r\n"},"jsonrpc":"2.0"}

errors.dart:167 Uncaught (in promise) Error: OperationError: Error processing ICE candidate

at Object.createErrorWithStack (errors.dart:249)
at Object._rethrow (async_patch.dart:200)
at async._AsyncCallbackEntry.new.callback (zone.dart:1171)
at Object._microtaskLoop (schedule_microtask.dart:41)
at _startMicrotaskLoop (schedule_microtask.dart:50)
at async_patch.dart:166

[ion-sdk-flutter] DEBUG: send: {"method":"trickle","params":{"target":0,"candidate":{"candidate":"candidate:4193552346 1 udp 1685987071 218.241.217.42 63938 typ srflx raddr 192.168.108.49 rport 63938 generation 0 ufrag FLU7 network-id 2 network-cost 10","sdpMid":"2","sdpMLineIndex":2}}}
errors.dart:167 Uncaught (in promise) Error: Expected a value of type 'String', but got one of type 'DomException'
at Object.throw_ [as throw] (errors.dart:216)
at Object.castError (errors.dart:64)
at Object.cast [as as] (operations.dart:442)
at Function.as (core_patch.dart:650)
at logger.Logger.new.error (logger.dart:7)
at client$.Client.new.onnegotiationneeded (client.dart:163)
at onnegotiationneeded.throw ()
at async_patch.dart:60
at _RootZone.runBinary (zone.dart:1451)
at _FutureListener.thenAwait.handleError (future_impl.dart:157)
at handleError (future_impl.dart:708)
at Function._propagateToListeners (future_impl.dart:729)
at _Future.new.[_completeError] (future_impl.dart:537)
at async._AsyncCallbackEntry.new.callback (future_impl.dart:593)
at Object._microtaskLoop (schedule_microtask.dart:41)
at _startMicrotaskLoop (schedule_microtask.dart:50)
at async_patch.dart:166

Feature Request

I can see the repo has very few updates please maintain this
Kindly provide us with features like the following.

  1. Audio switching between Bluetooth, mic, speakerphone
  2. auto Reconnect and reconnecting call back on Network issues
  3. Media sharing /casting option
  4. way to mention higher quality on audio.

Cant connect to room

Your environment.

  • Version: Flutter beta, v1.17.0-3.4.pre
  • Browser: Android pixel 2 emulator used
  • Other Information - "
    I/flutter (16411): [protoo-client] DEBUG: connecting to WebSocket https://pionion.org:8443/ws?peer=da0c2103-3862-4b51-834a-398601f8677a
    I/flutter (16411): [Logger::Dart::WebSocket] DEBUG: connect https://pionion.org:8443/ws?peer=da0c2103-3862-4b51-834a-398601f8677a, {}, null
    I/flutter (16411): [Logger::Dart::WebSocket] ERROR: error SocketException: OS Error: Connection refused, errno = 111, address = pionion.org, port = 40104
    I/flutter (16411): [protoo-client] DEBUG: emit "error" [currentAttempt:NoSuchMethodError: The getter 'closeCode' was called on null.
    I/flutter (16411): Receiver: null
    I/flutter (16411): Tried calling: closeCode]
    "

What did you do?

Run the example code with no modifications

What did you expect?

The project to allow me to join a room

What happened?

The project output a connection error to the pion websocket.

How do we know remote stream which has been removed

Hi author, I notice in flutter-webrtc's example they have a method onRemoveRemoteStream to know remote stream has been removed. But I try found the same method in your lib, it doesn't exist. Please help me if I miss something.
Screen Shot 2020-12-01 at 14 21 32

Released apk build wont run at all

to replicate

dont code anything just add it in dependency

flutter_ion: ^0.1.2

terminal

flutter pub get
flutter build apk --release

run the apk.
the app wont run at all.
is there additional configuration for released apps?

[√] Flutter (Channel master, 1.19.0-2.0.pre, on Microsoft Windows [Version 10.0.17763.1217], locale en-US)
• Flutter version 1.19.0-2.0.pre at C:\flutter
• Framework revision 721927efd3 (4 weeks ago), 2020-05-21 17:52:02 -0700
• Engine revision 9ce1e5c5c7
• Dart version 2.9.0 (build 2.9.0-10.0.dev 7706afbcf5)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\Eleo\AppData\Local\Android\sdk
• Platform android-R, 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 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.45.1)
• VS Code at C:\Users\Eleo\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.11.0

[√] Connected device (3 available)
• SM G988B • R5CN20CC82P • android-arm64 • Android 10 (API 29)
• Web Server • web-server • web-javascript • Flutter Tools
• Chrome • chrome • web-javascript • Google Chrome 83.0.4103.106

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.