Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SignalR WebRTC WebSocket is already in CLOSING or CLOSED state

I wanted to take a test run of the simplest implementation of SignalR and WebRTC. I hosted the code in https://github.com/foyzulkarim/WebRtc

I made two different files "index.html" and "index1.html". In index.html I broadcasted a video file through signalr and it went very well. But when I just replace existing video file with WebCam's feed, it started getting error.

After running couple of second I start getting this error "WebSocket is already in CLOSING or CLOSED state." I tried to throttle but no change, still get the error. Any idea why it might happening?

Error image enter image description here

You can check the video i http://1drv.ms/1meM1OI

like image 862
Foyzul Karim Avatar asked Jul 19 '14 04:07

Foyzul Karim


1 Answers

The message size seems to be the key problem here.

In your project, every frame of video is about 40k but every frame of cam is more than 140K. Actually, in index.html when you broadcast the video, after about 20s, there will be several frames larger than 70k which will also give you the same error.

I tried sending some long string messages as a test, and I do get errors when the message is longer than a certain value. However, I was not able to find in the documentation a definite limitation of message length or message density.

like image 85
Adamus Avatar answered Nov 20 '22 03:11

Adamus