multiple video stream WiP
This commit is contained in:
parent
29eb9452c0
commit
bfd37bb087
|
@ -105,6 +105,7 @@ import {
|
||||||
updateSettings
|
updateSettings
|
||||||
} from './react/features/base/settings';
|
} from './react/features/base/settings';
|
||||||
import {
|
import {
|
||||||
|
addLocalTrack,
|
||||||
createLocalPresenterTrack,
|
createLocalPresenterTrack,
|
||||||
createLocalTracksF,
|
createLocalTracksF,
|
||||||
destroyLocalTracks,
|
destroyLocalTracks,
|
||||||
|
@ -1911,7 +1912,24 @@ export default {
|
||||||
|
|
||||||
if (desktopVideoStream) {
|
if (desktopVideoStream) {
|
||||||
logger.debug(`_switchToScreenSharing is using ${desktopVideoStream} for useVideoStream`);
|
logger.debug(`_switchToScreenSharing is using ${desktopVideoStream} for useVideoStream`);
|
||||||
await this.useVideoStream(desktopVideoStream);
|
await new Promise((resolve, reject) => {
|
||||||
|
_replaceLocalVideoTrackQueue.enqueue(onFinish => {
|
||||||
|
APP.store.dispatch(
|
||||||
|
addLocalTrack(desktopVideoStream))
|
||||||
|
.then(() => {
|
||||||
|
this._setSharingScreen(desktopVideoStream);
|
||||||
|
|
||||||
|
// TODO FIXME
|
||||||
|
// this.setVideoMuteStatus();
|
||||||
|
})
|
||||||
|
.then(resolve)
|
||||||
|
.catch(error => {
|
||||||
|
logger.error(`_switchToScreenSharing failed: ${error}`);
|
||||||
|
reject(error);
|
||||||
|
})
|
||||||
|
.then(onFinish);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._desktopAudioStream) {
|
if (this._desktopAudioStream) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import {
|
||||||
sendAnalytics
|
sendAnalytics
|
||||||
} from '../../analytics';
|
} from '../../analytics';
|
||||||
import { NOTIFICATION_TIMEOUT_TYPE, showErrorNotification, showNotification } from '../../notifications';
|
import { NOTIFICATION_TIMEOUT_TYPE, showErrorNotification, showNotification } from '../../notifications';
|
||||||
|
import { getCurrentConference } from '../conference';
|
||||||
import { JitsiTrackErrors, JitsiTrackEvents, createLocalTrack } from '../lib-jitsi-meet';
|
import { JitsiTrackErrors, JitsiTrackEvents, createLocalTrack } from '../lib-jitsi-meet';
|
||||||
import {
|
import {
|
||||||
CAMERA_FACING_MODE,
|
CAMERA_FACING_MODE,
|
||||||
|
@ -312,6 +313,19 @@ export function replaceLocalTrack(oldTrack, newTrack, conference) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line require-jsdoc
|
||||||
|
export function addLocalTrack(newTrack) {
|
||||||
|
return async (dispatch, getState) => {
|
||||||
|
const conference = getCurrentConference(getState());
|
||||||
|
|
||||||
|
if (conference) {
|
||||||
|
await conference.addTrack(newTrack);
|
||||||
|
}
|
||||||
|
|
||||||
|
return dispatch(_addTracks([ newTrack ]));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replaces a stored track with another.
|
* Replaces a stored track with another.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue