fix: Send SS stopped analytics event when SS was started in video mute state

This commit is contained in:
Jaya Allamsetty 2020-08-04 17:11:58 -04:00 committed by Jaya Allamsetty
parent ce286f9be8
commit bd64c14aaa
1 changed files with 2 additions and 4 deletions

View File

@ -1588,10 +1588,6 @@ export default {
if (didHaveVideo) {
promise = promise.then(() => createLocalTracksF({ devices: [ 'video' ] }))
.then(([ stream ]) => this.useVideoStream(stream))
.then(() => {
sendAnalytics(createScreenSharingEvent('stopped'));
logger.log('Screen sharing stopped.');
})
.catch(error => {
logger.error('failed to switch back to local video', error);
@ -1608,6 +1604,8 @@ export default {
return promise.then(
() => {
this.videoSwitchInProgress = false;
sendAnalytics(createScreenSharingEvent('stopped'));
logger.info('Screen sharing stopped.');
},
error => {
this.videoSwitchInProgress = false;