Преглед изворни кода

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

master
Robert Pintilii пре 3 година
родитељ
комит
a97b700712
No account linked to committer's email address
2 измењених фајлова са 2 додато и 3 уклоњено
  1. 2
    2
      conference.js
  2. 0
    1
      react/features/base/tracks/middleware.js

+ 2
- 2
conference.js Прегледај датотеку

@@ -1551,7 +1551,7 @@ export default {
1551 1551
             APP.store.dispatch(toggleScreenshotCaptureSummary(false));
1552 1552
         }
1553 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 1556
         // It can happen that presenter GUM is in progress while screensharing is being turned off. Here it needs to
1557 1557
         // wait for that GUM to be resolved in order to prevent leaking the presenter track(this.localPresenterVideo
@@ -1614,7 +1614,7 @@ export default {
1614 1614
             () => {
1615 1615
                 this.videoSwitchInProgress = false;
1616 1616
                 sendAnalytics(createScreenSharingEvent('stopped',
1617
-                    timestamp === 0 ? null : (Date.now() / 1000) - timestamp));
1617
+                    duration === 0 ? null : duration));
1618 1618
                 logger.info('Screen sharing stopped.');
1619 1619
             },
1620 1620
             error => {

+ 0
- 1
react/features/base/tracks/middleware.js Прегледај датотеку

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

Loading…
Откажи
Сачувај