mediasoup_sample
mediasoup_sample copied to clipboard
Firefox problems
The sample works fine on chrome but on firefox, there are some problems
- easy fix: Firefox cannot use planB
- firefox has problems to reconnect. Scenario: (chrome or Firefox) streams Firefox watches: OK Chrome watches: OK
(chrome or Firefox) disconnects and reconnects and stream again Chrome watches OK Firefox watches KO !
NodeJS error: got Answer from id=rlkfCsyktr8HDBe-AAAd setRemoteDescription for Answer ERROR: InvalidStateError: invalid RTCSessionDescription.type [type:answer, signalingState:stable] at klass (/var/www/webtv.fr/node_modules/mediasoup/lib/errors.js:9:4) at RTCPeerConnectionUnifiedPlan.setRemoteDescription (/var/www/webtv.fr/node_modules/mediasoup/lib/webrtc/RTCPeerConnection/RTCPeerConnectionCommon.js:396:28) at handleAnswer (/var/www/webtv.fr/mganeko/mediasoup_sample_socketio_ssl.js:211:18) at Socket.incoming (/var/www/webtv.fr/mganeko/mediasoup_sample_socketio_ssl.js:108:7) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at Socket.onevent (/var/www/webtv.fr/node_modules/socket.io/lib/socket.js:330:8) at Socket.onpacket (/var/www/webtv.fr/node_modules/socket.io/lib/socket.js:290:12) at Client.ondecoded (/var/www/webtv.fr/node_modules/socket.io/lib/client.js:193:14) at Decoder.Emitter.emit (/var/www/webtv.fr/node_modules/component-emitter/index.js:134:20)
Firefox logs:
empty ice event
---sending sdp ---
sending SDP: Object { type: "answer", sdp: "v=0 o=mozilla...THIS_IS_SDPARTA-55.…", planb: false }
ICE failed, add a STUN server and see about:webrtc for more details
Thanks for your report. I am trying to reproduced the problem. Would you tell me some more information?
-
Which server are you using? a) mediasoup_sample_multi.js b) mediasoup_sample_multi_ssl.js c) mediasoup_sample_multi_socketio.js d) mediasoup_sample_multi_socketio_ssl.js
-
Which client html are you using? a) bidirectional video chat (index.html or variations) b) 1 way realtime streaming (talk.html, watch.html or extended version by you)
I do use c) (but slightly modified) You can test it directly on: https://webtv.fr/mediasoup
This works cool on chrome but will give you errors on firefox
- I used a modified version but tried a) and b) and still problems here is the version I do use: https://webtv.fr/mediasoup/node/server.js
I can also provide you SSH root access if it is easier.
I got some answers from the mediaSoup creator and here it is:
Please check https://github.com/versatica/mediasoup-demo/blob/master/server/lib/Room.js#L508 (note the peerconnection.reset() usage to avoid PeerConnection in wrong state when no answer is received for a sent re-offer).
Hi, did you find any clue for this firefox issue ? Regards
Thanks for your information.
I find a strange behavior with Firefox on my sample code. I am not sure if it is same as your situation.
I am afraid that it tokes time to figure out what is wrong.