Ver código fonte

[RN] Fix for creating video track when conference is ending.

master
Daniel Ornelas 7 anos atrás
pai
commit
ad259988b9

+ 10
- 4
react/features/base/conference/actions.js Ver arquivo

451
  *
451
  *
452
  * @param {boolean} audioOnly - True if the conference should be audio only;
452
  * @param {boolean} audioOnly - True if the conference should be audio only;
453
  * false, otherwise.
453
  * false, otherwise.
454
+ * @param {boolean} ensureVideoTrack - Define if conference should ensure
455
+ * to create a video track.
454
  * @returns {{
456
  * @returns {{
455
  *     type: SET_AUDIO_ONLY,
457
  *     type: SET_AUDIO_ONLY,
456
- *     audioOnly: boolean
458
+ *     audioOnly: boolean,
459
+ *     ensureVideoTrack: boolean
457
  * }}
460
  * }}
458
  */
461
  */
459
-export function setAudioOnly(audioOnly: boolean) {
462
+export function setAudioOnly(
463
+        audioOnly: boolean,
464
+        ensureVideoTrack: boolean = false) {
460
     return {
465
     return {
461
         type: SET_AUDIO_ONLY,
466
         type: SET_AUDIO_ONLY,
462
-        audioOnly
467
+        audioOnly,
468
+        ensureVideoTrack
463
     };
469
     };
464
 }
470
 }
465
 
471
 
665
     return (dispatch: Dispatch<*>, getState: Function) => {
671
     return (dispatch: Dispatch<*>, getState: Function) => {
666
         const { audioOnly } = getState()['features/base/conference'];
672
         const { audioOnly } = getState()['features/base/conference'];
667
 
673
 
668
-        return dispatch(setAudioOnly(!audioOnly));
674
+        return dispatch(setAudioOnly(!audioOnly, true));
669
     };
675
     };
670
 }
676
 }

+ 1
- 1
react/features/base/conference/middleware.js Ver arquivo

273
         setVideoMuted(
273
         setVideoMuted(
274
             newValue,
274
             newValue,
275
             VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY,
275
             VIDEO_MUTISM_AUTHORITY.AUDIO_ONLY,
276
-            /* ensureTrack */ true));
276
+            action.ensureVideoTrack));
277
 
277
 
278
     if (typeof APP !== 'undefined') {
278
     if (typeof APP !== 'undefined') {
279
         // TODO This should be a temporary solution that lasts only until video
279
         // TODO This should be a temporary solution that lasts only until video

+ 1
- 1
react/features/base/media/middleware.js Ver arquivo

162
     sendAnalytics(createStartAudioOnlyEvent(audioOnly));
162
     sendAnalytics(createStartAudioOnlyEvent(audioOnly));
163
     logger.log(`Start audio only set to ${audioOnly.toString()}`);
163
     logger.log(`Start audio only set to ${audioOnly.toString()}`);
164
 
164
 
165
-    dispatch(setAudioOnly(audioOnly));
165
+    dispatch(setAudioOnly(audioOnly, false));
166
 
166
 
167
     return next(action);
167
     return next(action);
168
 }
168
 }

+ 1
- 1
react/features/base/settings/middleware.js Ver arquivo

55
         { dispatch },
55
         { dispatch },
56
         { settings: { startAudioOnly } }) {
56
         { settings: { startAudioOnly } }) {
57
     if (typeof startAudioOnly === 'boolean') {
57
     if (typeof startAudioOnly === 'boolean') {
58
-        dispatch(setAudioOnly(startAudioOnly));
58
+        dispatch(setAudioOnly(startAudioOnly, true));
59
     }
59
     }
60
 }
60
 }
61
 
61
 

Carregando…
Cancelar
Salvar