Repository: openmeetings Updated Branches: refs/heads/master a3c720a81 -> e021186d1
no jira: user video displayed faster, client debug mode is added Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/e021186d Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/e021186d Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/e021186d Branch: refs/heads/master Commit: e021186d1eacf3df60d1d26c0b270b2447fd22dc Parents: a3c720a Author: Maxim Solodovnik <[email protected]> Authored: Mon Oct 16 16:29:44 2017 +0700 Committer: Maxim Solodovnik <[email protected]> Committed: Mon Oct 16 16:29:44 2017 +0700 ---------------------------------------------------------------------- openmeetings-flash/src/main/flex/main.mxml | 4 +++- .../flex/org/apache/openmeetings/OmVideo.as | 23 +++++++++++--------- .../openmeetings/web/room/VideoSettings.java | 2 ++ 3 files changed, 18 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e021186d/openmeetings-flash/src/main/flex/main.mxml ---------------------------------------------------------------------- diff --git a/openmeetings-flash/src/main/flex/main.mxml b/openmeetings-flash/src/main/flex/main.mxml index 50f3f83..0f8c526 100644 --- a/openmeetings-flash/src/main/flex/main.mxml +++ b/openmeetings-flash/src/main/flex/main.mxml @@ -75,7 +75,9 @@ private var exclusiveTitle:String; private function debug(...rest):void { - ExternalInterface.call("console.log", rest); + if ('true' === params.debug) { + ExternalInterface.call("console.log", rest); + } } private function camAvail():Boolean { http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e021186d/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as ---------------------------------------------------------------------- diff --git a/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as b/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as index a467b40..52a42d3 100644 --- a/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as +++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as @@ -19,6 +19,7 @@ package org.apache.openmeetings { import flash.events.AsyncErrorEvent; import flash.events.NetStatusEvent; +import flash.events.IOErrorEvent; import flash.external.ExternalInterface; import flash.media.Camera; import flash.media.H264Level; @@ -149,7 +150,9 @@ public class OmVideo { } private function debug(... rest):void { - ExternalInterface.call("console.log", rest); + if ('true' === params.debug) { + ExternalInterface.call("console.log", rest); + } } private function createStream():void { @@ -165,22 +168,22 @@ public class OmVideo { , onCuePoint: function(metadata:Object):void { debug("onCuePoint: ", metadata); } - , ioError: function(error:Object):void { - debug("ioError: ", error); + , ioError: function(e:IOErrorEvent):void { + debug("ioError: ", e); } - , netStatus: function(status:Object):void { - debug("netStatus: ", status); + , netStatus: function(e:NetStatusEvent):void { + debug("netStatus: ", e); } - , asyncError: function(error:Object):void { - debug("asyncError: ", error); + , asyncError: function(e:AsyncErrorEvent):void { + debug("asyncError: ", e); } }; //this is a workaround, attaching the event to the client object does not work ns.addEventListener(NetStatusEvent.NET_STATUS, onNetStatus2); } - private function onNetStatus2(evt:Object):void { - debug("netStream_onNetStatus: ", evt.info.code, evt.target); + private function onNetStatus2(e:NetStatusEvent):void { + debug("netStream_onNetStatus: ", e.info.code); } private function _publish(mode:String, name:String, cam:Camera, mic:Microphone, f:Function):void { @@ -191,6 +194,7 @@ public class OmVideo { this.mic = mic; createStream(); + ns.publish(name, (mode == BROADCAST) ? LIVE : mode); ns.attachCamera(cam); attachCamera(cam); if (cam != null) { @@ -212,7 +216,6 @@ public class OmVideo { ns.attachAudio(mic); _setVolume(volume); - ns.publish(name, (mode == BROADCAST) ? LIVE : mode); if (f != null) { f.call(); } http://git-wip-us.apache.org/repos/asf/openmeetings/blob/e021186d/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java ---------------------------------------------------------------------- diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java index 74f861e..21c882d 100644 --- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java +++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/VideoSettings.java @@ -24,6 +24,7 @@ import static org.apache.openmeetings.util.OpenmeetingsVariables.FLASH_SSL_PORT; import static org.apache.openmeetings.util.OpenmeetingsVariables.getWebAppRootKey; import static org.apache.openmeetings.web.app.Application.NAME_ATTR_KEY; import static org.apache.openmeetings.web.app.Application.getBean; +import static org.apache.wicket.RuntimeConfigurationType.DEVELOPMENT; import java.net.URL; import java.util.HashMap; @@ -75,6 +76,7 @@ public class VideoSettings extends Panel { JSONObject gs = OpenmeetingsVariables.getRoomSettings(); JSONObject s = new JSONObject(gs.toString()) .put("sid", sid) + .put("debug", DEVELOPMENT == Application.get().getConfigurationType()) .put("wmode", cp.isBrowserInternetExplorer() && cp.getBrowserVersionMajor() == 11 ? "opaque" : "direct"); try { URL url = new URL(cp.getCodebase());
