Browse Source

fix(conference.js): crash on undefined this.localPresenterVideo

...if camera device is changed in the settings while screen sharing.
master
paweldomas 5 years ago
parent
commit
c8939a133d
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      conference.js

+ 2
- 2
conference.js View File

2179
 
2179
 
2180
                     // dispose the existing presenter track and create a new
2180
                     // dispose the existing presenter track and create a new
2181
                     // camera track.
2181
                     // camera track.
2182
-                    this.localPresenterVideo.dispose();
2182
+                    this.localPresenterVideo && this.localPresenterVideo.dispose();
2183
                     this.localPresenterVideo = null;
2183
                     this.localPresenterVideo = null;
2184
 
2184
 
2185
                     return this._createPresenterStreamEffect(height, cameraDeviceId)
2185
                     return this._createPresenterStreamEffect(height, cameraDeviceId)
2199
                     const { height } = this.localVideo.track.getSettings();
2199
                     const { height } = this.localVideo.track.getSettings();
2200
 
2200
 
2201
                     this._updateVideoDeviceId();
2201
                     this._updateVideoDeviceId();
2202
-                    this.localPresenterVideo.dispose();
2202
+                    this.localPresenterVideo && this.localPresenterVideo.dispose();
2203
                     this.localPresenterVideo = null;
2203
                     this.localPresenterVideo = null;
2204
                     this._createPresenterStreamEffect(height, cameraDeviceId);
2204
                     this._createPresenterStreamEffect(height, cameraDeviceId);
2205
 
2205
 

Loading…
Cancel
Save