mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: fix disposeWebRtcPeer exception when no WebRtcPeer is available
parent
8e07cfd3d5
commit
2fcf136fa3
|
@ -478,11 +478,12 @@ export class Stream {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
disposeWebRtcPeer(): void {
|
disposeWebRtcPeer(): void {
|
||||||
const webrtcId: string = this.webRtcPeer.id;
|
let webrtcId;
|
||||||
if (!!this.webRtcPeer) {
|
if (!!this.webRtcPeer) {
|
||||||
this.webRtcPeer.dispose();
|
this.webRtcPeer.dispose();
|
||||||
this.stopWebRtcStats();
|
webrtcId = this.webRtcPeer.id;
|
||||||
}
|
}
|
||||||
|
this.stopWebRtcStats();
|
||||||
logger.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + "RTCPeerConnection with id [" + webrtcId + "] from 'Stream' with id [" + this.streamId + '] is now closed');
|
logger.info((!!this.outboundStreamOpts ? 'Outbound ' : 'Inbound ') + "RTCPeerConnection with id [" + webrtcId + "] from 'Stream' with id [" + this.streamId + '] is now closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue