mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
feat(external-api): Set blurred background from external api. (#15131)
Add setBlurredBackground command to external api. Co-authored-by: Axel Prola <axel.prola@equasens.com>
This commit is contained in:
@@ -32,6 +32,7 @@ import { isSupportedBrowser } from '../../react/features/base/environment/enviro
|
||||
import { parseJWTFromURLParams } from '../../react/features/base/jwt/functions';
|
||||
import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet';
|
||||
import { MEDIA_TYPE, VIDEO_TYPE } from '../../react/features/base/media/constants';
|
||||
import { isVideoMutedByUser } from '../../react/features/base/media/functions';
|
||||
import {
|
||||
grantModerator,
|
||||
kickParticipant,
|
||||
@@ -54,6 +55,10 @@ import { updateSettings } from '../../react/features/base/settings/actions';
|
||||
import { getDisplayName } from '../../react/features/base/settings/functions.web';
|
||||
import { setCameraFacingMode } from '../../react/features/base/tracks/actions.web';
|
||||
import { CAMERA_FACING_MODE_MESSAGE } from '../../react/features/base/tracks/constants';
|
||||
import {
|
||||
getLocalVideoTrack,
|
||||
isLocalTrackMuted
|
||||
} from '../../react/features/base/tracks/functions';
|
||||
import {
|
||||
autoAssignToBreakoutRooms,
|
||||
closeBreakoutRoom,
|
||||
@@ -116,6 +121,7 @@ import { isAudioMuteButtonDisabled } from '../../react/features/toolbox/function
|
||||
import { setTileView, toggleTileView } from '../../react/features/video-layout/actions.any';
|
||||
import { muteAllParticipants } from '../../react/features/video-menu/actions';
|
||||
import { setVideoQuality } from '../../react/features/video-quality/actions';
|
||||
import { toggleBlurredBackgroundEffect } from '../../react/features/virtual-background/actions';
|
||||
import { toggleWhiteboard } from '../../react/features/whiteboard/actions.web';
|
||||
import { getJitsiMeetTransport } from '../transport';
|
||||
|
||||
@@ -323,7 +329,15 @@ function initCommands() {
|
||||
|
||||
APP.store.dispatch(setAssumedBandwidthBps(value));
|
||||
},
|
||||
'set-blurred-background': blurType => {
|
||||
const tracks = APP.store.getState()['features/base/tracks'];
|
||||
const videoTrack = getLocalVideoTrack(tracks)?.jitsiTrack;
|
||||
const muted = tracks ? isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO) : isVideoMutedByUser(APP.store);
|
||||
|
||||
APP.store.dispatch(toggleBlurredBackgroundEffect(videoTrack, blurType, muted));
|
||||
},
|
||||
'set-follow-me': (value, recorderOnly) => {
|
||||
|
||||
if (value) {
|
||||
sendAnalytics(createApiEvent('follow.me.set', {
|
||||
recorderOnly
|
||||
|
||||
1
modules/API/external/external_api.js
vendored
1
modules/API/external/external_api.js
vendored
@@ -60,6 +60,7 @@ const commands = {
|
||||
sendParticipantToRoom: 'send-participant-to-room',
|
||||
sendTones: 'send-tones',
|
||||
setAssumedBandwidthBps: 'set-assumed-bandwidth-bps',
|
||||
setBlurredBackground: 'set-blurred-background',
|
||||
setFollowMe: 'set-follow-me',
|
||||
setLargeVideoParticipant: 'set-large-video-participant',
|
||||
setMediaEncryptionKey: 'set-media-encryption-key',
|
||||
|
||||
Reference in New Issue
Block a user