add default webcam_stream and adjust emoji

This commit is contained in:
Anton Georgiev 2017-06-28 11:33:03 -04:00
parent 724e21a0d6
commit e0a5fa48f4
4 changed files with 6 additions and 35 deletions

View File

@ -1,40 +1,10 @@
import { check } from 'meteor/check';
import addUser from '../modifiers/addUser';
/*{
"envelope": {
"name": "UserJoinedMeetingEvtMsg",
"routing": {
"msgType": "BROADCAST_TO_MEETING",
"meetingId": "183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1498049295768",
"userId": "w_sbqdhyjw7a2w"
}
},
"core": {
"header": {
"name": "UserJoinedMeetingEvtMsg",
"meetingId": "183f0bf3a0982a127bdb8161e0c44eb696b3e75c-1498049295768",
"userId": "w_sbqdhyjw7a2w"
},
"body": {
"intId": "w_sbqdhyjw7a2w",
"extId": "w_sbqdhyjw7a2w",
"name": "user2",
"role": "MODERATOR",
"guest": false,
"authed": false,
"waitingForAcceptance": false,
"emoji": "none",
"presenter": false,
"locked": false,
"avatar": "http://10.30.10.214/client/avatar.png"
}
}
}*/
export default function handleUserJoined({ header, body }) {
const meetingId = header.meetingId;
const user = body;
check(meetingId, String);
check(user, Object);

View File

@ -52,14 +52,14 @@ export default function addUser(meetingId, user) {
'user.avatarURL': user.avatar,
'user.set_emoji_time': user.set_emoji_time || (new Date()).getTime(),
'user.joiningTime': (new Date()).getTime(),
'user.emoji_status': user.emoji_status,
'user.emoji_status': user.emoji,
'user.presenter': user.presenter,
'user.locked': user.locked,
'user.listenOnly': user.listenOnly,
// default values for voiceUser and webcam
'user.webcam_stream': [],
'user.voiceUser.web_userid': false,
'user.voiceUser.webcam_stream': [],
'user.voiceUser.callernum': false,
'user.voiceUser.userid': false,
'user.voiceUser.talking': false,

View File

@ -65,7 +65,7 @@ class RedisPubSub {
}
handleMessage(pattern, channel, message = '') {
console.log(' 1.1: ' + message);
console.log(` 1.1: ${message}`);
try {
message = JSON.parse(message);
} catch (e) {}

View File

@ -131,4 +131,5 @@ Meteor.startup(() => {
RedisPubSubSingleton.init();
});
export default RedisPubSubSingleton;
export default RedisPubSubSingleton;