Author: sebawagner
Date: Thu Feb 2 14:17:59 2012
New Revision: 1239637
URL: http://svn.apache.org/viewvc?rev=1239637&view=rev
Log:
OPENMEETINGS-40 Merge Audio/Video components to trunk Fix device settings
window combobox's and RPC call setUserAVSettings
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/video/editRecordStream.lzx
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx?rev=1239637&r1=1239636&r2=1239637&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/swf10/video/editRecordStreamSWF10.lzx
Thu Feb 2 14:17:59 2012
@@ -14,7 +14,7 @@
-->
<class name="editRecordStreamSWF10" extends="labelExplorerBox" labelid="51"
- width="300" height="250" x="14" y="-340" >
+ width="300" height="286" x="14" y="-440" >
<switch>
<when property="$as3">
@@ -22,6 +22,7 @@
import flash.media.Camera;
import flash.media.Microphone;
import flash.net.SharedObject;
+ import flash.media.SoundCodec;
</passthrough>
</when>
</switch>
@@ -40,6 +41,9 @@
<attribute name="doDefaultAnimation" value="true" type="boolean" />
<attribute name="isInterview" value="false" type="boolean" />
+
+ <attribute name="cam_default_width" value="320" type="number" />
+ <attribute name="cam_default_height" value="240" type="number" />
<handler name="oninit">
<![CDATA[
@@ -60,13 +64,15 @@
} else {
//In case the user presses the Sync Button this box
should
//not close automatically and do the user-prefered values
- if(save && !this.isSyncUpdate) {
+ if(save && !this.isSyncUpdate &&
this.checkLocalDataComplete()) {
this.chosenCam = g["cam"];
this.chosenMic = g["mic"];
+ this.cam_default_width = g["width"];
+ this.cam_default_height = g["height"];
this.chosenSetting = g["avstored"];
this.remoteMessage = new Array();
this.remoteMessage[0] = 'avsettings';
- this.remoteMessage[2] = this.chosenSetting;
+ this.remoteMessage[2] = this.chosenSetting;
//this.getBroadCastId.doCall();
canvas.videoComp_lc.send(canvas.videoComp_lc_name,
'lc_getBroadCastId', this.chosenSetting, this.remoteMessage);
} else {
@@ -77,6 +83,15 @@
}
]]>
</handler>
+
+ <method name="checkLocalDataComplete">
+ <![CDATA[
+ var g = canvas.getUserData();
+ if (g["width"] > 0 && g["height"] > 0) {
+ return true;
+ }
+ ]]>
+ </method>
<!--
Called by local connection
@@ -95,29 +110,20 @@
this.currentClient = value;
this.doninitalize();
</method>
-
+
<method name="storelocaldata">
<![CDATA[
- if (this.holddatainSO.getValue()){
//Debug.write("sharedobject store ");
var t:SharedObject = SharedObject.getLocal('userdata');
var g = t.data;
if (g==null) g = new Array();
g["cam"] = this.availibleCams.getValue();
- g["mic"] = this.availibleMics.getValue();
- g["avstored"] = this.availibleSettings.getValue();
- g["savecamdata"] = true;
+ g["mic"] = this.availibleMics.getValue();
+ g["avstored"] = this.availibleSettings.getValue();
+ g["savecamdata"] = this.holddatainSO.getValue();
+ g["width"] = this.cam_default_width;
+ g["height"] = this.cam_default_height;
t.flush();
- } else {
- var t:SharedObject = SharedObject.getLocal('userdata');
- var g = t.data;
- if (g==null) g = new Array();
- g["cam"] = this.availibleCams.getValue();
- g["mic"] = this.availibleMics.getValue();
- g["avstored"] = this.availibleSettings.getValue();
- g["savecamdata"]=false;
- t.flush();
- }
]]>
</method>
@@ -136,6 +142,15 @@
var _camera = null;
if (valMic != null) {
_micro = Microphone.getMicrophone(valMic);
+ _micro.codec = SoundCodec.SPEEX;
+ _micro.framesPerPacket = 1;
+ _micro.setSilenceLevel(0, 2000);
+ _micro.gain = 50;
+ // this has no effect if enhanced microphone is
obtained
+ if (_micro != null) {
+ //Microphone setUseEchoSupression(bool)
+ _micro.setUseEchoSuppression(true);
+ }
}
if (valCam != null) {
_camera = Camera.getCamera(valCam);
@@ -169,14 +184,11 @@
}
if (_micro != null) {
_micro.setRate(canvas.microphoneRateNormal);
-
_micro.setSilenceLevel(canvas.loudnessAcitviation);
+
//_micro.setSilenceLevel(canvas.loudnessAcitviation);
}
}
- if (_micro != null) {
- //Microphone setUseEchoSupression(bool)
- _micro.setUseEchoSuppression(true);
- }
+
if ($debug) Debug.write("settings: ", settings);
if ($debug) Debug.write("BroadcastId: ",
this.currentClient.broadCastID);
@@ -315,11 +327,14 @@
if ($debug) Debug.warn("no valid device
Setup chosen");
break;
}
-
this.parent.availibleCamsLabel.setAttribute("visibility",camVisible);
-
this.parent.availibleCams.setAttribute("visibility",camVisible);
-
this.parent.availibleMicsLabel.setAttribute("visibility",micVisible);
-
this.parent.availibleMics.setAttribute("visibility",micVisible);
-
this.parent.infoTextNoAV.setAttribute("visibility",textVisible);
+
this.parent.availibleCamsLabel.setAttribute("visibility",camVisible);
+
this.parent.availibleCams.setAttribute("visibility",camVisible);
+
this.parent.availibleMicsLabel.setAttribute("visibility",micVisible);
+
this.parent.availibleMics.setAttribute("visibility",micVisible);
+
this.parent.infoTextNoAV.setAttribute("visibility",textVisible);
+
this.parent.availibleResolutionsLabel.setAttribute("visibility",camVisible);
+
this.parent.availibleResolutionsWarning.setAttribute("visibility",camVisible);
+
this.parent.availibleResolutions.setAttribute("visibility",camVisible);
]]>
</handler>
</resetCombobox>
@@ -358,7 +373,8 @@
</handler>
</resetCombobox>
-
+ <labelText name="availibleMicsLabel" labelid="53" fontsize="11"
+ x="10" y="120" width="$once{ parent.width-20 }" />
<resetCombobox fontsize="11" name="availibleMics" x="10" y="140"
width="280" editable="false">
<switch>
@@ -392,14 +408,74 @@
</handler>
</resetCombobox>
- <labelText name="infoTextNoAV" labelid="452" multiline="true" width="280"
- fontsize="11" x="10" y="80" visibility="hidden" />
-
- <labelText name="availibleMicsLabel" labelid="53" fontsize="11"
- x="10" y="120" width="$once{ parent.width-20 }" />
+ <labelText name="infoTextNoAV" labelid="452" multiline="true" width="280"
+ fontsize="11" x="10" y="180" visibility="hidden" />
+
+ <labelText name="availibleResolutionsLabel" labelid="1429"
+ fontsize="11" x="10" y="164" width="$once{ parent.width-20 }" />
+
+ <view name="availibleResolutionsWarning" x="272" y="164"
+ resource="warning_icon_popup_devices_rsc" clickable="true" >
+ <labelTooltip multiline="true" labelid="1430" />
+ </view>
+
+ <resetCombobox fontsize="11" name="availibleResolutions" x="10"
shownitems="10"
+ y="184" width="280" editable="false" >
+ <!--- @keywords private -->
+ <attribute name="counter" value="0" />
+ <handler name="onselect" args="item">
+ //if ($debug) Debug.write("onselect w ", item.cam_width);
+ //if ($debug) Debug.write("onselect h ", item.cam_height);
+ parent.cam_default_width = item.cam_width;
+ parent.cam_default_height = item.cam_height;
+ </handler>
+ <textlistitem
datapath="myConfigSet:/config/availableCameraResolutions/resolution" >
+ <switch>
+ <when property="$as3">
+ <passthrough>
+ import flash.net.SharedObject;
+ </passthrough>
+ </when>
+ </switch>
+ <!--- @keywords private -->
+ <attribute name="cam_width" value="320" type="number" />
+ <!--- @keywords private -->
+ <attribute name="cam_height" value="240" type="number" />
+ <handler name="ondata">
+ <![CDATA[
+ // if ($debug) Debug.write("ondata ", this);
+ var type = this.datapath.xpathQuery('@type');
+ this.cam_width =
Number(this.datapath.xpathQuery('@width'));
+ this.cam_height =
Number(this.datapath.xpathQuery('@height'));
+
this.setAttribute("text",""+this.cam_width+"x"+this.cam_height+" ["+type+"]");
+ var isDefault = this.datapath.xpathQuery('@isDefault');
+
+ var t:SharedObject = SharedObject.getLocal('userdata');
+ var g = t.data;
+ var width = g["width"];
+ var height = g["height"];
+ if (width!=null && width > 0 && height!=null && height>0) {
+
+ if (width == this.cam_width && height ==
this.cam_height) {
+ parent.selectItemAt(parent.counter);
+ parent.onselect.sendEvent(this);
+ }
+
+ } else {
+ if (isDefault == "true") {
+ if ($debug) Debug.write("Found default one ",type);
+ parent.selectItemAt(parent.counter);
+ parent.onselect.sendEvent(this);
+ }
+ }
+ parent.counter+=1;
+ ]]>
+ </handler>
+ </textlistitem>
+ </resetCombobox>
<!-- Remember Me -->
- <labelCheckbox name="holddatainSO" labelid="762" x="10" y="210" >
+ <labelCheckbox name="holddatainSO" labelid="762" x="10" y="260" >
<switch>
<when property="$as3">
<passthrough>
@@ -417,7 +493,7 @@
</labelCheckbox>
<simpleLabelButton fontsize="11" visibility="${ (parent.isInterview) ?
'visible' : 'hidden' }"
- labelid="54" x="80" y="180" width="100">
+ labelid="54" x="80" y="240" width="100">
<handler name="onclick">
this.parent.storelocaldata();
this.parent.chosenCam = parent.availibleCams.getValue();
@@ -434,14 +510,14 @@
</simpleLabelButton>
<simpleLabelButton fontsize="11" visibility="${ (parent.isInterview) ?
'visible' : 'hidden' }"
- labelid="918" x="190" y="180" width="100">
+ labelid="918" x="190" y="240" width="100">
<handler name="onclick">
parent.close();
</handler>
</simpleLabelButton>
<simpleLabelButton fontsize="11" visibility="${ (!parent.isInterview) ?
'visible' : 'hidden' }"
- labelid="54" x="190" y="180" width="100">
+ labelid="54" x="190" y="240" width="100">
<handler name="onclick">
this.parent.storelocaldata();
this.parent.chosenCam = parent.availibleCams.getValue();
Modified:
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/video/editRecordStream.lzx
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/video/editRecordStream.lzx?rev=1239637&r1=1239636&r2=1239637&view=diff
==============================================================================
---
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/video/editRecordStream.lzx
(original)
+++
incubator/openmeetings/trunk/singlewebapp/WebContent/src/modules/conference/video/editRecordStream.lzx
Thu Feb 2 14:17:59 2012
@@ -37,6 +37,9 @@
<attribute name="chosenSetting" value="null" />
<attribute name="remoteMessage" value="null" />
<attribute name="currentClient" value="null" />
+
+ <attribute name="cam_default_width" value="320" type="number" />
+ <attribute name="cam_default_height" value="240" type="number" />
<attribute name="syncUpdate" value="false" />
<attribute name="isInterview" value="false" type="boolean" />
@@ -89,6 +92,8 @@
remotecontext="$once{ canvas.thishib }" >
<netparam><method name="getValue">return
parent.parent.chosenSetting;</method></netparam>
<netparam><method name="getValue">return
parent.parent.remoteMessage;</method></netparam>
+ <netparam><method name="getValue">return
parent.parent.cam_default_width;</method></netparam>
+ <netparam><method name="getValue">return
parent.parent.cam_default_height;</method></netparam>
<handler name="ondata" args="value">
<![CDATA[
if ($debug) Debug.write("setUserAVSettings",value);