Bläddra i källkod

fix(tile-view): prevent local participant being selected on pin exit

On tile view enter/exit, local video is moved in the DOM (an effect
of not being reactified and moving being easier) and play is called
on its video element. The race condition setup is such: in tile
view with other participants and local video is on large (not
visible in the UI but visible in the app state and pip popout).
The race is such: pin a remote video, large video update is queued,
tile view is exited, local video is moved, play is called,,
onVideoPlaying callback executed, middleware fires mute update,
which checks if local is on large (it is), previous large video
update is cleared, and local is placed on large.

The fix is ensuring the redux representation of local video is
passed in, which holds the boolean videoStarted, which prevents
the onVideoPlaying callback from firing on subsequent plays.
master
Leonard Kim 6 år sedan
förälder
incheckning
001e8fe0a7
1 ändrade filer med 4 tillägg och 1 borttagningar
  1. 4
    1
      modules/UI/videolayout/LocalVideo.js

+ 4
- 1
modules/UI/videolayout/LocalVideo.js Visa fil

11
     getAvatarURLByParticipantId
11
     getAvatarURLByParticipantId
12
 } from '../../../react/features/base/participants';
12
 } from '../../../react/features/base/participants';
13
 import { updateSettings } from '../../../react/features/base/settings';
13
 import { updateSettings } from '../../../react/features/base/settings';
14
+import { getLocalVideoTrack } from '../../../react/features/base/tracks';
14
 import { shouldDisplayTileView } from '../../../react/features/video-layout';
15
 import { shouldDisplayTileView } from '../../../react/features/video-layout';
15
 /* eslint-enable no-unused-vars */
16
 /* eslint-enable no-unused-vars */
16
 
17
 
292
  */
293
  */
293
 LocalVideo.prototype._updateVideoElement = function() {
294
 LocalVideo.prototype._updateVideoElement = function() {
294
     const localVideoContainer = document.getElementById('localVideoWrapper');
295
     const localVideoContainer = document.getElementById('localVideoWrapper');
296
+    const videoTrack
297
+        = getLocalVideoTrack(APP.store.getState()['features/base/tracks']);
295
 
298
 
296
     ReactDOM.render(
299
     ReactDOM.render(
297
         <Provider store = { APP.store }>
300
         <Provider store = { APP.store }>
298
             <VideoTrack
301
             <VideoTrack
299
                 id = 'localVideo_container'
302
                 id = 'localVideo_container'
300
-                videoTrack = {{ jitsiTrack: this.videoStream }} />
303
+                videoTrack = { videoTrack } />
301
         </Provider>,
304
         </Provider>,
302
         localVideoContainer
305
         localVideoContainer
303
     );
306
     );

Laddar…
Avbryt
Spara