diff --git a/bbb-video/src/main/java/org/bigbluebutton/app/video/VideoStreamListener.java b/bbb-video/src/main/java/org/bigbluebutton/app/video/VideoStreamListener.java index 9e5c5e7bb9..9319ce5cdf 100755 --- a/bbb-video/src/main/java/org/bigbluebutton/app/video/VideoStreamListener.java +++ b/bbb-video/src/main/java/org/bigbluebutton/app/video/VideoStreamListener.java @@ -170,28 +170,29 @@ public class VideoStreamListener implements IStreamListener { private boolean streamStopped = false; public void execute(ISchedulingService service) { + Map logData = new HashMap(); + 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 logData = new HashMap(); - 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); + } } } diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/red5/client/UserClientMessageSender.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/red5/client/UserClientMessageSender.java index e30833c325..373fea1478 100755 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/red5/client/UserClientMessageSender.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/red5/client/UserClientMessageSender.java @@ -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 args = new HashMap(); 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 message = new HashMap(); Gson gson = new Gson(); diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as old mode 100644 new mode 100755 index 15e458f274..2bec27498a --- a/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/users/services/MessageSender.as @@ -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