diff --git a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx
index 90b65282e1..eef5471ae2 100755
--- a/bigbluebutton-html5/imports/ui/components/presentation/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/presentation/component.jsx
@@ -858,6 +858,7 @@ class Presentation extends PureComponent {
layoutSwapped,
podId,
intl,
+ isViewersCursorLocked,
} = this.props;
const {
@@ -942,6 +943,7 @@ class Presentation extends PureComponent {
svgUri={currentSlide?.svgUri}
intl={intl}
presentationBounds={presentationBounds}
+ isViewersCursorLocked={isViewersCursorLocked}
/>
{isFullscreen && }
{this.renderPresentationToolbar()}
@@ -975,7 +977,9 @@ class Presentation extends PureComponent {
: null}
*/}
- >
+
+
+ >
);
}
}
diff --git a/bigbluebutton-html5/imports/ui/components/presentation/container.jsx b/bigbluebutton-html5/imports/ui/components/presentation/container.jsx
index 1593249102..d3c0ddf075 100755
--- a/bigbluebutton-html5/imports/ui/components/presentation/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/presentation/container.jsx
@@ -15,6 +15,7 @@ import {
layoutSelectOutput,
layoutDispatch,
} from '../layout/context';
+import lockContextContainer from "/imports/ui/components/lock-viewers/context/container";
import WhiteboardService from '/imports/ui/components/whiteboard/service';
import { DEVICE_TYPE } from '../layout/enums';
@@ -64,9 +65,11 @@ const APP_CONFIG = Meteor.settings.public.app;
const PRELOAD_NEXT_SLIDE = APP_CONFIG.preloadNextSlides;
const fetchedpresentation = {};
-export default withTracker(({ podId, presentationIsOpen }) => {
+export default lockContextContainer(
+ withTracker(({ podId, presentationIsOpen, userLocks }) => {
const currentSlide = PresentationService.getCurrentSlide(podId);
const presentationIsDownloadable = PresentationService.isPresentationDownloadable(podId);
+ const isViewersCursorLocked = userLocks?.hideViewersCursor;
let slidePosition;
if (currentSlide) {
@@ -134,5 +137,6 @@ export default withTracker(({ podId, presentationIsOpen }) => {
addWhiteboardGlobalAccess: WhiteboardService.addGlobalAccess,
removeWhiteboardGlobalAccess: WhiteboardService.removeGlobalAccess,
multiUserSize: WhiteboardService.getMultiUserSize(currentSlide?.id),
+ isViewersCursorLocked,
};
-})(PresentationContainer);
+})(PresentationContainer));
diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
index 75b51c3498..311732c40d 100644
--- a/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
+++ b/bigbluebutton-html5/imports/ui/components/whiteboard/component.jsx
@@ -45,7 +45,8 @@ export default function Whiteboard(props) {
slidePosition,
curPageId,
svgUri,
- presentationBounds
+ presentationBounds,
+ isViewersCursorLocked,
} = props;
const { pages, pageStates } = initDefaultPages(curPres?.pages.length || 1);
@@ -218,6 +219,7 @@ export default function Whiteboard(props) {
tldrawAPI={tldrawAPI}
currentUser={currentUser}
whiteboardId={whiteboardId}
+ isViewersCursorLocked={isViewersCursorLocked}
>
{
!cursorWrapper.hasOwnProperty("mouseenter") &&
@@ -127,7 +128,7 @@ export default function Cursors(props) {
!cursorWrapper.hasOwnProperty("mouseleave") &&
cursorWrapper?.addEventListener("mouseleave", (event) => {
publishCursorUpdate({
- xPercent: null,
+ xPercent: null,
yPercent: null,
whiteboardId: whiteboardId,
});
@@ -152,6 +153,12 @@ export default function Cursors(props) {
{otherCursors
.filter((c) => c?.xPercent && c?.yPercent)
+ .filter((c) => {
+ if ((isViewersCursorLocked && c?.role !== "VIEWER") || !isViewersCursorLocked || currentUser?.presenter) {
+ return c;
+ }
+ return null;
+ })
.map((c) => {
return (
c &&
diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/cursors/container.jsx b/bigbluebutton-html5/imports/ui/components/whiteboard/cursors/container.jsx
index e46eec231f..8ec65d48ea 100644
--- a/bigbluebutton-html5/imports/ui/components/whiteboard/cursors/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/whiteboard/cursors/container.jsx
@@ -7,11 +7,14 @@ const CursorsContainer = (props) => {
return
};
-export default withTracker(({ currentUser, tldrawAPI, whiteboardId }) => {
- return {
- currentUser,
- publishCursorUpdate: Service.publishCursorUpdate,
- otherCursors: Service.getCurrentCursors(whiteboardId),
- tldrawAPI,
- };
-})(CursorsContainer);
+export default
+ withTracker((params) => {
+ return {
+ currentUser: params.currentUser,
+ publishCursorUpdate: Service.publishCursorUpdate,
+ otherCursors: Service.getCurrentCursors(params.whiteboardId),
+ tldrawAPI: params.tldrawAPI,
+ isViewersCursorLocked: params.isViewersCursorLocked,
+ };
+ })(CursorsContainer)
+;