Author: ggrekhov
Date: Wed Jul 18 14:07:58 2012
New Revision: 1362957
URL: http://svn.apache.org/viewvc?rev=1362957&view=rev
Log:
OPENMEETINGS-354
Added:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/volumeSlider.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx?rev=1362957&r1=1362956&r2=1362957&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/baseVideoObject.lzx
Wed Jul 18 14:07:58 2012
@@ -80,6 +80,8 @@
<attribute name="isMutedByModerator" value="false" type="boolean"/>
<attribute name="isMicrophonesRoom" value="false" type="boolean"/>
+
+ <attribute name="lastPositiveVolume" type="number" value="50" />
<handler name="onisremote" args="r">
this.isremote = r;
@@ -490,7 +492,21 @@
parent.parent.silenceMicrophone(!parent.parent.micMuted);
</handler>
<labelTooltip name="_tip" labelid="1405" />
- </miniIconsPresenter>
+ </miniIconsPresenter>
+
+ <miniIconsPresenter x="0" y="0" name="_volume" width="16" height="16"
iconRessourceName="mute_btn_rsc">
+ <handler name="onclick">
+ var volume = parent.parent.getStreamVolume();
+
+ var pick = new lz.VolumeSlider(canvas, {
+ x:(parent.getAttributeRelative('x',canvas)),
+ y:(parent.getAttributeRelative('y',canvas)),
+ initialNumber:volume,
+ videoObject:parent.parent
+ });
+ lz.ModeManager.makeModal(pick);
+ </handler>
+ </miniIconsPresenter>
<miniIconsPresenter name="_minimize"
iconRessourceName="btn_presenter_minimize">
@@ -716,6 +732,32 @@
}
]]>
</method>
+
+ <method name="setStreamVolume" args="v">
+ var stream = this._chatvideoinner._videostream;
+ if (this.isremote) {
+ stream.setSoundVolume(v);
+ } else {
+ stream.setAttribute('micGain', v);
+ stream.micro.gain = v;
+ if (0 == v) {
+ this.confirmGloballyOff(true, v);
+ } else if (micMuted) {
+ this.silenceMicrophone(false);
+ }
+ }
+ </method>
+
+ <method name="getStreamVolume">
+ var stream = this._chatvideoinner._videostream;
+ var volume;
+ if (this.isremote) {
+ volume = Number(stream._ns.soundTransform.volume * 100);
+ } else {
+ volume = stream.micro.gain;
+ }
+ return volume;
+ </method>
</class>
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx?rev=1362957&r1=1362956&r2=1362957&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/library.lzx
Wed Jul 18 14:07:58 2012
@@ -58,5 +58,6 @@
<include href="videoObjectPlayBroadcast.lzx" />
<include href="videoObjectTestBroadcast.lzx" />
<include href="videoObjectPlayTestBroadcast.lzx" />
+ <include href="volumeSlider.lzx" />
</library>
Added:
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/volumeSlider.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/volumeSlider.lzx?rev=1362957&view=auto
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/volumeSlider.lzx
(added)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/swf10/video/volumeSlider.lzx
Wed Jul 18 14:07:58 2012
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<library>
+
+<class name="VolumeSlider" extends="closableView" clickable="true">
+
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.*;
+ import flash.media.*;
+ </passthrough>
+ </when>
+ </switch>
+
+ <attribute name="videoStream" value="null" />
+ <attribute name="ownStream" type="boolean" value="false" />
+ <attribute name="resizing" type="boolean" value="false" />
+
+ <attribute name="videoObject" value="null" />
+ <attribute name="initialNumber" value="50" type="number"/>
+ <attribute name="maxvalue" value="100" type="number" />
+
+ <dragHelper name="dragHelper"/>
+
+ <handler name="oninit">
+ dragHelper.create();
+ </handler>
+
+ <handler name="ondestroy">
+ dragHelper.remove();
+ </handler>
+
+ <!--- @keywords private -->
+ <method name="passModeEvent" args="eventStr,view" >
+ <![CDATA[
+ if (eventStr == "onmousedown") {
+ if (null != view) {
+ if (!view.childOf(this)) {
+ this.close();
+ }
+ } else {
+ this.close();
+ }
+ }
+ if (view && view.childOf(this)) {
+ if (view[eventStr]) {
+ view[eventStr].sendEvent(view);
+ }
+ return false;
+ }
+ return true;
+ ]]>
+ </method>
+
+ <view bgcolor="$once{canvas.getThemeColor('baseMousecolorizer')}"
width="58" height="138" x="1" y="1" />
+
+ <vslider name="_slider" height="120" y="10" x="10" minvalue="0"
maxvalue="100"
+ initvalue="$once{parent.initialNumber}" showrange="false"
showvalue="true">
+ <handler name="onvalue" args="v">
+ if ($debug) Debug.write("onvalue", v);
+
+ parent.videoObject.setStreamVolume(Number(v));
+ </handler>
+ <handler name="onvalueChosenFinal">
+ parent.close();
+ </handler>
+ </vslider>
+
+ <view name="_close" x="$once{parent.width - this.width - 2}" y="2"
+ resource="btn_presenter_close"
+ onmouseover="this.setAttribute('frame', 2)"
+ onmouseout="this.setAttribute('frame', 1)"
+ onmousedown="this.setAttribute('frame', 3)"
+ onmouseup="this.setAttribute('frame', 1)"
+ >
+ <handler name="onclick">
+ this.setAttribute('frame', 2);
+ this.parent.close();
+ </handler>
+
+ <labelTooltip labelid="430" />
+ </view>
+
+</class>
+
+</library>