浏览代码

fix(tracks) Use duration from JitsiTrack (#10304)

master
Robert Pintilii 3 年前
父节点
当前提交
a97b700712
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 2 次插入3 次删除
  1. 2
    2
      conference.js
  2. 0
    1
      react/features/base/tracks/middleware.js

+ 2
- 2
conference.js 查看文件

1551
             APP.store.dispatch(toggleScreenshotCaptureSummary(false));
1551
             APP.store.dispatch(toggleScreenshotCaptureSummary(false));
1552
         }
1552
         }
1553
         const tracks = APP.store.getState()['features/base/tracks'];
1553
         const tracks = APP.store.getState()['features/base/tracks'];
1554
-        const timestamp = getLocalVideoTrack(tracks)?.timestamp ?? 0;
1554
+        const duration = getLocalVideoTrack(tracks)?.jitsiTrack.getDuration() ?? 0;
1555
 
1555
 
1556
         // It can happen that presenter GUM is in progress while screensharing is being turned off. Here it needs to
1556
         // It can happen that presenter GUM is in progress while screensharing is being turned off. Here it needs to
1557
         // wait for that GUM to be resolved in order to prevent leaking the presenter track(this.localPresenterVideo
1557
         // wait for that GUM to be resolved in order to prevent leaking the presenter track(this.localPresenterVideo
1614
             () => {
1614
             () => {
1615
                 this.videoSwitchInProgress = false;
1615
                 this.videoSwitchInProgress = false;
1616
                 sendAnalytics(createScreenSharingEvent('stopped',
1616
                 sendAnalytics(createScreenSharingEvent('stopped',
1617
-                    timestamp === 0 ? null : (Date.now() / 1000) - timestamp));
1617
+                    duration === 0 ? null : duration));
1618
                 logger.info('Screen sharing stopped.');
1618
                 logger.info('Screen sharing stopped.');
1619
             },
1619
             },
1620
             error => {
1620
             error => {

+ 0
- 1
react/features/base/tracks/middleware.js 查看文件

57
         // The devices list needs to be refreshed when no initial video permissions
57
         // The devices list needs to be refreshed when no initial video permissions
58
         // were granted and a local video track is added by umuting the video.
58
         // were granted and a local video track is added by umuting the video.
59
         if (action.track.local) {
59
         if (action.track.local) {
60
-            action.track.timestamp = Date.now() / 1000;
61
             store.dispatch(getAvailableDevices());
60
             store.dispatch(getAvailableDevices());
62
         }
61
         }
63
 
62
 

正在加载...
取消
保存