You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2017/09/05 17:04:39 UTC
openmeetings git commit: [OPENMEETINGS-1644] basic flex exclusive
icon is added
Repository: openmeetings
Updated Branches:
refs/heads/master 465f1ac1a -> f18eb8bdf
[OPENMEETINGS-1644] basic flex exclusive icon is added
Project: http://git-wip-us.apache.org/repos/asf/openmeetings/repo
Commit: http://git-wip-us.apache.org/repos/asf/openmeetings/commit/f18eb8bd
Tree: http://git-wip-us.apache.org/repos/asf/openmeetings/tree/f18eb8bd
Diff: http://git-wip-us.apache.org/repos/asf/openmeetings/diff/f18eb8bd
Branch: refs/heads/master
Commit: f18eb8bdfc6f0cc92bc5b7631420ee49453ac609
Parents: 465f1ac
Author: Maxim Solodovnik <so...@gmail.com>
Authored: Wed Sep 6 00:04:30 2017 +0700
Committer: Maxim Solodovnik <so...@gmail.com>
Committed: Wed Sep 6 00:04:30 2017 +0700
----------------------------------------------------------------------
.../src/main/flex/assets/micro.png | Bin 0 -> 473 bytes
openmeetings-flash/src/main/flex/main.mxml | 20 +++++++++++++------
.../flex/org/apache/openmeetings/OmVideo.as | 1 -
.../apache/openmeetings/web/room/RoomPanel.java | 3 ++-
.../org/apache/openmeetings/web/room/room.js | 7 +++++++
5 files changed, 23 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f18eb8bd/openmeetings-flash/src/main/flex/assets/micro.png
----------------------------------------------------------------------
diff --git a/openmeetings-flash/src/main/flex/assets/micro.png b/openmeetings-flash/src/main/flex/assets/micro.png
new file mode 100644
index 0000000..9e025d4
Binary files /dev/null and b/openmeetings-flash/src/main/flex/assets/micro.png differ
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f18eb8bd/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 05fbb8f..ec1a89f 100644
--- a/openmeetings-flash/src/main/flex/main.mxml
+++ b/openmeetings-flash/src/main/flex/main.mxml
@@ -52,6 +52,9 @@
private var userId:String = null;
[Bindable]
private var interview:Boolean = false;
+ [Embed(source="assets/micro.png")]
+ [Bindable]
+ public var micImgCls:Class;
private function debug(...rest):void {
ExternalInterface.call("console.log", rest);
@@ -138,7 +141,7 @@
case OmVideo.BROADCAST: {
selectedCam = params.cam;
selectedMic = params.mic;
- video.resize(Math.max(300, params.width), Math.max(200, params.height));
+ _resize(Math.max(300, params.width), Math.max(200, params.height));
ExternalInterface.addCallback("update", function ():void {
video.getNc().call("check", new Responder(function (check:Object):void {
debug("check", check);
@@ -176,7 +179,7 @@
interview = 'interview' == check.roomType;
attachCamera(function ():void {
addImage(params.width, params.height);
- video.resize(params.width, params.height);
+ _resize(params.width, params.height);
activityTimer.addEventListener(TimerEvent.TIMER, broadcastTimerListener);
refreshBroadcast(null);
ExternalInterface.call("VideoManager.securityMode", params.uid, false);
@@ -188,7 +191,7 @@
break;
case OmVideo.PLAY: {
addImage(params.width, params.height);
- video.resize(params.width, params.height);
+ _resize(params.width, params.height);
refreshPlayback(null);
ExternalInterface.addCallback("setVolume", function (vol:int):void {
video.setStreamVolume(vol);
@@ -203,10 +206,16 @@
ExternalInterface.addCallback("vidResize", vidResize);
}
- private function vidResize(_width:int, _height:int):void {
+ private function _resize(_width:int, _height:int):void {
userImage.width = _width;
userImage.height = _height;
+ exclusiveMic.x = (_width - exclusiveMic.width) / 2;
+ exclusiveMic.y = (_height - exclusiveMic.height) / 2;
video.resize(_width, _height);
+ }
+
+ private function vidResize(_width:int, _height:int):void {
+ _resize(_width, _height);
video.vidResize(_width, _height);
}
@@ -243,8 +252,6 @@
private function addImage(_width:int, _height:int):void {
userImage.source = 'profile/' + userId + '?anti=' + new Date().time;
- userImage.width = _width;
- userImage.height = _height;
userImage.visible = true;
}
@@ -462,6 +469,7 @@
<s:Image id="userImage" visible="false" width="0" height="0" />
<mx:UIComponent id="videoDisplay" width="0" height="0" />
<s:Rect id="volumeRect" x="5" y="5" width="10" height="100" visible="false" />
+ <s:Image id="exclusiveMic" source="{micImgCls}"/>
<s:Label id="timerText" height="20" width="45" x="20" y="5" paddingLeft="5" paddingTop="5"
visible="false" backgroundColor="0xf5f5f5" fontWeight="bold"><s:text></s:text></s:Label>
</s:Application>
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f18eb8bd/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 8d25b3e..6c3b5d0 100644
--- a/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as
+++ b/openmeetings-flash/src/main/flex/org/apache/openmeetings/OmVideo.as
@@ -80,7 +80,6 @@ public class OmVideo {
public function vidResize(width:int, height:int):void {
vid.width = width;
vid.height = height;
- debug("OmVideo::resize", width, height);
}
public function attachCamera(cam:Camera):void {
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f18eb8bd/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
index 4a0d8ff..b1dbc02 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
@@ -136,7 +136,8 @@ public class RoomPanel extends BasePanel {
JSONObject options = VideoSettings.getInitJson(cp, r.getId(), _c.getSid())
.put("uid", _c.getUid())
.put("interview", isInterview)
- .put("showMicStatus", !r.getHiddenElements().contains(RoomElement.MicrophoneStatus));
+ .put("showMicStatus", !r.getHiddenElements().contains(RoomElement.MicrophoneStatus))
+ .put("exclusiveTitle", getString("1386"));
if (!Strings.isEmpty(r.getRedirectURL()) && (ws.getSoapLogin() != null || ws.getInvitation() != null)) {
options.put("reloadUrl", r.getRedirectURL());
}
http://git-wip-us.apache.org/repos/asf/openmeetings/blob/f18eb8bd/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
----------------------------------------------------------------------
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
index 30289da..19e0418 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/room.js
@@ -394,6 +394,13 @@ var VideoManager = (function() {
_closeV(v);
}
}
+ if (c.streams.length == 0) {
+ // check for non inited video window
+ let v = $('#' + VideoUtil.getVid(c.uid));
+ if (v.length == 1) {
+ _closeV(v);
+ }
+ }
}
function _closeV(v) {
if (v.dialog('instance') !== undefined) {