log.debug("*..*setBroadCastingFlag publicSID: " + publicSID);
IConnection current = Red5.getConnectionLocal();
// String streamid = current.getClient().getId();
RoomClient currentClient = this.clientListManager
.getClientByPublicSID(publicSID, false);
if (currentClient == null) {
return -1L;
}
currentClient.setIsBroadcasting(value);
currentClient.setInterviewPodId(interviewPodId);
// Put the mod-flag to true for this client
this.clientListManager.updateClientByStreamId(
currentClient.getStreamid(), currentClient);
// Notify all clients of the same scope (room)
Collection<Set<IConnection>> conCollection = current.getScope()
.getConnections();
for (Set<IConnection> conset : conCollection) {
for (IConnection conn : conset) {
if (conn != null) {
RoomClient rcl = this.clientListManager
.getClientByStreamId(conn.getClient().getId());
if (rcl == null) {
continue;
} else if (rcl.getIsScreenClient() != null
&& rcl.getIsScreenClient()) {
continue;
} else if (rcl.getIsAVClient()) {
continue;
}
log.debug("Send Flag to Client: "
+ rcl.getUsername());
if (conn instanceof IServiceCapableConnection) {
((IServiceCapableConnection) conn).invoke(
"setNewBroadCastingFlag",
new Object[] { currentClient }, this);
log.debug("sending setNewBroadCastingFlag to "