Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds check for datachanel state before sending data.

hristoterezov386e10a966dd
diff --git a/app.js b/app.js
index 543f5c35ce..9279fe275d 100644
--- a/app.js
+++ b/app.js
@@ -1440,7 +1440,7 @@ $(document).bind('fatalError.jingle',
function onSelectedEndpointChanged(userJid)
{
console.log('selected endpoint changed: ', userJid);
- if (_dataChannels && _dataChannels.length != 0) {
+ if (_dataChannels && _dataChannels.length != 0 && _dataChannels[0].readyState == "open") {
_dataChannels[0].send(JSON.stringify({
'colibriClass': 'SelectedEndpointChangedEvent',
'selectedEndpoint': (!userJid || userJid == null)