mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat: add toggleWhiteboard to Jitsi API (#13292)
* add toggleWhiteboard to Jitsi API * eslint recommendations applied * Prevent to send whiteboard status change notifications for mobile * Fix code style errors (eslint) * Requested changes (by mihhu) have been made. --------- Co-authored-by: Fikret Huseynkhanov <fikret.huseynkhanov@simbrella.com>
This commit is contained in:
committed by
GitHub
parent
ed89f9af20
commit
aaeb1a90e5
@@ -113,6 +113,8 @@ 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 { toggleWhiteboard } from '../../react/features/whiteboard/actions.any';
|
||||
import { WhiteboardStatus } from '../../react/features/whiteboard/types';
|
||||
import { getJitsiMeetTransport } from '../transport';
|
||||
|
||||
import {
|
||||
@@ -833,6 +835,9 @@ function initCommands() {
|
||||
} else {
|
||||
logger.error(' End Conference not supported');
|
||||
}
|
||||
},
|
||||
'toggle-whiteboard': () => {
|
||||
APP.store.dispatch(toggleWhiteboard());
|
||||
}
|
||||
};
|
||||
transport.on('event', ({ data, name }) => {
|
||||
@@ -2014,6 +2019,20 @@ class API {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify external application (if API is enabled) if whiteboard state is
|
||||
* changed.
|
||||
*
|
||||
* @param {WhiteboardStatus} status - The new whiteboard status.
|
||||
* @returns {void}
|
||||
*/
|
||||
notifyWhiteboardStatusChanged(status: WhiteboardStatus) {
|
||||
this._sendEvent({
|
||||
name: 'whiteboard-status-changed',
|
||||
status
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disposes the allocated resources.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user