use of org.bigbluebutton.app.screenshare.ScreenshareStreamListener in project bigbluebutton by bigbluebutton.
the class Red5AppAdapter method streamBroadcastStart.
@Override
public void streamBroadcastStart(IBroadcastStream stream) {
IConnection conn = Red5.getConnectionLocal();
super.streamBroadcastStart(stream);
log.info("streamBroadcastStart " + stream.getPublishedName() + "]");
String streamId = stream.getPublishedName();
Matcher matcher = STREAM_ID_PATTERN.matcher(stream.getPublishedName());
if (matcher.matches()) {
String meetingId = matcher.group(1).trim();
String url = streamBaseUrl + "/" + meetingId + "/" + streamId;
app.streamStarted(meetingId, streamId, url);
boolean recordVideoStream = app.recordStream(meetingId, streamId);
if (recordVideoStream) {
recordStream(stream);
ScreenshareStreamListener listener = new ScreenshareStreamListener(recordingService, recordingDirectory);
stream.addStreamListener(listener);
streamListeners.put(conn.getScope().getName() + "-" + stream.getPublishedName(), listener);
}
Map<String, Object> logData = new HashMap<String, Object>();
logData.put("meetingId", meetingId);
logData.put("streamId", streamId);
logData.put("url", url);
logData.put("recorded", recordVideoStream);
Gson gson = new Gson();
String logStr = gson.toJson(logData);
log.info("ScreenShare broadcast started: data={}", logStr);
} else {
log.error("Invalid streamid format [{}]", streamId);
}
}
Aggregations