Browse Source

fix(remoteVideo): Attaching video stream.

master
Hristo Terezov 5 years ago
parent
commit
99de9d0bfa

+ 26
- 5
modules/UI/videolayout/RemoteVideo.js View File

7
 import { I18nextProvider } from 'react-i18next';
7
 import { I18nextProvider } from 'react-i18next';
8
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
8
 import { AtlasKitThemeProvider } from '@atlaskit/theme';
9
 
9
 
10
+import { createThumbnailOffsetParentIsNullEvent, sendAnalytics } from '../../../react/features/analytics';
10
 import { i18next } from '../../../react/features/base/i18n';
11
 import { i18next } from '../../../react/features/base/i18n';
11
 import {
12
 import {
12
     JitsiParticipantConnectionStatus
13
     JitsiParticipantConnectionStatus
512
 
513
 
513
     $(streamElement).hide();
514
     $(streamElement).hide();
514
 
515
 
515
-    // If the container is currently visible
516
-    // we attach the stream to the element.
517
-    if (!isVideo || (this.container.offsetParent !== null && isVideo)) {
518
-        this.waitForPlayback(streamElement, stream);
519
-        stream.attach(streamElement);
516
+    this.waitForPlayback(streamElement, stream);
517
+    stream.attach(streamElement);
518
+
519
+    // TODO: Remove once we verify that this.container.offsetParent === null was the reason for not attached video
520
+    // streams to the thumbnail.
521
+    if (isVideo && this.container.offsetParent === null) {
522
+        sendAnalytics(createThumbnailOffsetParentIsNullEvent(this.id));
523
+        const parentNodesDisplayProps = [
524
+            '#filmstripRemoteVideosContainer',
525
+            '#filmstripRemoteVideos',
526
+            '#remoteVideos',
527
+            '.filmstrip',
528
+            '#videospace',
529
+            '#videoconference_page',
530
+            '#react'
531
+        ].map(selector => `${selector} - ${$(selector).css('display')}`);
532
+        const videoConferencePageParent = $('#videoconference_page').parent();
533
+        const reactDiv = document.getElementById('react');
534
+
535
+        parentNodesDisplayProps.push(
536
+            `${videoConferencePageParent.attr('class')} - ${videoConferencePageParent.css('display')}`);
537
+        parentNodesDisplayProps.push(`this.container - ${this.$container.css('display')}`);
538
+        logger.debug(`this.container.offsetParent is null [user: ${this.id}, ${
539
+            parentNodesDisplayProps.join(', ')}, #react.offsetParent - ${
540
+            reactDiv && reactDiv.offsetParent !== null ? 'not null' : 'null'}]`);
520
     }
541
     }
521
 
542
 
522
     if (!isVideo) {
543
     if (!isVideo) {

+ 15
- 0
react/features/analytics/AnalyticsEvents.js View File

692
     };
692
     };
693
 }
693
 }
694
 
694
 
695
+/**
696
+ * Creates an event that indicates the thumbnail offset parent is null.
697
+ *
698
+ * @param {string} id - The id of the user related to the thumbnail.
699
+ * @returns {Object} The event in a format suitable for sending via sendAnalytics.
700
+ */
701
+export function createThumbnailOffsetParentIsNullEvent(id) {
702
+    return {
703
+        action: 'OffsetParentIsNull',
704
+        attributes: {
705
+            id
706
+        }
707
+    };
708
+}
709
+
695
 /**
710
 /**
696
  * Creates an event associated with a toolbar button being clicked/pressed. By
711
  * Creates an event associated with a toolbar button being clicked/pressed. By
697
  * convention, where appropriate an attribute named 'enable' should be used to
712
  * convention, where appropriate an attribute named 'enable' should be used to

Loading…
Cancel
Save