prevent sending of displayName if RTCPeer is not connected
This commit is contained in:
parent
cdfbc7a2df
commit
660e523263
2 changed files with 10 additions and 0 deletions
|
@ -694,6 +694,11 @@ class RTCPeer extends Peer {
|
||||||
_isConnecting() {
|
_isConnecting() {
|
||||||
return this._channel && this._channel.readyState === 'connecting';
|
return this._channel && this._channel.readyState === 'connecting';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendDisplayName(displayName) {
|
||||||
|
if (!this._isConnected()) return;
|
||||||
|
super.sendDisplayName(displayName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PeersManager {
|
class PeersManager {
|
||||||
|
|
|
@ -705,6 +705,11 @@ class RTCPeer extends Peer {
|
||||||
_isConnecting() {
|
_isConnecting() {
|
||||||
return this._channel && this._channel.readyState === 'connecting';
|
return this._channel && this._channel.readyState === 'connecting';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendDisplayName(displayName) {
|
||||||
|
if (!this._isConnected()) return;
|
||||||
|
super.sendDisplayName(displayName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class WSPeer extends Peer {
|
class WSPeer extends Peer {
|
||||||
|
|
Loading…
Reference in a new issue