use of org.bigbluebutton.freeswitch.voice.events.VoiceUserLeftEvent in project bigbluebutton by bigbluebutton.
the class FreeswitchConferenceEventListener method sendMessageToBigBlueButton.
private void sendMessageToBigBlueButton(final VoiceConferenceEvent event) {
Runnable task = new Runnable() {
public void run() {
if (event instanceof VoiceUserJoinedEvent) {
System.out.println("************** FreeswitchConferenceEventListener received voiceUserJoined ");
VoiceUserJoinedEvent evt = (VoiceUserJoinedEvent) event;
vcs.userJoinedVoiceConf(evt.getRoom(), evt.getVoiceUserId(), evt.getUserId(), evt.getCallerIdName(), evt.getCallerIdNum(), evt.getMuted(), evt.getSpeaking(), evt.getAvatarURL());
} else if (event instanceof VoiceUserLeftEvent) {
System.out.println("************** FreeswitchConferenceEventListener received VoiceUserLeftEvent ");
VoiceUserLeftEvent evt = (VoiceUserLeftEvent) event;
vcs.userLeftVoiceConf(evt.getRoom(), evt.getUserId());
} else if (event instanceof VoiceUserMutedEvent) {
System.out.println("************** FreeswitchConferenceEventListener VoiceUserMutedEvent ");
VoiceUserMutedEvent evt = (VoiceUserMutedEvent) event;
vcs.userMutedInVoiceConf(evt.getRoom(), evt.getUserId(), evt.isMuted());
} else if (event instanceof VoiceUserTalkingEvent) {
System.out.println("************** FreeswitchConferenceEventListener VoiceUserTalkingEvent ");
VoiceUserTalkingEvent evt = (VoiceUserTalkingEvent) event;
vcs.userTalkingInVoiceConf(evt.getRoom(), evt.getUserId(), evt.isTalking());
} else if (event instanceof VoiceStartRecordingEvent) {
VoiceStartRecordingEvent evt = (VoiceStartRecordingEvent) event;
System.out.println("************** FreeswitchConferenceEventListener VoiceStartRecordingEvent recording=[" + evt.startRecord() + "]");
vcs.voiceConfRecordingStarted(evt.getRoom(), evt.getRecordingFilename(), evt.startRecord(), evt.getTimestamp());
} else if (event instanceof DeskShareStartedEvent) {
DeskShareStartedEvent evt = (DeskShareStartedEvent) event;
System.out.println("************** FreeswitchConferenceEventListener DeskShareStartedEvent");
vcs.deskShareStarted(evt.getRoom(), evt.getCallerIdNum(), evt.getCallerIdName());
} else if (event instanceof DeskShareEndedEvent) {
DeskShareEndedEvent evt = (DeskShareEndedEvent) event;
System.out.println("************** FreeswitchConferenceEventListener DeskShareEndedEvent");
vcs.deskShareEnded(evt.getRoom(), evt.getCallerIdNum(), evt.getCallerIdName());
} else if (event instanceof DeskShareRTMPBroadcastEvent) {
if (((DeskShareRTMPBroadcastEvent) event).getBroadcast()) {
DeskShareRTMPBroadcastEvent evt = (DeskShareRTMPBroadcastEvent) event;
System.out.println("************** FreeswitchConferenceEventListener DeskShareRTMPBroadcastStartedEvent");
vcs.deskShareRTMPBroadcastStarted(evt.getRoom(), evt.getBroadcastingStreamUrl(), evt.getVideoWidth(), evt.getVideoHeight(), evt.getTimestamp());
} else {
DeskShareRTMPBroadcastEvent evt = (DeskShareRTMPBroadcastEvent) event;
System.out.println("************** FreeswitchConferenceEventListener DeskShareRTMPBroadcastStoppedEvent");
vcs.deskShareRTMPBroadcastStopped(evt.getRoom(), evt.getBroadcastingStreamUrl(), evt.getVideoWidth(), evt.getVideoHeight(), evt.getTimestamp());
}
}
}
};
runExec.execute(task);
}
use of org.bigbluebutton.freeswitch.voice.events.VoiceUserLeftEvent in project bigbluebutton by bigbluebutton.
the class ESLEventListener method conferenceEventLeave.
@Override
public void conferenceEventLeave(String uniqueId, String confName, int confSize, EslEvent event) {
Integer memberId = this.getMemberIdFromEvent(event);
String callerId = this.getCallerIdFromEvent(event);
String callerIdName = this.getCallerIdNameFromEvent(event);
// Voice conferences' name is of the form ddddd
if (confName.endsWith(DESKSHARE_CONFERENCE_NAME_SUFFIX)) {
System.out.println("User left deskshare conference, user=[" + memberId.toString() + "], " + "conf=[" + confName + "]");
DeskShareEndedEvent dsEnd = new DeskShareEndedEvent(confName, callerId, callerIdName);
conferenceEventListener.handleConferenceEvent(dsEnd);
} else {
System.out.println("User left voice conference, user=[" + memberId.toString() + "], " + "conf=[" + confName + "]");
VoiceUserLeftEvent pl = new VoiceUserLeftEvent(memberId.toString(), confName);
conferenceEventListener.handleConferenceEvent(pl);
}
}
Aggregations