feat(whiteboard) add native implementation (#14327)

pull/14329/head jitsi-meet_9263
Mihaela Dumitru 1 year ago committed by GitHub
parent 2035cd7e62
commit 3f657c3ded
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      css/main.scss
  2. 7
      css/modals/_whiteboard.scss
  3. 1
      globals.d.ts
  4. 3
      globals.native.d.ts
  5. 7
      lang/main.json
  6. 2
      modules/API/API.js
  7. 12
      package-lock.json
  8. 1
      package.json
  9. 1
      react/features/app/middlewares.any.ts
  10. 1
      react/features/app/middlewares.native.ts
  11. 2
      react/features/app/middlewares.web.ts
  12. 1
      react/features/app/reducers.any.ts
  13. 1
      react/features/app/reducers.web.ts
  14. 36
      react/features/base/util/httpUtils.ts
  15. 1
      react/features/etherpad/components/native/SharedDocument.tsx
  16. 1
      react/features/invite/components/dial-in-summary/native/DialInSummary.tsx
  17. 8
      react/features/mobile/navigation/components/RootNavigationContainer.tsx
  18. 3
      react/features/mobile/navigation/routes.ts
  19. 13
      react/features/mobile/navigation/screenOptions.ts
  20. 4
      react/features/mobile/polyfills/browser.js
  21. 2
      react/features/toolbox/components/native/OverflowMenu.tsx
  22. 81
      react/features/whiteboard/actions.any.ts
  23. 23
      react/features/whiteboard/actions.native.ts
  24. 82
      react/features/whiteboard/actions.ts
  25. 48
      react/features/whiteboard/actions.web.ts
  26. 220
      react/features/whiteboard/components/native/Whiteboard.tsx
  27. 43
      react/features/whiteboard/components/native/WhiteboardButton.tsx
  28. 15
      react/features/whiteboard/components/native/WhiteboardErrorDialog.tsx
  29. 43
      react/features/whiteboard/components/native/WhiteboardLimitDialog.tsx
  30. 37
      react/features/whiteboard/components/native/styles.ts
  31. 25
      react/features/whiteboard/components/web/NoWhiteboardError.tsx
  32. 2
      react/features/whiteboard/components/web/Whiteboard.tsx
  33. 91
      react/features/whiteboard/components/web/WhiteboardApp.tsx
  34. 2
      react/features/whiteboard/components/web/WhiteboardButton.tsx
  35. 70
      react/features/whiteboard/components/web/WhiteboardWrapper.tsx
  36. 7
      react/features/whiteboard/constants.ts
  37. 52
      react/features/whiteboard/functions.ts
  38. 3
      react/features/whiteboard/logger.ts
  39. 89
      react/features/whiteboard/middleware.any.ts
  40. 80
      react/features/whiteboard/middleware.native.ts
  41. 64
      react/features/whiteboard/middleware.web.ts
  42. 4
      react/index.web.js
  43. 33
      static/whiteboard.html

@ -36,6 +36,7 @@ $flagsImagePath: "../images/";
@import 'modals/invite/info';
@import 'modals/screen-share/share-audio';
@import 'modals/screen-share/share-screen-warning';
@import 'modals/whiteboard';
@import 'videolayout_default';
@import 'subject';
@import 'popup_menu';

@ -0,0 +1,7 @@
.whiteboard {
.excalidraw-wrapper {
height: 100vh;
width: 100vw;
}
}

1
globals.d.ts vendored

@ -21,6 +21,7 @@ declare global {
JitsiMeetElectron?: any;
PressureObserver?: any;
PressureRecord?: any;
ReactNativeWebView?: any;
// selenium tests handler
_sharedVideoPlayer: any;
alwaysOnTop: { api: any };

@ -19,6 +19,9 @@ interface IWindow {
location: ILocation;
PressureObserver?: any;
PressureRecord?: any;
ReactNativeWebView?: any;
TextDecoder?: any;
TextEncoder?: any;
self: any;
top: any;

@ -560,6 +560,7 @@
"noNumbers": "No dial-in numbers.",
"noPassword": "None",
"noRoom": "No room was specified to dial-in into.",
"noWhiteboard": "Could not load the whiteboard.",
"numbers": "Dial-in Numbers",
"password": "$t(lockRoomPasswordUppercase): ",
"reachedLimit": "You have reached the limit of your plan.",
@ -567,7 +568,8 @@
"sipAudioOnly": "SIP audio only address",
"title": "Share",
"tooltip": "Share link and dial-in info for this meeting",
"upgradeOptions": "Please check the upgrade options on"
"upgradeOptions": "Please check the upgrade options on",
"whiteboardError": "Error loading the whiteboard. Please try again later."
},
"inlineDialogFailure": {
"msg": "We stumbled a bit.",
@ -1530,6 +1532,7 @@
"whiteboard": {
"accessibilityLabel": {
"heading": "Whiteboard"
}
},
"screenTitle": "Whiteboard"
}
}

@ -113,7 +113,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 { toggleWhiteboard } from '../../react/features/whiteboard/actions.any';
import { toggleWhiteboard } from '../../react/features/whiteboard/actions.web';
import { getJitsiMeetTransport } from '../transport';
import {

12
package-lock.json generated

@ -110,6 +110,7 @@
"redux-thunk": "2.4.1",
"seamless-scroll-polyfill": "2.1.8",
"semver": "7.5.4",
"text-encoding": "0.7.0",
"tss-react": "4.4.4",
"util": "0.12.1",
"uuid": "8.3.2",
@ -18625,6 +18626,12 @@
"node": ">=0.10.0"
}
},
"node_modules/text-encoding": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz",
"integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA==",
"deprecated": "no longer maintained"
},
"node_modules/text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
@ -33629,6 +33636,11 @@
}
}
},
"text-encoding": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/text-encoding/-/text-encoding-0.7.0.tgz",
"integrity": "sha512-oJQ3f1hrOnbRLOcwKz0Liq2IcrvDeZRHXhd9RgLrsT+DjWY/nty1Hi7v3dtkaEYbPYe0mUoOfzRrMwfXXwgPUA=="
},
"text-table": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",

@ -116,6 +116,7 @@
"redux-thunk": "2.4.1",
"seamless-scroll-polyfill": "2.1.8",
"semver": "7.5.4",
"text-encoding": "0.7.0",
"tss-react": "4.4.4",
"util": "0.12.1",
"uuid": "8.3.2",

@ -51,5 +51,6 @@ import '../video-layout/middleware';
import '../video-quality/middleware';
import '../videosipgw/middleware';
import '../visitors/middleware';
import '../whiteboard/middleware.any';
import './middleware';

@ -13,5 +13,6 @@ import '../mobile/react-native-sdk/middleware';
import '../mobile/watchos/middleware';
import '../share-room/middleware';
import '../shared-video/middleware';
import '../whiteboard/middleware.native';
import './middlewares.any';

@ -22,6 +22,6 @@ import '../talk-while-muted/middleware';
import '../toolbox/middleware';
import '../face-landmarks/middleware';
import '../gifs/middleware';
import '../whiteboard/middleware';
import '../whiteboard/middleware.web';
import './middlewares.any';

@ -55,3 +55,4 @@ import '../video-layout/reducer';
import '../video-quality/reducer';
import '../videosipgw/reducer';
import '../visitors/reducer';
import '../whiteboard/reducer';

@ -16,7 +16,6 @@ import '../noise-suppression/reducer';
import '../screenshot-capture/reducer';
import '../talk-while-muted/reducer';
import '../virtual-background/reducer';
import '../whiteboard/reducer';
import '../web-hid/reducer';
import './reducers.any';

@ -1,3 +1,5 @@
import base64js from 'base64-js';
import { timeoutPromise } from './timeoutPromise';
/**
@ -43,3 +45,37 @@ export function doGetJSON(url: string, retry?: boolean, options?: Object) {
return fetchPromise;
}
/**
* Encodes strings to Base64URL.
*
* @param {any} data - The byte array to encode.
* @returns {string}
*/
export const encodeToBase64URL = (data: string): string => base64js
.fromByteArray(new window.TextEncoder().encode(data))
.replace(/=/g, '')
.replace(/\+/g, '-')
.replace(/\//g, '_');
/**
* Decodes strings from Base64URL.
*
* @param {string} data - The byte array to decode.
* @returns {string}
*/
export const decodeFromBase64URL = (data: string): string => {
let s = data;
// Convert from Base64URL to Base64.
if (s.length % 4 === 2) {
s += '==';
} else if (s.length % 4 === 3) {
s += '=';
}
s = s.replace(/-/g, '+').replace(/_/g, '/');
// Convert Base64 to a byte array.
return new window.TextDecoder().decode(base64js.toByteArray(s));
};

@ -56,6 +56,7 @@ class SharedDocument extends PureComponent<IProps> {
style = { styles.sharedDocContainer }>
<WebView
hideKeyboardAccessoryView = { true }
incognito = { true }
renderLoading = { this._renderLoading }
source = {{ uri: _documentUrl ?? '' }}
startInLoadingState = { true }

@ -76,6 +76,7 @@ class DialInSummary extends PureComponent<IProps> {
<JitsiScreen
style = { styles.backDrop }>
<WebView
incognito = { true }
onError = { this._onError }
onShouldStartLoadWithRequest = { this._onNavigate }
renderLoading = { this._renderLoading }

@ -13,6 +13,7 @@ import { isUnsafeRoomWarningEnabled } from '../../../prejoin/functions';
// @ts-ignore
import WelcomePage from '../../../welcome/components/WelcomePage';
import { isWelcomePageEnabled } from '../../../welcome/functions';
import Whiteboard from '../../../whiteboard/components/native/Whiteboard';
import { _ROOT_NAVIGATION_READY } from '../actionTypes';
import { rootNavigationRef } from '../rootNavigationContainerRef';
import { screen } from '../routes';
@ -23,7 +24,8 @@ import {
navigationContainerTheme,
preJoinScreenOptions,
unsafeMeetingScreenOptions,
welcomeScreenOptions
welcomeScreenOptions,
whiteboardScreenOptions
} from '../screenOptions';
import ConnectingPage from './ConnectingPage';
@ -94,6 +96,10 @@ const RootNavigationContainer = ({ dispatch, isUnsafeRoomWarningAvailable, isWel
component = { ConnectingPage }
name = { screen.connecting }
options = { connectingScreenOptions } />
<RootStack.Screen // @ts-ignore
component = { Whiteboard }
name = { screen.conference.whiteboard }
options = { whiteboardScreenOptions } />
<RootStack.Screen
component = { Prejoin }
name = { screen.preJoin }

@ -22,7 +22,8 @@ export const screen = {
security: 'Security Options',
sharedDocument: 'Shared document',
speakerStats: 'Speaker Stats',
subtitles: 'Subtitles'
subtitles: 'Subtitles',
whiteboard: 'Whiteboard'
},
connecting: 'Connecting',
dialInSummary: 'Dial-In Info',

@ -188,6 +188,19 @@ export const connectingScreenOptions = {
headerShown: false
};
/**
* Screen options for the whiteboard screen.
*/
export const whiteboardScreenOptions = {
gestureEnabled: true,
headerStyle: {
backgroundColor: BaseTheme.palette.ui01
},
headerTitleStyle: {
color: BaseTheme.palette.text01
}
};
/**
* Screen options for pre-join screen.
*/

@ -1,6 +1,7 @@
import { DOMParser } from '@xmldom/xmldom';
import { Platform } from 'react-native';
import BackgroundTimer from 'react-native-background-timer';
import { TextDecoder, TextEncoder } from 'text-encoding';
import 'promise.allsettled/auto'; // Promise.allSettled.
import 'react-native-url-polyfill/auto'; // Complete URL polyfill.
@ -313,4 +314,7 @@ function _visitNode(node, callback) {
global.sessionStorage = new Storage();
}
global.TextDecoder = TextDecoder;
global.TextEncoder = TextEncoder;
})(global || window || this); // eslint-disable-line no-invalid-this

@ -23,6 +23,7 @@ import { isSpeakerStatsDisabled } from '../../../speaker-stats/functions';
import ClosedCaptionButton from '../../../subtitles/components/native/ClosedCaptionButton';
import TileViewButton from '../../../video-layout/components/TileViewButton';
import styles from '../../../video-menu/components/native/styles';
import WhiteboardButton from '../../../whiteboard/components/native/WhiteboardButton';
import { getMovableButtons } from '../../functions.native';
import AudioOnlyButton from './AudioOnlyButton';
@ -156,6 +157,7 @@ class OverflowMenu extends PureComponent<IProps, IState> {
<RecordButton { ...buttonProps } />
<LiveStreamButton { ...buttonProps } />
<LinkToSalesforceButton { ...buttonProps } />
<WhiteboardButton { ...buttonProps } />
{/* @ts-ignore */}
<Divider style = { styles.divider as ViewStyle } />
<SharedVideoButton { ...buttonProps } />

@ -1,31 +1,68 @@
import { IStore } from '../app/types';
import { showWarningNotification } from '../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import { setWhiteboardOpen } from './actions';
import { isWhiteboardAllowed, isWhiteboardOpen, isWhiteboardVisible } from './functions';
import { WhiteboardStatus } from './types';
import {
RESET_WHITEBOARD,
SETUP_WHITEBOARD,
SET_WHITEBOARD_OPEN
} from './actionTypes';
import { IWhiteboardAction } from './reducer';
/**
* Configures the whiteboard collaboration details.
*
* @param {Object} payload - The whiteboard settings.
* @returns {{
* type: SETUP_WHITEBOARD,
* collabDetails: { roomId: string, roomKey: string }
* }}
*/
export const setupWhiteboard = ({ collabDetails }: {
collabDetails: { roomId: string; roomKey: string; };
}): IWhiteboardAction => {
return {
type: SETUP_WHITEBOARD,
collabDetails
};
};
/**
* API to toggle the whiteboard.
* Cleans up the whiteboard collaboration settings.
* To be used only on native for cleanup in between conferences.
*
* @returns {Function}
* @returns {{
* type: RESET_WHITEBOARD
* }}
*/
export function toggleWhiteboard() {
return async (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
const state = getState();
const isAllowed = isWhiteboardAllowed(state);
const isOpen = isWhiteboardOpen(state);
export const resetWhiteboard = (): IWhiteboardAction => {
return { type: RESET_WHITEBOARD };
};
if (isAllowed) {
if (isOpen && !isWhiteboardVisible(state)) {
dispatch(setWhiteboardOpen(true));
} else if (isOpen && isWhiteboardVisible(state)) {
dispatch(setWhiteboardOpen(false));
} else if (!isOpen) {
dispatch(setWhiteboardOpen(true));
}
} else if (typeof APP !== 'undefined') {
APP.API.notifyWhiteboardStatusChanged(WhiteboardStatus.FORBIDDEN);
}
/**
* Sets the whiteboard visibility status.
*
* @param {boolean} isOpen - The whiteboard visibility flag.
* @returns {{
* type: SET_WHITEBOARD_OPEN,
* isOpen
* }}
*/
export const setWhiteboardOpen = (isOpen: boolean): IWhiteboardAction => {
return {
type: SET_WHITEBOARD_OPEN,
isOpen
};
}
};
/**
* Shows a warning notification about the whiteboard user limit.
*
* @returns {Function}
*/
export const notifyWhiteboardLimit = () => (dispatch: IStore['dispatch']) => {
dispatch(showWarningNotification({
titleKey: 'notify.whiteboardLimitTitle',
descriptionKey: 'notify.whiteboardLimitDescription'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
};

@ -0,0 +1,23 @@
import { createRestrictWhiteboardEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types';
import { navigateRoot } from '../mobile/navigation/rootNavigationContainerRef';
import { screen } from '../mobile/navigation/routes';
import { resetWhiteboard } from './actions.any';
export * from './actions.any';
/**
* Restricts the whiteboard usage.
*
* @param {boolean} shouldCloseWhiteboard - Whether to dismiss the whiteboard.
* @returns {Function}
*/
export const restrictWhiteboard = (shouldCloseWhiteboard = true) => (dispatch: IStore['dispatch']) => {
if (shouldCloseWhiteboard) {
navigateRoot(screen.conference.root);
}
dispatch(resetWhiteboard());
sendAnalytics(createRestrictWhiteboardEvent());
};

@ -1,82 +0,0 @@
import { createRestrictWhiteboardEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types';
import { showWarningNotification } from '../notifications/actions';
import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
import {
RESET_WHITEBOARD,
SETUP_WHITEBOARD,
SET_WHITEBOARD_OPEN
} from './actionTypes';
import { IWhiteboardAction } from './reducer';
/**
* Configures the whiteboard collaboration details.
*
* @param {Object} payload - The whiteboard settings.
* @returns {{
* type: SETUP_WHITEBOARD,
* collabDetails: { roomId: string, roomKey: string }
* }}
*/
export const setupWhiteboard = ({ collabDetails }: {
collabDetails: { roomId: string; roomKey: string; };
}): IWhiteboardAction => {
return {
type: SETUP_WHITEBOARD,
collabDetails
};
};
/**
* Cleans up the whiteboard collaboration settings.
* To be used only on native for cleanup in between conferences.
*
* @returns {{
* type: RESET_WHITEBOARD
* }}
*/
export const resetWhiteboard = (): IWhiteboardAction => {
return { type: RESET_WHITEBOARD };
};
/**
* Sets the whiteboard visibility status.
*
* @param {boolean} isOpen - The whiteboard visibility flag.
* @returns {{
* type: SET_WHITEBOARD_OPEN,
* isOpen
* }}
*/
export const setWhiteboardOpen = (isOpen: boolean): IWhiteboardAction => {
return {
type: SET_WHITEBOARD_OPEN,
isOpen
};
};
/**
* Shows a warning notification about the whiteboard user limit.
*
* @returns {Function}
*/
export const notifyWhiteboardLimit = () => (dispatch: IStore['dispatch']) => {
dispatch(showWarningNotification({
titleKey: 'notify.whiteboardLimitTitle',
descriptionKey: 'notify.whiteboardLimitDescription'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
};
/**
* Restricts the whiteboard usage.
*
* @param {boolean} shouldCloseWhiteboard - Whether to dismiss the whiteboard participant.
* @returns {Function}
*/
export const restrictWhiteboard = (shouldCloseWhiteboard = true) => (dispatch: IStore['dispatch']) => {
shouldCloseWhiteboard && dispatch(setWhiteboardOpen(false));
dispatch(resetWhiteboard());
sendAnalytics(createRestrictWhiteboardEvent());
};

@ -0,0 +1,48 @@
import { createRestrictWhiteboardEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types';
import { resetWhiteboard, setWhiteboardOpen } from './actions.any';
import { isWhiteboardAllowed, isWhiteboardOpen, isWhiteboardVisible } from './functions';
import { WhiteboardStatus } from './types';
export * from './actions.any';
/**
* API to toggle the whiteboard.
*
* @returns {Function}
*/
export function toggleWhiteboard() {
return async (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
const state = getState();
const isAllowed = isWhiteboardAllowed(state);
const isOpen = isWhiteboardOpen(state);
if (isAllowed) {
if (isOpen && !isWhiteboardVisible(state)) {
dispatch(setWhiteboardOpen(true));
} else if (isOpen && isWhiteboardVisible(state)) {
dispatch(setWhiteboardOpen(false));
} else if (!isOpen) {
dispatch(setWhiteboardOpen(true));
}
} else if (typeof APP !== 'undefined') {
APP.API.notifyWhiteboardStatusChanged(WhiteboardStatus.FORBIDDEN);
}
};
}
/**
* Restricts the whiteboard usage.
*
* @param {boolean} shouldCloseWhiteboard - Whether to dismiss the whiteboard.
* @returns {Function}
*/
export const restrictWhiteboard = (shouldCloseWhiteboard = true) => (dispatch: IStore['dispatch']) => {
if (shouldCloseWhiteboard) {
dispatch(setWhiteboardOpen(false));
}
dispatch(resetWhiteboard());
sendAnalytics(createRestrictWhiteboardEvent());
};

@ -0,0 +1,220 @@
import { Route } from '@react-navigation/native';
import React, { PureComponent } from 'react';
import { WithTranslation } from 'react-i18next';
import { View, ViewStyle } from 'react-native';
import { WebView } from 'react-native-webview';
import { connect } from 'react-redux';
import { IReduxState, IStore } from '../../../app/types';
import { getCurrentConference } from '../../../base/conference/functions';
import { IJitsiConference } from '../../../base/conference/reducer';
import { openDialog } from '../../../base/dialog/actions';
import { translate } from '../../../base/i18n/functions';
import JitsiScreen from '../../../base/modal/components/JitsiScreen';
import LoadingIndicator from '../../../base/react/components/native/LoadingIndicator';
import { safeDecodeURIComponent } from '../../../base/util/uri';
import { setupWhiteboard } from '../../actions.any';
import { WHITEBOARD_ID } from '../../constants';
import { getCollabServerUrl, getWhiteboardInfoForURIString } from '../../functions';
import WhiteboardErrorDialog from './WhiteboardErrorDialog';
import styles, { INDICATOR_COLOR } from './styles';
interface IProps extends WithTranslation {
/**
* The whiteboard collab server url.
*/
collabServerUrl?: string;
/**
* The current Jitsi conference.
*/
conference?: IJitsiConference;
/**
* Redux store dispatch method.
*/
dispatch: IStore['dispatch'];
/**
* Window location href.
*/
locationHref: string;
/**
* Default prop for navigating between screen components(React Navigation).
*/
navigation: any;
/**
* Default prop for navigating between screen components(React Navigation).
*/
route: Route<'', {
collabDetails: { roomId: string; roomKey: string; };
collabServerUrl: string;
localParticipantName: string;
}>;
}
/**
* Implements a React native component that displays the whiteboard page for a specific room.
*/
class Whiteboard extends PureComponent<IProps> {
/**
* Initializes a new instance.
*
* @inheritdoc
*/
constructor(props: IProps) {
super(props);
this._onError = this._onError.bind(this);
this._onNavigate = this._onNavigate.bind(this);
this._onMessage = this._onMessage.bind(this);
this._renderLoading = this._renderLoading.bind(this);
}
/**
* Implements React's {@link Component#componentDidMount()}. Invoked
* immediately after mounting occurs.
*
* @inheritdoc
* @returns {void}
*/
componentDidMount() {
const { navigation, t } = this.props;
navigation.setOptions({
headerTitle: t('whiteboard.screenTitle')
});
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
*/
render() {
const { locationHref, route } = this.props;
const collabServerUrl = safeDecodeURIComponent(route.params?.collabServerUrl);
const localParticipantName = safeDecodeURIComponent(route.params?.localParticipantName);
const collabDetails = route.params?.collabDetails;
const uri = getWhiteboardInfoForURIString(
locationHref,
collabServerUrl,
collabDetails,
localParticipantName
) ?? '';
return (
<JitsiScreen
safeAreaInsets = { [ 'bottom', 'left', 'right' ] }
style = { styles.backDrop }>
<WebView
incognito = { true }
javaScriptEnabled = { true }
nestedScrollEnabled = { true }
onError = { this._onError }
onMessage = { this._onMessage }
onShouldStartLoadWithRequest = { this._onNavigate }
renderLoading = { this._renderLoading }
scrollEnabled = { true }
setSupportMultipleWindows = { false }
source = {{ uri }}
startInLoadingState = { true }
style = { styles.webView } />
</JitsiScreen>
);
}
/**
* Callback to handle the error if the page fails to load.
*
* @returns {void}
*/
_onError() {
this.props.dispatch(openDialog(WhiteboardErrorDialog));
}
/**
* Callback to intercept navigation inside the webview and make the native app handle the whiteboard requests.
*
* NOTE: We don't navigate to anywhere else from that view.
*
* @param {any} request - The request object.
* @returns {boolean}
*/
_onNavigate(request: { url: string; }) {
const { url } = request;
const { locationHref, route } = this.props;
const collabServerUrl = route.params?.collabServerUrl;
const collabDetails = route.params?.collabDetails;
const localParticipantName = route.params?.localParticipantName;
return url === getWhiteboardInfoForURIString(
locationHref,
collabServerUrl,
collabDetails,
localParticipantName
);
}
/**
* Callback to handle the message events.
*
* @param {any} event - The event.
* @returns {void}
*/
_onMessage(event: any) {
const { collabServerUrl, conference } = this.props;
const collabDetails = JSON.parse(event.nativeEvent.data);
if (collabDetails?.roomId && collabDetails?.roomKey) {
this.props.dispatch(setupWhiteboard({ collabDetails }));
// Broadcast the collab details.
conference?.getMetadataHandler().setMetadata(WHITEBOARD_ID, {
collabServerUrl,
collabDetails
});
}
}
/**
* Renders the loading indicator.
*
* @returns {React$Component<any>}
*/
_renderLoading() {
return (
<View style = { styles.indicatorWrapper as ViewStyle }>
<LoadingIndicator
color = { INDICATOR_COLOR }
size = 'large' />
</View>
);
}
}
/**
* Maps (parts of) the redux state to the associated
* {@code WaitForOwnerDialog}'s props.
*
* @param {Object} state - The redux state.
* @private
* @returns {IProps}
*/
function mapStateToProps(state: IReduxState) {
const { locationURL } = state['features/base/connection'];
const { href = '' } = locationURL ?? {};
return {
conference: getCurrentConference(state),
collabServerUrl: getCollabServerUrl(state),
locationHref: href
};
}
export default translate(connect(mapStateToProps)(Whiteboard));

@ -0,0 +1,43 @@
import { connect } from 'react-redux';
import { IReduxState } from '../../../app/types';
import { translate } from '../../../base/i18n/functions';
import { IconWhiteboard } from '../../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
import { setWhiteboardOpen } from '../../actions.any';
import { isWhiteboardButtonVisible } from '../../functions';
/**
* Component that renders a toolbar button for the whiteboard.
*/
class WhiteboardButton extends AbstractButton<AbstractButtonProps> {
accessibilityLabel = 'toolbar.accessibilityLabel.showWhiteboard';
icon = IconWhiteboard;
label = 'toolbar.showWhiteboard';
tooltip = 'toolbar.showWhiteboard';
/**
* Handles clicking / pressing the button, and opens the whiteboard view.
*
* @private
* @returns {void}
*/
_handleClick() {
this.props.dispatch(setWhiteboardOpen(true));
}
}
/**
* Maps part of the Redux state to the props of this component.
*
* @param {Object} state - The Redux state.
* @private
* @returns {IProps}
*/
function _mapStateToProps(state: IReduxState) {
return {
visible: isWhiteboardButtonVisible(state)
};
}
export default translate(connect(_mapStateToProps)(WhiteboardButton));

@ -0,0 +1,15 @@
import React from 'react';
import AlertDialog from '../../../base/dialog/components/native/AlertDialog';
/**
* Dialog to inform the user that we couldn't load the whiteboard.
*
* @returns {JSX.Element}
*/
const WhiteboardErrorDialog = () => (
<AlertDialog
contentKey = 'info.whiteboardError' />
);
export default WhiteboardErrorDialog;

@ -0,0 +1,43 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Text, TextStyle } from 'react-native';
import { useSelector } from 'react-redux';
import ConfirmDialog from '../../../base/dialog/components/native/ConfirmDialog';
import Link from '../../../base/react/components/native/Link';
import { getWhiteboardConfig } from '../../functions';
import styles from './styles';
/**
* Component that renders the whiteboard user limit dialog.
*
* @returns {JSX.Element}
*/
const WhiteboardLimitDialog = () => {
const { t } = useTranslation();
const { limitUrl } = useSelector(getWhiteboardConfig);
return (
<ConfirmDialog
cancelLabel = { 'dialog.Ok' }
descriptionKey = { 'dialog.whiteboardLimitContent' }
isConfirmHidden = { true }
title = { 'dialog.whiteboardLimitTitle' }>
{limitUrl && (
<Text style = { styles.limitUrlText as TextStyle }>
{` ${t('dialog.whiteboardLimitReference')}
`}
<Link
style = { styles.limitUrl }
url = { limitUrl }>
{t('dialog.whiteboardLimitReferenceUrl')}
</Link>
.
</Text>
)}
</ConfirmDialog>
);
};
export default WhiteboardLimitDialog;

@ -0,0 +1,37 @@
import BaseTheme from '../../../base/ui/components/BaseTheme.native';
export const INDICATOR_COLOR = BaseTheme.palette.ui07;
const WV_BACKGROUND = BaseTheme.palette.ui03;
export default {
backDrop: {
backgroundColor: WV_BACKGROUND,
flex: 1
},
indicatorWrapper: {
alignItems: 'center',
backgroundColor: BaseTheme.palette.ui10,
height: '100%',
justifyContent: 'center'
},
webView: {
backgroundColor: WV_BACKGROUND,
flex: 1
},
limitUrlText: {
alignItems: 'center',
display: 'flex',
marginBottom: BaseTheme.spacing[2],
textAlign: 'center'
},
limitUrl: {
color: BaseTheme.palette.link01,
fontWeight: 'bold'
}
};

@ -0,0 +1,25 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
/**
* The type of the React {@code Component} props of {@link NoWhiteboardError}.
*/
interface IProps {
/**
* Additional CSS classnames to append to the root of the component.
*/
className?: string;
}
const NoWhiteboardError = ({ className }: IProps) => {
const { t } = useTranslation();
return (
<div className = { className } >
{t('info.noWhiteboard')}
</div>
);
};
export default NoWhiteboardError;

@ -1,5 +1,6 @@
import { ExcalidrawApp } from '@jitsi/excalidraw';
import clsx from 'clsx';
import i18next from 'i18next';
import React, { useCallback, useEffect, useRef } from 'react';
import { WithTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
@ -143,6 +144,7 @@ const Whiteboard = (props: WithTranslation): JSX.Element => {
collabServerUrl = { collabServerUrl }
excalidraw = {{
isCollaborating: true,
langCode: i18next.language,
// @ts-ignore
ref: excalidrawRef,

@ -0,0 +1,91 @@
import { generateCollaborationLinkData } from '@jitsi/excalidraw';
import React, { ComponentType } from 'react';
import BaseApp from '../../../base/app/components/BaseApp';
import GlobalStyles from '../../../base/ui/components/GlobalStyles.web';
import JitsiThemeProvider from '../../../base/ui/components/JitsiThemeProvider.web';
import { decodeFromBase64URL } from '../../../base/util/httpUtils';
import { parseURLParams } from '../../../base/util/parseURLParams';
import { safeDecodeURIComponent } from '../../../base/util/uri';
import logger from '../../logger';
import NoWhiteboardError from './NoWhiteboardError';
import WhiteboardWrapper from './WhiteboardWrapper';
/**
* Wrapper application for the whiteboard.
*
* @augments BaseApp
*/
export default class WhiteboardApp extends BaseApp<any> {
/**
* Navigates to {@link Whiteboard} upon mount.
*
* @returns {void}
*/
async componentDidMount() {
await super.componentDidMount();
const { state } = parseURLParams(window.location.href, true);
const decodedState = JSON.parse(decodeFromBase64URL(state));
const { collabServerUrl, localParticipantName } = decodedState;
let { roomId, roomKey } = decodedState;
if (!roomId && !roomKey) {
try {
const collabDetails = await generateCollaborationLinkData();
roomId = collabDetails.roomId;
roomKey = collabDetails.roomKey;
if (window.ReactNativeWebView) {
setTimeout(() => {
window.ReactNativeWebView.postMessage(JSON.stringify(collabDetails));
}, 0);
}
} catch (e: any) {
logger.error('Couldn\'t generate collaboration link data.', e);
}
}
super._navigate({
component: () => (
<>{
roomId && roomKey && collabServerUrl
? <WhiteboardWrapper
className = 'whiteboard'
collabDetails = {{
roomId,
roomKey
}}
collabServerUrl = { safeDecodeURIComponent(collabServerUrl) }
localParticipantName = { localParticipantName } />
: <NoWhiteboardError className = 'whiteboard' />
}</>
) });
}
/**
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
* the top most component.
*
* @override
*/
_createMainElement(component: ComponentType<any>, props: Object) {
return (
<JitsiThemeProvider>
<GlobalStyles />
{super._createMainElement(component, props)}
</JitsiThemeProvider>
);
}
/**
* Renders the platform specific dialog container.
*
* @returns {React$Element}
*/
_renderDialogContainer() {
return null;
}
}

@ -5,7 +5,7 @@ import { translate } from '../../../base/i18n/functions';
import { IconWhiteboard, IconWhiteboardHide } from '../../../base/icons/svg';
import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
import { setOverflowMenuVisible } from '../../../toolbox/actions.web';
import { setWhiteboardOpen } from '../../actions';
import { setWhiteboardOpen } from '../../actions.any';
import { isWhiteboardButtonVisible, isWhiteboardVisible } from '../../functions';
interface IProps extends AbstractButtonProps {

@ -0,0 +1,70 @@
import { ExcalidrawApp } from '@jitsi/excalidraw';
import i18next from 'i18next';
import React, { useCallback, useRef } from 'react';
import { WHITEBOARD_UI_OPTIONS } from '../../constants';
/**
* Whiteboard wrapper for mobile.
*
* @returns {JSX.Element}
*/
const WhiteboardWrapper = ({
className,
collabDetails,
collabServerUrl,
localParticipantName
}: {
className?: string;
collabDetails: {
roomId: string;
roomKey: string;
};
collabServerUrl: string;
localParticipantName: string;
}) => {
const excalidrawRef = useRef<any>(null);
const excalidrawAPIRef = useRef<any>(null);
const collabAPIRef = useRef<any>(null);
const getExcalidrawAPI = useCallback(excalidrawAPI => {
if (excalidrawAPIRef.current) {
return;
}
excalidrawAPIRef.current = excalidrawAPI;
}, []);
const getCollabAPI = useCallback(collabAPI => {
if (collabAPIRef.current) {
return;
}
collabAPIRef.current = collabAPI;
collabAPIRef.current.setUsername(localParticipantName);
}, [ localParticipantName ]);
return (
<div className = { className }>
<div className = 'excalidraw-wrapper'>
<ExcalidrawApp
collabDetails = { collabDetails }
collabServerUrl = { collabServerUrl }
detectScroll = { true }
excalidraw = {{
isCollaborating: true,
langCode: i18next.language,
// @ts-ignore
ref: excalidrawRef,
theme: 'light',
UIOptions: WHITEBOARD_UI_OPTIONS
}}
getCollabAPI = { getCollabAPI }
getExcalidrawAPI = { getExcalidrawAPI } />
</div>
</div>
);
};
export default WhiteboardWrapper;

@ -62,3 +62,10 @@ export const MIN_USER_LIMIT = 10;
* Whiteboard soft limit diff.
*/
export const USER_LIMIT_THRESHOLD = 5;
/**
* The pathName for the whiteboard page.
*
* @type {string}
*/
export const WHITEBOARD_PATH_NAME = 'static/whiteboard.html';

@ -5,10 +5,11 @@ import { IReduxState } from '../app/types';
import { getCurrentConference } from '../base/conference/functions';
import { IWhiteboardConfig } from '../base/config/configType';
import { getRemoteParticipants, isLocalParticipantModerator } from '../base/participants/functions';
import { appendURLParam } from '../base/util/uri';
import { encodeToBase64URL } from '../base/util/httpUtils';
import { appendURLHashParam, appendURLParam } from '../base/util/uri';
import { getCurrentRoomId, isInBreakoutRoom } from '../breakout-rooms/functions';
import { MIN_USER_LIMIT, USER_LIMIT_THRESHOLD, WHITEBOARD_ID } from './constants';
import { MIN_USER_LIMIT, USER_LIMIT_THRESHOLD, WHITEBOARD_ID, WHITEBOARD_PATH_NAME } from './constants';
import { IWhiteboardState } from './reducer';
const getWhiteboardState = (state: IReduxState): IWhiteboardState => state['features/whiteboard'];
@ -156,3 +157,50 @@ export const shouldNotifyUserLimit = (state: IReduxState): boolean => {
return participantCount + USER_LIMIT_THRESHOLD > userLimit;
};
/**
* Generates the URL for the static whiteboard page.
*
* @param {string} locationUrl - The window location href.
* @param {string} collabServerUrl - The whiteboard collaboration server url.
* @param {Object} collabDetails - The whiteboard collaboration details.
* @param {string} localParticipantName - The local participant name.
* @returns {string}
*/
export function getWhiteboardInfoForURIString(
locationUrl: any,
collabServerUrl: string,
collabDetails: { roomId: string; roomKey: string; },
localParticipantName: string
): string | undefined {
if (!collabServerUrl || !locationUrl) {
return undefined;
}
let state = {};
let url = `${locationUrl.substring(0, locationUrl.lastIndexOf('/'))}/${WHITEBOARD_PATH_NAME}`;
if (collabDetails?.roomId) {
state = {
...state,
roomId: collabDetails.roomId
};
}
if (collabDetails?.roomKey) {
state = {
...state,
roomKey: collabDetails.roomKey
};
}
state = {
...state,
collabServerUrl,
localParticipantName
};
url = appendURLHashParam(url, 'state', encodeToBase64URL(JSON.stringify(state)));
return url;
}

@ -0,0 +1,3 @@
import { getLogger } from '../base/logging/functions';
export default getLogger('features/whiteboard');

@ -0,0 +1,89 @@
import { createOpenWhiteboardEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types';
import { getCurrentConference } from '../base/conference/functions';
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import StateListenerRegistry from '../base/redux/StateListenerRegistry';
import { SET_WHITEBOARD_OPEN } from './actionTypes';
import {
notifyWhiteboardLimit,
resetWhiteboard,
restrictWhiteboard,
setWhiteboardOpen,
setupWhiteboard
} from './actions';
import { WHITEBOARD_ID } from './constants';
import {
isWhiteboardOpen,
shouldEnforceUserLimit,
shouldNotifyUserLimit
} from './functions';
MiddlewareRegistry.register((store: IStore) => next => action => {
const state = store.getState();
switch (action.type) {
case SET_WHITEBOARD_OPEN: {
const enforceUserLimit = shouldEnforceUserLimit(state);
const notifyUserLimit = shouldNotifyUserLimit(state);
if (action.isOpen && !enforceUserLimit && !notifyUserLimit) {
sendAnalytics(createOpenWhiteboardEvent());
return next(action);
}
break;
}
}
return next(action);
});
/**
* Set up state change listener to perform maintenance tasks when the conference
* is left or failed, e.g. Disable the whiteboard if it's left open.
*/
StateListenerRegistry.register(
state => getCurrentConference(state),
(conference, { dispatch }, previousConference): void => {
if (conference !== previousConference) {
dispatch(resetWhiteboard());
}
if (conference && !previousConference) {
conference.on(JitsiConferenceEvents.METADATA_UPDATED, (metadata: any) => {
if (metadata[WHITEBOARD_ID]) {
dispatch(setupWhiteboard({
collabDetails: metadata[WHITEBOARD_ID].collabDetails
}));
dispatch(setWhiteboardOpen(true));
}
});
}
});
/**
* Set up state change listener to limit whiteboard access.
*/
StateListenerRegistry.register(
state => shouldEnforceUserLimit(state),
(enforceUserLimit, { dispatch, getState }): void => {
if (isWhiteboardOpen(getState()) && enforceUserLimit) {
dispatch(restrictWhiteboard());
}
}
);
/**
* Set up state change listener to notify about whiteboard usage.
*/
StateListenerRegistry.register(
state => shouldNotifyUserLimit(state),
(notifyUserLimit, { dispatch, getState }, prevNotifyUserLimit): void => {
if (isWhiteboardOpen(getState()) && notifyUserLimit && !prevNotifyUserLimit) {
dispatch(notifyWhiteboardLimit());
}
}
);

@ -0,0 +1,80 @@
import { AnyAction } from 'redux';
import { IStore } from '../app/types';
import { hideDialog, openDialog } from '../base/dialog/actions';
import { isDialogOpen } from '../base/dialog/functions';
import { getLocalParticipant } from '../base/participants/functions';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { navigateRoot } from '../mobile/navigation/rootNavigationContainerRef';
import { screen } from '../mobile/navigation/routes';
import { SET_WHITEBOARD_OPEN } from './actionTypes';
import {
notifyWhiteboardLimit,
restrictWhiteboard
} from './actions';
import WhiteboardLimitDialog from './components/native/WhiteboardLimitDialog';
import {
getCollabDetails,
getCollabServerUrl,
shouldEnforceUserLimit,
shouldNotifyUserLimit
} from './functions';
import './middleware.any';
/**
* Middleware which intercepts whiteboard actions to handle changes to the related state.
*
* @param {Store} store - The redux store.
* @returns {Function}
*/
MiddlewareRegistry.register((store: IStore) => (next: Function) => async (action: AnyAction) => {
const { dispatch, getState } = store;
const state = getState();
switch (action.type) {
case SET_WHITEBOARD_OPEN: {
const enforceUserLimit = shouldEnforceUserLimit(state);
const notifyUserLimit = shouldNotifyUserLimit(state);
if (enforceUserLimit) {
dispatch(restrictWhiteboard(false));
dispatch(openDialog(WhiteboardLimitDialog));
return next(action);
}
if (action.isOpen) {
if (enforceUserLimit) {
dispatch(restrictWhiteboard());
return next(action);
}
if (notifyUserLimit) {
dispatch(notifyWhiteboardLimit());
}
if (isDialogOpen(state, WhiteboardLimitDialog)) {
dispatch(hideDialog(WhiteboardLimitDialog));
}
const collabDetails = getCollabDetails(state);
const collabServerUrl = getCollabServerUrl(state);
const localParticipantName = getLocalParticipant(state)?.name;
navigateRoot(screen.conference.whiteboard, {
collabDetails,
collabServerUrl,
localParticipantName
});
return next(action);
}
break;
}
}
return next(action);
});

@ -1,17 +1,13 @@
import { generateCollaborationLinkData } from '@jitsi/excalidraw';
import { AnyAction } from 'redux';
import { createOpenWhiteboardEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
import { IStore } from '../app/types';
import { getCurrentConference } from '../base/conference/functions';
import { hideDialog, openDialog } from '../base/dialog/actions';
import { isDialogOpen } from '../base/dialog/functions';
import { JitsiConferenceEvents } from '../base/lib-jitsi-meet';
import { participantJoined, participantLeft, pinParticipant } from '../base/participants/actions';
import { FakeParticipant } from '../base/participants/types';
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import StateListenerRegistry from '../base/redux/StateListenerRegistry';
import { getCurrentRoomId } from '../breakout-rooms/functions';
import { addStageParticipant } from '../filmstrip/actions.web';
import { isStageFilmstripAvailable } from '../filmstrip/functions.web';
@ -19,9 +15,7 @@ import { isStageFilmstripAvailable } from '../filmstrip/functions.web';
import { RESET_WHITEBOARD, SET_WHITEBOARD_OPEN } from './actionTypes';
import {
notifyWhiteboardLimit,
resetWhiteboard,
restrictWhiteboard,
setWhiteboardOpen,
setupWhiteboard
} from './actions';
import WhiteboardLimitDialog from './components/web/WhiteboardLimitDialog';
@ -29,13 +23,14 @@ import { WHITEBOARD_ID, WHITEBOARD_PARTICIPANT_NAME } from './constants';
import {
getCollabDetails,
getCollabServerUrl,
isWhiteboardOpen,
isWhiteboardPresent,
shouldEnforceUserLimit,
shouldNotifyUserLimit
} from './functions';
import { WhiteboardStatus } from './types';
import './middleware.any';
const focusWhiteboard = (store: IStore) => {
const { dispatch, getState } = store;
const state = getState();
@ -79,7 +74,7 @@ MiddlewareRegistry.register((store: IStore) => (next: Function) => async (action
dispatch(restrictWhiteboard(false));
dispatch(openDialog(WhiteboardLimitDialog));
return;
return next(action);
}
if (!existingCollabDetails) {
@ -99,14 +94,14 @@ MiddlewareRegistry.register((store: IStore) => (next: Function) => async (action
});
raiseWhiteboardNotification(WhiteboardStatus.INSTANTIATED);
return;
return next(action);
}
if (action.isOpen) {
if (enforceUserLimit) {
dispatch(restrictWhiteboard());
return;
return next(action);
}
if (notifyUserLimit) {
@ -118,10 +113,9 @@ MiddlewareRegistry.register((store: IStore) => (next: Function) => async (action
}
focusWhiteboard(store);
sendAnalytics(createOpenWhiteboardEvent());
raiseWhiteboardNotification(WhiteboardStatus.SHOWN);
return;
return next(action);
}
dispatch(participantLeft(WHITEBOARD_ID, conference, { fakeParticipant: FakeParticipant.Whiteboard }));
@ -152,49 +146,3 @@ function raiseWhiteboardNotification(status: WhiteboardStatus) {
}
}
/**
* Set up state change listener to perform maintenance tasks when the conference
* is left or failed, e.g. Disable the whiteboard if it's left open.
*/
StateListenerRegistry.register(
state => getCurrentConference(state),
(conference, { dispatch }, previousConference): void => {
if (conference !== previousConference) {
dispatch(resetWhiteboard());
}
if (conference && !previousConference) {
conference.on(JitsiConferenceEvents.METADATA_UPDATED, (metadata: any) => {
if (metadata[WHITEBOARD_ID]) {
dispatch(setupWhiteboard({
collabDetails: metadata[WHITEBOARD_ID].collabDetails
}));
dispatch(setWhiteboardOpen(true));
}
});
}
});
/**
* Set up state change listener to limit whiteboard access.
*/
StateListenerRegistry.register(
state => shouldEnforceUserLimit(state),
(enforceUserLimit, { dispatch, getState }): void => {
if (isWhiteboardOpen(getState()) && enforceUserLimit) {
dispatch(restrictWhiteboard());
}
}
);
/**
* Set up state change listener to notify about whiteboard usage.
*/
StateListenerRegistry.register(
state => shouldNotifyUserLimit(state),
(notifyUserLimit, { dispatch, getState }, prevNotifyUserLimit): void => {
if (isWhiteboardOpen(getState()) && notifyUserLimit && !prevNotifyUserLimit) {
dispatch(notifyWhiteboardLimit());
}
}
);

@ -7,6 +7,7 @@ import Platform from './features/base/react/Platform.web';
import { getJitsiMeetGlobalNS } from './features/base/util/helpers';
import DialInSummaryApp from './features/invite/components/dial-in-summary/web/DialInSummaryApp';
import PrejoinApp from './features/prejoin/components/web/PrejoinApp';
import WhiteboardApp from './features/whiteboard/components/web/WhiteboardApp';
const logger = getLogger('index.web');
@ -60,7 +61,8 @@ document.addEventListener('DOMContentLoaded', () => {
globalNS.entryPoints = {
APP: App,
PREJOIN: PrejoinApp,
DIALIN: DialInSummaryApp
DIALIN: DialInSummaryApp,
WHITEBOARD: WhiteboardApp
};
globalNS.renderEntryPoint = ({

@ -0,0 +1,33 @@
<html xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--#include virtual="/base.html" -->
<link rel="stylesheet" href="css/all.css">
<script>
window.EXCALIDRAW_ASSET_PATH = 'libs/';
document.addEventListener('DOMContentLoaded', async () => {
if (!JitsiMeetJS.app) {
return;
}
JitsiMeetJS.app.renderEntryPoint({
Component: JitsiMeetJS.app.entryPoints.WHITEBOARD
});
});
</script>
<!--#include virtual="/title.html" -->
<script><!--#include virtual="/config.js" --></script>
<script><!--#include virtual="/interface_config.js" --></script>
<script src="libs/lib-jitsi-meet.min.js?v=139"></script>
<script src="libs/app.bundle.min.js?v=139"></script>
</head>
<body>
<div id="react" role="main"></div>
</body>
</html>
Loading…
Cancel
Save