mirror of https://github.com/OpenVidu/openvidu.git
openvidu-browser: speechEvent.stop undefined fix
parent
edf5bf5fe9
commit
49360d9771
|
@ -452,12 +452,12 @@ export class Stream implements EventDispatcher {
|
||||||
* @hidden
|
* @hidden
|
||||||
*/
|
*/
|
||||||
disposeWebRtcPeer(): void {
|
disposeWebRtcPeer(): void {
|
||||||
if (this.webRtcPeer) {
|
if (!!this.webRtcPeer) {
|
||||||
const isSenderAndCustomTrack: boolean = !!this.outboundStreamOpts &&
|
const isSenderAndCustomTrack: boolean = !!this.outboundStreamOpts &&
|
||||||
typeof MediaStreamTrack !== 'undefined' && this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack;
|
typeof MediaStreamTrack !== 'undefined' && this.outboundStreamOpts.publisherProperties.videoSource instanceof MediaStreamTrack;
|
||||||
this.webRtcPeer.dispose(isSenderAndCustomTrack);
|
this.webRtcPeer.dispose(isSenderAndCustomTrack);
|
||||||
}
|
}
|
||||||
if (this.speechEvent) {
|
if (!!this.speechEvent && !!this.speechEvent.stop) {
|
||||||
this.speechEvent.stop();
|
this.speechEvent.stop();
|
||||||
delete this.speechEvent;
|
delete this.speechEvent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue