mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 19:32:27 +00:00
feat(external-api) add command for setting camera facing mode (#13541)
- added command for setting the camera facing mode remotely - enhanced toggleVideo command to optionally accept the facing mode - fix(startSilent) do not create audio track when start silent
This commit is contained in:
@@ -50,8 +50,8 @@ import {
|
||||
} from '../../react/features/base/participants/functions';
|
||||
import { updateSettings } from '../../react/features/base/settings/actions';
|
||||
import { getDisplayName } from '../../react/features/base/settings/functions.web';
|
||||
import { toggleCamera } from '../../react/features/base/tracks/actions.any';
|
||||
import { isToggleCameraEnabled } from '../../react/features/base/tracks/functions';
|
||||
import { setCameraFacingMode } from '../../react/features/base/tracks/actions.web';
|
||||
import { CAMERA_FACING_MODE_MESSAGE } from '../../react/features/base/tracks/constants';
|
||||
import {
|
||||
autoAssignToBreakoutRooms,
|
||||
closeBreakoutRoom,
|
||||
@@ -395,12 +395,8 @@ function initCommands() {
|
||||
sendAnalytics(createApiEvent('film.strip.resize'));
|
||||
APP.store.dispatch(resizeFilmStrip(options.width));
|
||||
},
|
||||
'toggle-camera': () => {
|
||||
if (!isToggleCameraEnabled(APP.store.getState())) {
|
||||
return;
|
||||
}
|
||||
|
||||
APP.store.dispatch(toggleCamera());
|
||||
'toggle-camera': facingMode => {
|
||||
APP.store.dispatch(setCameraFacingMode(facingMode));
|
||||
},
|
||||
'toggle-camera-mirror': () => {
|
||||
const state = APP.store.getState();
|
||||
@@ -529,6 +525,18 @@ function initCommands() {
|
||||
logger.error('Failed sending endpoint text message', err);
|
||||
}
|
||||
},
|
||||
'send-camera-facing-mode-message': (to, facingMode) => {
|
||||
if (!to) {
|
||||
logger.warn('Participant id not set');
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
APP.conference.sendEndpointMessage(to, {
|
||||
name: CAMERA_FACING_MODE_MESSAGE,
|
||||
facingMode
|
||||
});
|
||||
},
|
||||
'overwrite-names': participantList => {
|
||||
logger.debug('Overwrite names command received');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user