Quellcode durchsuchen

fix(SharedVideo): Ensure shared video takes filmstrip into account

j8
Mihai-Andrei Uscat vor 4 Jahren
Ursprung
Commit
01a127b557
Es ist kein Account mit der E-Mail-Adresse des Committers verbunden
1 geänderte Dateien mit 18 neuen und 3 gelöschten Zeilen
  1. 18
    3
      react/features/shared-video/components/web/SharedVideo.js

+ 18
- 3
react/features/shared-video/components/web/SharedVideo.js Datei anzeigen

25
      */
25
      */
26
     clientWidth: number,
26
     clientWidth: number,
27
 
27
 
28
+    /**
29
+     * Whether the (vertical) filmstrip is visible or not.
30
+     */
31
+    filmstripVisible: boolean,
32
+
28
     /**
33
     /**
29
      * Is the video shared by the local user.
34
      * Is the video shared by the local user.
30
      *
35
      *
59
      * }}
64
      * }}
60
      */
65
      */
61
     getDimensions() {
66
     getDimensions() {
62
-        const { clientHeight, clientWidth } = this.props;
67
+        const { clientHeight, clientWidth, filmstripVisible } = this.props;
63
 
68
 
64
         let width;
69
         let width;
65
         let height;
70
         let height;
66
 
71
 
67
         if (interfaceConfig.VERTICAL_FILMSTRIP) {
72
         if (interfaceConfig.VERTICAL_FILMSTRIP) {
73
+            if (filmstripVisible) {
74
+                width = `${clientWidth - Filmstrip.getVerticalFilmstripWidth()}px`;
75
+            } else {
76
+                width = `${clientWidth}px`;
77
+            }
68
             height = `${clientHeight - getToolboxHeight()}px`;
78
             height = `${clientHeight - getToolboxHeight()}px`;
69
-            width = `${clientWidth - Filmstrip.getVerticalFilmstripWidth()}px`;
70
         } else {
79
         } else {
71
-            height = `${clientHeight - Filmstrip.getFilmstripHeight()}px`;
80
+            if (filmstripVisible) {
81
+                height = `${clientHeight - Filmstrip.getFilmstripHeight()}px`;
82
+            } else {
83
+                height = `${clientHeight}px`;
84
+            }
72
             width = `${clientWidth}px`;
85
             width = `${clientWidth}px`;
73
         }
86
         }
74
 
87
 
132
 function _mapStateToProps(state) {
145
 function _mapStateToProps(state) {
133
     const { ownerId, videoUrl } = state['features/shared-video'];
146
     const { ownerId, videoUrl } = state['features/shared-video'];
134
     const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
147
     const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
148
+    const { visible } = state['features/filmstrip'];
135
 
149
 
136
     const localParticipant = getLocalParticipant(state);
150
     const localParticipant = getLocalParticipant(state);
137
 
151
 
138
     return {
152
     return {
139
         clientHeight,
153
         clientHeight,
140
         clientWidth,
154
         clientWidth,
155
+        filmstripVisible: visible,
141
         isOwner: ownerId === localParticipant.id,
156
         isOwner: ownerId === localParticipant.id,
142
         sharedVideoId: videoUrl,
157
         sharedVideoId: videoUrl,
143
         sharedYoutubeVideoId: getYoutubeId(videoUrl)
158
         sharedYoutubeVideoId: getYoutubeId(videoUrl)

Laden…
Abbrechen
Speichern