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