diff --git a/bigbluebutton-html5/imports/ui/components/media/service.js b/bigbluebutton-html5/imports/ui/components/media/service.js
index 783f4ac1f4..794117dda0 100755
--- a/bigbluebutton-html5/imports/ui/components/media/service.js
+++ b/bigbluebutton-html5/imports/ui/components/media/service.js
@@ -1,8 +1,6 @@
import Presentations from '/imports/api/presentations';
import { isVideoBroadcasting } from '/imports/ui/components/screenshare/service';
import { getVideoUrl } from '/imports/ui/components/external-video-player/service';
-import Auth from '/imports/ui/services/auth';
-import Users from '/imports/api/users';
import Settings from '/imports/ui/services/settings';
import getFromUserSettings from '/imports/ui/services/users-settings';
import { ACTIONS } from '../layout/enums';
@@ -21,9 +19,6 @@ const getPresentationInfo = () => {
};
};
-const isUserPresenter = () => Users.findOne({ userId: Auth.userID },
- { fields: { presenter: 1 } }).presenter;
-
function shouldShowWhiteboard() {
return true;
}
@@ -91,7 +86,6 @@ export default {
shouldShowScreenshare,
shouldShowExternalVideo,
shouldShowOverlay,
- isUserPresenter,
isVideoBroadcasting,
toggleSwapLayout,
shouldEnableSwapLayout,
diff --git a/bigbluebutton-html5/imports/ui/components/poll/service.js b/bigbluebutton-html5/imports/ui/components/poll/service.js
index 2a64968e1a..4586d83cc0 100644
--- a/bigbluebutton-html5/imports/ui/components/poll/service.js
+++ b/bigbluebutton-html5/imports/ui/components/poll/service.js
@@ -1,4 +1,3 @@
-import Users from '/imports/api/users';
import Auth from '/imports/ui/services/auth';
import { CurrentPoll } from '/imports/api/polls';
import caseInsensitiveReducer from '/imports/utils/caseInsensitiveReducer';
@@ -212,10 +211,6 @@ const checkPollType = (
};
export default {
- amIPresenter: () => Users.findOne(
- { userId: Auth.userID },
- { fields: { presenter: 1 } },
- ).presenter,
pollTypes,
currentPoll: () => CurrentPoll.findOne({ meetingId: Auth.meetingID }),
pollAnswerIds,
diff --git a/bigbluebutton-html5/imports/ui/components/presentation/service.js b/bigbluebutton-html5/imports/ui/components/presentation/service.js
index df6a9180d7..c8fff960cc 100755
--- a/bigbluebutton-html5/imports/ui/components/presentation/service.js
+++ b/bigbluebutton-html5/imports/ui/components/presentation/service.js
@@ -1,7 +1,5 @@
-import PresentationPods from '/imports/api/presentation-pods';
import Presentations from '/imports/api/presentations';
import { Slides, SlidePositions } from '/imports/api/slides';
-import Auth from '/imports/ui/services/auth';
import PollService from '/imports/ui/components/poll/service';
const POLL_SETTINGS = Meteor.settings.public.poll;
@@ -169,19 +167,9 @@ const parseCurrentSlideContent = (yesValue, noValue, abstentionValue, trueValue,
};
};
-const isPresenter = (podId) => {
- const selector = {
- meetingId: Auth.meetingID,
- podId,
- };
- const pod = PresentationPods.findOne(selector);
- return pod?.currentPresenterId === Auth.userID;
-};
-
export default {
getCurrentSlide,
getSlidePosition,
- isPresenter,
isPresentationDownloadable,
downloadPresentationUri,
currentSlidHasContent,
diff --git a/bigbluebutton-html5/imports/ui/components/screenshare/service.js b/bigbluebutton-html5/imports/ui/components/screenshare/service.js
index 766526af06..2a43842644 100644
--- a/bigbluebutton-html5/imports/ui/components/screenshare/service.js
+++ b/bigbluebutton-html5/imports/ui/components/screenshare/service.js
@@ -6,7 +6,6 @@ import logger from '/imports/startup/client/logger';
import { stopWatching } from '/imports/ui/components/external-video-player/service';
import Meetings from '/imports/api/meetings';
import Auth from '/imports/ui/services/auth';
-import UserListService from '/imports/ui/components/user-list/service';
import AudioService from '/imports/ui/components/audio/service';
import { Meteor } from "meteor/meteor";
import MediaStreamUtils from '/imports/utils/media-stream-utils';
@@ -97,14 +96,14 @@ const attachLocalPreviewStream = (mediaElement) => {
}
}
-const screenshareHasStarted = () => {
+const screenshareHasStarted = (isPresenter) => {
// Presenter's screen preview is local, so skip
- if (!UserListService.amIPresenter()) {
+ if (!isPresenter) {
viewScreenshare();
}
};
-const shareScreen = async (onFail) => {
+const shareScreen = async (isPresenter, onFail) => {
// stop external video share if running
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
@@ -114,7 +113,7 @@ const shareScreen = async (onFail) => {
try {
const stream = await BridgeService.getScreenStream();
- if(!UserListService.isUserPresenter(Auth.userID)) return MediaStreamUtils.stopMediaStreamTracks(stream);
+ if(!isPresenter) return MediaStreamUtils.stopMediaStreamTracks(stream);
await KurentoBridge.share(stream, onFail);
setSharingScreen(true);
} catch (error) {
diff --git a/bigbluebutton-html5/imports/ui/components/user-list/service.js b/bigbluebutton-html5/imports/ui/components/user-list/service.js
index 7c5c36af99..bf313653b4 100755
--- a/bigbluebutton-html5/imports/ui/components/user-list/service.js
+++ b/bigbluebutton-html5/imports/ui/components/user-list/service.js
@@ -595,8 +595,6 @@ const isUserPresenter = (userId) => {
return user ? user.presenter : false;
};
-const amIPresenter = () => isUserPresenter(Auth.userID);
-
export const getUserNamesLink = (docTitle, fnSortedLabel, lnSortedLabel) => {
const mimeType = 'text/plain';
const userNamesObj = getUsers()
@@ -666,7 +664,6 @@ export default {
requestUserInformation,
focusFirstDropDownItem,
isUserPresenter,
- amIPresenter,
getUsersProp,
getUserCount,
sortUsersByCurrent,