feat(media) Disable desktopshare when the video sender limit is reached.
This commit is contained in:
parent
11eb6689dc
commit
229e65133c
|
@ -638,8 +638,8 @@
|
|||
"reactionSounds": "Disable sounds",
|
||||
"reactionSoundsForAll": "Disable sounds for all",
|
||||
"groupTitle": "Notifications",
|
||||
"videoUnmuteBlockedTitle": "Camera unmute blocked!",
|
||||
"videoUnmuteBlockedDescription": "Camera unmute operation has been temporarily blocked because of system limits."
|
||||
"videoUnmuteBlockedTitle": "Camera unmute and desktop sharing blocked!",
|
||||
"videoUnmuteBlockedDescription": "Camera unmute and desktop sharing operation have been temporarily blocked because of system limits."
|
||||
},
|
||||
"participantsPane": {
|
||||
"close": "Close",
|
||||
|
|
|
@ -13,6 +13,7 @@ import {
|
|||
showWarningNotification
|
||||
} from '../../notifications';
|
||||
import { isForceMuted } from '../../participants-pane/functions';
|
||||
import { isScreenMediaShared } from '../../screen-share';
|
||||
import { SET_AUDIO_ONLY, setAudioOnly } from '../audio-only';
|
||||
import { isRoomValid, SET_ROOM } from '../conference';
|
||||
import { getLocalParticipant } from '../participants';
|
||||
|
@ -114,8 +115,9 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
const state = store.getState();
|
||||
const tracks = state['features/base/tracks'];
|
||||
const isVideoMuted = isLocalTrackMuted(tracks, MEDIA_TYPE.VIDEO);
|
||||
const isMediaShared = isScreenMediaShared(state);
|
||||
|
||||
if (blocked && isVideoMuted) {
|
||||
if (blocked && isVideoMuted && !isMediaShared) {
|
||||
store.dispatch(showWarningNotification({
|
||||
descriptionKey: 'notify.videoUnmuteBlockedDescription',
|
||||
titleKey: 'notify.videoUnmuteBlockedTitle'
|
||||
|
|
|
@ -5,7 +5,7 @@ import { IconShareDesktop } from '../../../base/icons';
|
|||
import JitsiMeetJS from '../../../base/lib-jitsi-meet/_';
|
||||
import { connect } from '../../../base/redux';
|
||||
import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox/components';
|
||||
import { isScreenVideoShared } from '../../../screen-share';
|
||||
import { isScreenMediaShared, isScreenVideoShared } from '../../../screen-share';
|
||||
|
||||
type Props = AbstractButtonProps & {
|
||||
|
||||
|
@ -113,7 +113,13 @@ class ShareDesktopButton extends AbstractButton<Props, *> {
|
|||
* @returns {Object}
|
||||
*/
|
||||
const mapStateToProps = state => {
|
||||
let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled();
|
||||
const { muted, unmuteBlocked } = state['features/base/media'].video;
|
||||
const videoOrShareInProgress = isScreenMediaShared(state) || !muted;
|
||||
|
||||
// Disable the screenshare button if the video sender limit is reached and there is no video or media share in
|
||||
// progress.
|
||||
let desktopSharingEnabled = JitsiMeetJS.isDesktopSharingEnabled()
|
||||
&& !(unmuteBlocked && !videoOrShareInProgress);
|
||||
const { enableFeaturesBasedOnToken } = state['features/base/config'];
|
||||
|
||||
let desktopSharingDisabledTooltipKey;
|
||||
|
|
Loading…
Reference in New Issue