Merge pull request #741 from ritzalam/investigate-video-disconnect
- add timestamps on client side log to correlate webcam stopping
This commit is contained in:
commit
82e8f724a2
@ -170,28 +170,29 @@ public class VideoStreamListener implements IStreamListener {
|
||||
private boolean streamStopped = false;
|
||||
|
||||
public void execute(ISchedulingService service) {
|
||||
Map<String, Object> logData = new HashMap<String, Object>();
|
||||
logData.put("meetingId", scope.getName());
|
||||
logData.put("userId", userId);
|
||||
logData.put("stream", stream.getPublishedName());
|
||||
logData.put("packetCount", packetCount);
|
||||
logData.put("publishing", publishing);
|
||||
|
||||
Gson gson = new Gson();
|
||||
|
||||
long now = System.currentTimeMillis();
|
||||
if ((now - lastVideoTime) > videoTimeout && !streamPaused) {
|
||||
streamPaused = true;
|
||||
long numSeconds = (now - lastVideoTime)/1000;
|
||||
|
||||
Map<String, Object> logData = new HashMap<String, Object>();
|
||||
logData.put("meetingId", scope.getName());
|
||||
logData.put("userId", userId);
|
||||
logData.put("stream", stream.getPublishedName());
|
||||
logData.put("packetCount", packetCount);
|
||||
logData.put("publishing", publishing);
|
||||
|
||||
logData.put("lastPacketTime (sec)", numSeconds);
|
||||
|
||||
Gson gson = new Gson();
|
||||
|
||||
String logStr = gson.toJson(logData);
|
||||
|
||||
log.warn("Video packet timeout. data={}", logStr );
|
||||
|
||||
if (!publishing) {
|
||||
// remove the scheduled job
|
||||
scheduler.removeScheduledJob(timeoutJobName);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (!streamStopped) {
|
||||
@ -206,6 +207,13 @@ public class VideoStreamListener implements IStreamListener {
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
String logStr = gson.toJson(logData);
|
||||
if (!publishing) {
|
||||
log.warn("Removing scheduled job. data={}", logStr );
|
||||
// remove the scheduled job
|
||||
scheduler.removeScheduledJob(timeoutJobName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package org.bigbluebutton.red5.client;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
@ -381,7 +383,9 @@ public class UserClientMessageSender {
|
||||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("userId", msg.userId);
|
||||
args.put("webcamStream", msg.stream);
|
||||
args.put("serverTimestamp", System.currentTimeMillis());
|
||||
|
||||
String timeStamp = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(Calendar.getInstance().getTime());
|
||||
args.put("serverTimestamp", timeStamp );
|
||||
|
||||
Map<String, Object> message = new HashMap<String, Object>();
|
||||
Gson gson = new Gson();
|
||||
|
7
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Normal file → Executable file
7
bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as
Normal file → Executable file
@ -23,6 +23,7 @@ package org.bigbluebutton.modules.users.services
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.UsersUtil;
|
||||
import org.bigbluebutton.core.managers.ConnectionManager;
|
||||
import org.bigbluebutton.main.api.JSLog;
|
||||
|
||||
public class MessageSender {
|
||||
private static const LOGGER:ILogger = getClassLogger(MessageSender);
|
||||
@ -117,6 +118,12 @@ package org.bigbluebutton.modules.users.services
|
||||
|
||||
public function removeStream(userID:String, streamName:String):void {
|
||||
LOGGER.debug("sending unshare webcam to server for user=[{0}] stream=[{1}]", [userID, streamName]);
|
||||
|
||||
var logData:Object = new Object();
|
||||
logData.user = UsersUtil.getUserData();
|
||||
|
||||
JSLog.warn("User stopped sharing webcam event.", logData);
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
_nc.sendMessage("participants.unshareWebcam",
|
||||
function(result:String):void { // On successful result
|
||||
|
Loading…
Reference in New Issue
Block a user