bigbluebutton-Github/bigbluebutton-html5/imports/api/voice-users/server/eventHandlers.js
prlanzarin 001ab9554c video: added voice activity stream sorting, made stream sorting extensible
Video streams can be sorted by voice floor activity in the client according to FreeSWITCH´s floor events. The feature works together with pagination, essentially giving an Last-N like experience while not disrupting too much

Made video stream sorting extensible in a way. The sorting modes for pagination and unbounded can be configured in settings.yml and new sorting modes can be added to the stream sorting util under video-provider. Inline docs explain how to do that

Changed how the stream ID attribute from video-streams collection was passed to downstream components; we had an array map that was executed every change just to map stream to cameraId, which is bizarre. So I changed the cameraId usage in downstream components to be conformat with the collection attributes and shaved off the map where it wasnt needed

Add better selectors to video-list-item container´s VoiceUser fetch
2021-04-12 19:06:07 +00:00

20 lines
1.1 KiB
JavaScript
Executable File

import RedisPubSub from '/imports/startup/server/redis';
import { processForHTML5ServerOnly } from '/imports/api/common/server/helpers';
import handleJoinVoiceUser from './handlers/joinVoiceUser';
import handleLeftVoiceUser from './handlers/leftVoiceUser';
import handleTalkingVoiceUser from './handlers/talkingVoiceUser';
import handleMutedVoiceUser from './handlers/mutedVoiceUser';
import handleGetVoiceUsers from './handlers/getVoiceUsers';
import handleVoiceUsers from './handlers/voiceUsers';
import handleMeetingMuted from './handlers/meetingMuted';
import handleFloorChange from './handlers/floorChanged';
RedisPubSub.on('UserLeftVoiceConfToClientEvtMsg', handleLeftVoiceUser);
RedisPubSub.on('UserJoinedVoiceConfToClientEvtMsg', handleJoinVoiceUser);
RedisPubSub.on('UserTalkingVoiceEvtMsg', handleTalkingVoiceUser);
RedisPubSub.on('UserMutedVoiceEvtMsg', handleMutedVoiceUser);
RedisPubSub.on('GetVoiceUsersMeetingRespMsg', processForHTML5ServerOnly(handleGetVoiceUsers));
RedisPubSub.on('SyncGetVoiceUsersRespMsg', handleVoiceUsers);
RedisPubSub.on('MeetingMutedEvtMsg', handleMeetingMuted);
RedisPubSub.on('AudioFloorChangedEvtMsg', handleFloorChange);