- allow broadcasting even if the meeting isn't being recorded
This commit is contained in:
parent
be9c0e0f05
commit
c593d94447
@ -66,6 +66,10 @@ public class ConferenceService implements ConferenceEventListener {
|
||||
confProvider.record(room, meetingid);
|
||||
}
|
||||
|
||||
public void broadcastSession(String room, String meetingid) {
|
||||
confProvider.broadcast(room, meetingid);
|
||||
}
|
||||
|
||||
public void mute(Integer participant, String room, Boolean mute) {
|
||||
if (roomMgr.hasParticipant(room, participant))
|
||||
muteParticipant(participant, room, mute);
|
||||
|
@ -30,5 +30,6 @@ public interface ConferenceServiceProvider {
|
||||
public void mute(String room, Integer participant, Boolean mute);
|
||||
public void eject(String room, Integer participant);
|
||||
public void record(String room, String meetingid);
|
||||
public void broadcast(String room, String meetingid);
|
||||
public void setConferenceEventListener(ConferenceEventListener l);
|
||||
}
|
||||
|
@ -170,12 +170,15 @@ public class FreeswitchApplication extends Observable implements ConferenceServi
|
||||
// Let's see if we can recover the connection.
|
||||
startHeartbeatMonitor();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void broadcast(String room, String meetingid) {
|
||||
if (icecastBroadcast) {
|
||||
broadcastToIcecast(room, meetingid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void broadcastToIcecast(String room, String meetingid) {
|
||||
String shoutPath = "shout://" + icecastUsername + ":" + icecastPassword + "@" + icecastHost + ":" + icecastPort
|
||||
+ File.separatorChar + meetingid + ".mp3";
|
||||
|
@ -42,6 +42,11 @@ public class FreeswitchServiceProvider implements ConferenceServiceProvider {
|
||||
public void record(String room, String meetingid){
|
||||
appDelegate.record(room,meetingid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void broadcast(String room, String meetingid){
|
||||
appDelegate.broadcast(room,meetingid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void eject(String room, Integer participant) {
|
||||
|
@ -153,18 +153,25 @@ public class RoomManager {
|
||||
|
||||
rm.add(p);
|
||||
|
||||
if ((rm.numParticipants() == 1) && rm.record() && !rm.isRecording()) {
|
||||
/**
|
||||
* Start recording when the first user joins the voice conference.
|
||||
* WARNING: Works only with FreeSWITCH for now. We need to come up with a generic way to
|
||||
* trigger recording for both Asterisk and FreeSWITCH.
|
||||
*/
|
||||
rm.recording(true);
|
||||
log.debug("Starting recording of voice conference");
|
||||
log.warn(" ** WARNING: Prototyping only. Works only with FreeSWITCH for now. We need to come up with a generic way to trigger recording for both Asterisk and FreeSWITCH.");
|
||||
confService.recordSession(event.getRoom(), rm.getMeeting());
|
||||
if (rm.numParticipants() == 1) {
|
||||
if (rm.record() && !rm.isRecording()) {
|
||||
/**
|
||||
* Start recording when the first user joins the voice conference.
|
||||
* WARNING: Works only with FreeSWITCH for now. We need to come up with a generic way to
|
||||
* trigger recording for both Asterisk and FreeSWITCH.
|
||||
*/
|
||||
rm.recording(true);
|
||||
log.debug("Starting recording of voice conference");
|
||||
log.warn(" ** WARNING: Prototyping only. Works only with FreeSWITCH for now. We need to come up with a generic way to trigger recording for both Asterisk and FreeSWITCH.");
|
||||
confService.recordSession(event.getRoom(), rm.getMeeting());
|
||||
}
|
||||
|
||||
// Broadcast the audio
|
||||
confService.broadcastSession(event.getRoom(), rm.getMeeting());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (rm.isMuted() && !p.isMuted()) {
|
||||
confService.mute(p.getId(), event.getRoom(), true);
|
||||
}
|
||||
|
@ -35,4 +35,4 @@ icecast.host=127.0.0.1
|
||||
icecast.port=8000
|
||||
icecast.username=source
|
||||
icecast.password=hackme
|
||||
icecast.broadcast=true
|
||||
icecast.broadcast=false
|
||||
|
Loading…
Reference in New Issue
Block a user