bigbluebutton-Github/bigbluebutton-html5/imports/api/external-videos/server/handlers/updateExternalVideo.js

25 lines
880 B
JavaScript
Raw Normal View History

Committer: Antonio Guirado <amguirado73@gmail.com> Changes to be committed: new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/ExternalVideoApp2x.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StopExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/UpdateExternalVideoPubMsgHdlr.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala new file: bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/ExternalVideoMsgs.scala new file: bigbluebutton-html5/imports/api/external-videos/server/eventHandlers.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/startExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/stopExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/updateExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/index.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/emitExternalVideoEvent.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/startWatchingExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/stopWatchingExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/streamer.js modified: bigbluebutton-html5/imports/api/meetings/server/handlers/meetingDestruction.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/meetingHasEnded.js modified: bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js modified: bigbluebutton-html5/imports/api/users/server/store/bannedUsers.js modified: bigbluebutton-html5/imports/startup/server/index.js modified: bigbluebutton-html5/imports/startup/server/redis.js modified: bigbluebutton-html5/imports/ui/components/external-video-player/service.js modified: bigbluebutton-html5/private/config/settings.yml
2020-08-28 18:58:55 +08:00
import { check } from 'meteor/check';
import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
import ExternalVideoStreamer from '/imports/api/external-videos/server/streamer';
export default function handleUpdateExternalVideo({ header, body }, meetingId) {
const { userId } = header;
check(body, Object);
check(meetingId, String);
check(userId, String);
const user = Users.findOne({ meetingId: meetingId, userId: userId })
if (user && user.presenter) {
try {
Committer: Antonio Guirado <amguirado73@gmail.com> Changes to be committed: new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/ExternalVideoApp2x.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StopExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/UpdateExternalVideoPubMsgHdlr.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala new file: bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/ExternalVideoMsgs.scala new file: bigbluebutton-html5/imports/api/external-videos/server/eventHandlers.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/startExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/stopExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/updateExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/index.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/emitExternalVideoEvent.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/startWatchingExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/stopWatchingExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/streamer.js modified: bigbluebutton-html5/imports/api/meetings/server/handlers/meetingDestruction.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/meetingHasEnded.js modified: bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js modified: bigbluebutton-html5/imports/api/users/server/store/bannedUsers.js modified: bigbluebutton-html5/imports/startup/server/index.js modified: bigbluebutton-html5/imports/startup/server/redis.js modified: bigbluebutton-html5/imports/ui/components/external-video-player/service.js modified: bigbluebutton-html5/private/config/settings.yml
2020-08-28 18:58:55 +08:00
Logger.info(`UpdateExternalVideoEvtMsg received for user ${userId} and meeting ${meetingId} event:${body.status}`);
ExternalVideoStreamer(meetingId).emit(body.status, { ...body, meetingId: meetingId, userId: userId });
} catch (err) {
Logger.error(`Error on setting shared external video update in Meetings collection: ${err}`);
}
Committer: Antonio Guirado <amguirado73@gmail.com> Changes to be committed: new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/ExternalVideoApp2x.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StartExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/StopExternalVideoPubMsgHdlr.scala new file: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/apps/externalvideo/UpdateExternalVideoPubMsgHdlr.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala modified: akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/FromAkkaAppsMsgSenderActor.scala new file: bbb-common-message/src/main/scala/org/bigbluebutton/common2/msgs/ExternalVideoMsgs.scala new file: bigbluebutton-html5/imports/api/external-videos/server/eventHandlers.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/startExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/stopExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/handlers/updateExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/index.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/emitExternalVideoEvent.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/startWatchingExternalVideo.js modified: bigbluebutton-html5/imports/api/external-videos/server/methods/stopWatchingExternalVideo.js new file: bigbluebutton-html5/imports/api/external-videos/server/streamer.js modified: bigbluebutton-html5/imports/api/meetings/server/handlers/meetingDestruction.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/addMeeting.js modified: bigbluebutton-html5/imports/api/meetings/server/modifiers/meetingHasEnded.js modified: bigbluebutton-html5/imports/api/users/server/handlers/validateAuthToken.js modified: bigbluebutton-html5/imports/api/users/server/store/bannedUsers.js modified: bigbluebutton-html5/imports/startup/server/index.js modified: bigbluebutton-html5/imports/startup/server/redis.js modified: bigbluebutton-html5/imports/ui/components/external-video-player/service.js modified: bigbluebutton-html5/private/config/settings.yml
2020-08-28 18:58:55 +08:00
}
}