Jump to content
  • 0

Data Channel Error when one of the participant is close.


SL
 Share

Question

I have a web conference app it will throw Data Channel Error when one of the participant is close. Let said A is host, B & C is participants. When C close the browser, all data channel of the room is lost (So A cannot sent data to B), however the video remain fine.

Data Channel Error also occur In WebRTCAppEE/conference.html

Link to comment
Share on other sites

  • Answers 8
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

8 answers to this question

Recommended Posts

  • 0

I use /WebRTCAppEE/conference.html open 3 browser (let said A,B,C) and all join to the same room. And if one of the participant C close the browser, the host A and the participant B will lost the Data Channel connection and give this error 

Data Channel Error: RTCErrorEvent {isTrusted: true, error: RTCError: Transport channel closed, type: "error", target: RTCDataChannel, currentTarget: RTCDataChannel, …}

 

 

Untitled.thumb.jpg.2aef7599ece99091f099110bfdb030a9.jpg

Link to comment
Share on other sites

  • 0

No. It does lost data-channel connection. Using the /WebRTCAppEE/conference.html

If C exit then B try to Unmute local mic the sendNotificationEvent method return error and cannot use the sendData as well

function sendNotificationEvent(eventType) {
if(isDataChannelOpen) {
var notEvent = { streamId: publishStreamId, eventType:eventType };
webRTCAdaptor.sendData(publishStreamId, JSON.stringify(notEvent));
} else {
console.log("Could not send the notification because data channel is not open.");
}
}

 

Link to comment
Share on other sites

  • 0

I think is the Call back 'data_channel_opened' did not call again after C leave, so  the variable isDataChannelOpen still have a false value

callback: (info, obj) => {

 if (info === 'data_channel_opened') {
console.log('Data Channel open for stream id', obj)
this.isDataChannelOpen = true
} else if (info === 'data_channel_closed') {
console.log('Data Channel closed for stream id', obj)
this.isDataChannelOpen = false
}
}

Link to comment
Share on other sites

  • 0

I tried to reproduce this but i think it comes to point where i mentioned about it doesnt break data channel connection between A and B.

It shows this error because data channel in C is not available anymore. So it shows this error.

But data channel between A and B is not broken because they do not have such relation.
WebRTC does not work as mesh. A is not connected to B and C. There is a publisher and receiver.
So if you are publishing A, then you are playing B and C streams. This means A stream(which is the stream you publish) is not connected to the stream B or C.
You are just playing stream B or C in your client and publishing A.
When you stop playing C, its datachannel brokes and it gives the error you see.
To exemplify it, i modified conferece.html a bit to send datachannel message every 5 second.
I created 3 streams, let's name it A,B,C and i closed the tab C.
And still stream A and B continues to send data channel messages.
This is from A stream, as you can see it receives message from EyaRBi etc.

And this is from B stream, as you can see it receives message from TxKSBP etc.

Hope this clarifies your worries.
Best Regards,
Enes.

 

 

 

 

A.png.91f1d7d8651c9615d22e29d18b5bb7ac.png

B.png.8c57b44ecfb840eb5bd7f1a40e1a4ea8.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share


×
×
  • Create New...