mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-18 18:17:47 +00:00
feat(virtual-background): Desktop share as virtual background
This commit is contained in:
committed by
Jaya Allamsetty
parent
4872ce83ba
commit
f5dd848daf
@@ -9,8 +9,9 @@ import { connect, equals } from '../../base/redux';
|
||||
import { getCurrentCameraDeviceId } from '../../base/settings';
|
||||
import { createLocalTracksF } from '../../base/tracks/functions';
|
||||
import { toggleBackgroundEffect } from '../actions';
|
||||
import { localTrackStopped } from '../functions';
|
||||
|
||||
const videoClassName = 'virtual-background-preview-video flipVideoX';
|
||||
const videoClassName = 'video-preview-video';
|
||||
|
||||
/**
|
||||
* The type of the React {@code PureComponent} props of {@link VirtualBackgroundPreview}.
|
||||
@@ -206,8 +207,14 @@ class VirtualBackgroundPreview extends PureComponent<Props, State> {
|
||||
this._setTracks();
|
||||
}
|
||||
if (!equals(this.props.options, prevProps.options)) {
|
||||
if (prevProps.options.backgroundType === 'desktop-share') {
|
||||
prevProps.options.url.dispose();
|
||||
}
|
||||
this._applyBackgroundEffect();
|
||||
}
|
||||
if (this.props.options.url?.videoType === 'desktop') {
|
||||
localTrackStopped(this.props.dispatch, this.props.options.url, this.state.jitsiTrack);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user