fix(tracks) Use duration from JitsiTrack (#10304)
This commit is contained in:
parent
bf36b22bbd
commit
a97b700712
|
@ -1551,7 +1551,7 @@ export default {
|
|||
APP.store.dispatch(toggleScreenshotCaptureSummary(false));
|
||||
}
|
||||
const tracks = APP.store.getState()['features/base/tracks'];
|
||||
const timestamp = getLocalVideoTrack(tracks)?.timestamp ?? 0;
|
||||
const duration = getLocalVideoTrack(tracks)?.jitsiTrack.getDuration() ?? 0;
|
||||
|
||||
// It can happen that presenter GUM is in progress while screensharing is being turned off. Here it needs to
|
||||
// wait for that GUM to be resolved in order to prevent leaking the presenter track(this.localPresenterVideo
|
||||
|
@ -1614,7 +1614,7 @@ export default {
|
|||
() => {
|
||||
this.videoSwitchInProgress = false;
|
||||
sendAnalytics(createScreenSharingEvent('stopped',
|
||||
timestamp === 0 ? null : (Date.now() / 1000) - timestamp));
|
||||
duration === 0 ? null : duration));
|
||||
logger.info('Screen sharing stopped.');
|
||||
},
|
||||
error => {
|
||||
|
|
|
@ -57,7 +57,6 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
// The devices list needs to be refreshed when no initial video permissions
|
||||
// were granted and a local video track is added by umuting the video.
|
||||
if (action.track.local) {
|
||||
action.track.timestamp = Date.now() / 1000;
|
||||
store.dispatch(getAvailableDevices());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue