WIP streamer stuff
This commit is contained in:
parent
ac22b1623e
commit
88fad50233
@ -35,8 +35,9 @@ export function publishCursorUpdate(payload) {
|
||||
}
|
||||
|
||||
export function initCursorStreamListener() {
|
||||
logger.debug({
|
||||
logger.info({
|
||||
logCode: 'init_cursor_stream_listener',
|
||||
extraInfo: { meetingId: Auth.meetingID, userId: Auth.userID },
|
||||
}, 'initCursorStreamListener called');
|
||||
|
||||
if (!cursorStreamListener) {
|
||||
|
@ -6,8 +6,7 @@ import GroupChat from '/imports/api/group-chat';
|
||||
import Users from '/imports/api/users';
|
||||
import Annotations from '/imports/api/annotations';
|
||||
import AnnotationsTextService from '/imports/ui/components/whiteboard/annotations/text/service';
|
||||
import AnnotationsLocal, { initAnnotationsStreamListener } from '/imports/ui/components/whiteboard/service';
|
||||
import { initCursorStreamListener } from '/imports/ui/components/cursor/service';
|
||||
import AnnotationsLocal from '/imports/ui/components/whiteboard/service';
|
||||
|
||||
|
||||
const CHAT_CONFIG = Meteor.settings.public.chat;
|
||||
@ -95,9 +94,6 @@ export default withTracker(() => {
|
||||
Meteor.subscribe('users', credentials, userIsModerator, subscriptionErrorHandler);
|
||||
Meteor.subscribe('breakouts', credentials, userIsModerator, subscriptionErrorHandler);
|
||||
Meteor.subscribe('meetings', credentials, userIsModerator, subscriptionErrorHandler);
|
||||
logger.debug({ logCode: 'startup_client_subscription_init_streamers', extraInfo: { role: User.role } }, 'Calling init streamers functions');
|
||||
initAnnotationsStreamListener();
|
||||
initCursorStreamListener();
|
||||
}
|
||||
|
||||
const annotationsHandler = Meteor.subscribe('annotations', credentials, {
|
||||
|
@ -6,6 +6,8 @@ import Storage from '/imports/ui/services/storage/session';
|
||||
import Users from '/imports/api/users';
|
||||
import logger from '/imports/startup/client/logger';
|
||||
import { makeCall } from '/imports/ui/services/api';
|
||||
import { initAnnotationsStreamListener } from '/imports/ui/components/whiteboard/service';
|
||||
import { initCursorStreamListener } from '/imports/ui/components/cursor/service';
|
||||
|
||||
const CONNECTION_TIMEOUT = Meteor.settings.public.app.connectionTimeout;
|
||||
|
||||
@ -220,7 +222,7 @@ class Auth {
|
||||
|
||||
const selector = { meetingId: this.meetingID, userId: this.userID };
|
||||
const fields = {
|
||||
intId: 1, ejected: 1, validated: 1, connectionStatus: 1,
|
||||
intId: 1, ejected: 1, validated: 1, connectionStatus: 1, userId: 1,
|
||||
};
|
||||
const User = Users.findOne(selector, { fields });
|
||||
// Skip in case the user is not in the collection yet or is a dummy user
|
||||
@ -239,6 +241,9 @@ class Auth {
|
||||
}
|
||||
|
||||
if (User.validated === true && User.connectionStatus === 'online') {
|
||||
logger.info({ logCode: 'auth_service_init_streamers', extraInfo: { userId: User.userId } }, 'Calling init streamers functions');
|
||||
initCursorStreamListener();
|
||||
initAnnotationsStreamListener();
|
||||
computation.stop();
|
||||
clearTimeout(validationTimeout);
|
||||
// setTimeout to prevent race-conditions with subscription
|
||||
|
@ -302,7 +302,7 @@ public:
|
||||
- pencil
|
||||
- hand
|
||||
clientLog:
|
||||
server: { enabled: true, level: info }
|
||||
server: { enabled: true, level: debug }
|
||||
console: { enabled: true, level: debug }
|
||||
external: { enabled: false, level: info, url: https://LOG_HOST/html5Log, method: POST, throttleInterval: 400, flushOnClose: true, logTag: "" }
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user