Author: solomax Date: Thu Aug 11 17:29:16 2016 New Revision: 1756016 URL: http://svn.apache.org/viewvc?rev=1756016&view=rev Log: [OPENMEETINGS-1408] initial work on separate dialog
Added: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/settings.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/resources/information.png - copied unchanged from r1756015, openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/resources/information.png openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/resources/level_meter.png - copied unchanged from r1756015, openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/resources/level_meter.png openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/resources/run.png - copied unchanged from r1756015, openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/resources/run.png openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/resources/stop.png - copied unchanged from r1756015, openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/resources/stop.png openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/resources/webstart_record.png - copied unchanged from r1756015, openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/resources/webstart_record.png openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/settings.png (with props) openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/settings.png (with props) Removed: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/audioVideoTest/ Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/openlaszlo.xml openmeetings/application/branches/3.2.x/openmeetings-flash/pom.xml openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/library.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainDatasets.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/main.lzx openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/library.lzx openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/openlaszlo.xml URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/openlaszlo.xml?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/openlaszlo.xml (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/openlaszlo.xml Thu Aug 11 17:29:16 2016 @@ -32,11 +32,11 @@ <fileset dir="${laszlo46.home}/WEB-INF/lib" includes="*.jar" /> </path> - <target name="client.only" depends="compile.laszlo.main,compile.laszlo.networktesting" unless="client-already-built"> + <target name="client.only" depends="main,networktesting,settings" unless="client-already-built"> <property name="client-already-built" value="true"/> </target> - <target name="client.debug.only" depends="compile.laszlo.main.debug,compile.laszlo.networktesting.debug" > + <target name="client.debug.only" depends="main.debug,networktesting.debug,settings.debug" > <property name="client-already-built" value="true"/> </target> @@ -51,7 +51,7 @@ </java> </target> - <target name="compile.laszlo.main" depends="compile.laszlo.main.debug"> + <target name="main" depends="main.debug"> <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> <param name="flash.classpath.ref" value="laszlo46.lib" /> <param name="flash.src.dir" value="${src.dir}" /> @@ -63,7 +63,7 @@ </antcall> </target> - <target name="compile.laszlo.main.debug"> + <target name="main.debug"> <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> <param name="flash.classpath.ref" value="laszlo46.lib" /> <param name="flash.src.dir" value="${src.dir}" /> @@ -75,7 +75,7 @@ </antcall> </target> - <target name="compile.laszlo.networktesting" depends="compile.laszlo.networktesting.debug"> + <target name="networktesting" depends="networktesting.debug"> <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> <param name="flash.classpath.ref" value="laszlo46.lib" /> <param name="flash.src.dir" value="${src.dir}/networkTesting" /> @@ -87,7 +87,7 @@ </antcall> </target> - <target name="compile.laszlo.networktesting.debug"> + <target name="networktesting.debug"> <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> <param name="flash.classpath.ref" value="laszlo46.lib" /> <param name="flash.src.dir" value="${src.dir}/networkTesting" /> @@ -98,4 +98,28 @@ <param name="flash.debug" value="--debug" /> </antcall> </target> + + <target name="settings" depends="settings.debug"> + <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> + <param name="flash.classpath.ref" value="laszlo46.lib" /> + <param name="flash.src.dir" value="${src.dir}" /> + <param name="flash.lps.home" value="${laszlo46.home}" /> + <param name="flash.runtime" value="swf11" /> + <param name="flash.main.file" value="settings.lzx" /> + <param name="flash.out.file" value="settings.swf11.swf" /> + <param name="flash.debug" value="" /> + </antcall> + </target> + + <target name="settings.debug"> + <antcall target="-compile.flash" inheritAll="true" inheritRefs="true"> + <param name="flash.classpath.ref" value="laszlo46.lib" /> + <param name="flash.src.dir" value="${src.dir}" /> + <param name="flash.lps.home" value="${laszlo46.home}" /> + <param name="flash.runtime" value="swf11" /> + <param name="flash.main.file" value="settings.lzx" /> + <param name="flash.out.file" value="settingsdebug.swf11.swf" /> + <param name="flash.debug" value="--debug" /> + </antcall> + </target> </project> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/pom.xml URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/pom.xml?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/pom.xml (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/pom.xml Thu Aug 11 17:29:16 2016 @@ -66,7 +66,7 @@ </property> </activation> <properties> - <ant.target>compile.laszlo.main</ant.target> + <ant.target>main</ant.target> </properties> </profile> <profile> @@ -78,7 +78,7 @@ </property> </activation> <properties> - <ant.target>compile.laszlo.main.debug</ant.target> + <ant.target>settings.debug</ant.target> </properties> </profile> </profiles> Added: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx?rev=1756016&view=auto ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx (added) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/baseMethods.lzx Thu Aug 11 17:29:16 2016 @@ -0,0 +1,594 @@ +<?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. + +--> + +<!-- methods for main.lzx --> + +<library> + <switch> + <when property="$as3"> + <passthrough> + import flash.display.*; + import flash.events.*; + import flash.external.ExternalInterface; + import flash.net.*; + </passthrough> + </when> + </switch> + + <attribute name="colorArray" value="null" /> + <attribute name="errorLoader" /> + + <method name="getColorForUser"> + <![CDATA[ + var colorArray = [0x92E8A4,0xC2F1FF,0xFFFCAE,0xE8C792,0xFF8073, + 0xE8DB87,0xAFFFB8,0xBED4FF,0xE0BBE8,0xFFBBA5]; + return colorArray[Math.round(Math.random()*10)]; + ]]> + </method> + + <method name="remoteLogWrite" args="message"> + if ($debug) Debug.warn("remoteLogWrite:: ", message); + if (!errorLoader) { + errorLoader = new RestCall({ + url: canvas.getUrl() + 'services/error/report/' + , method: URLRequestMethod.POST + }); + } + var vars:URLVariables = new URLVariables(); + vars.message = message; + errorLoader.load(vars); + </method> + + <method name="getHttpHost"> + <![CDATA[ + if (canvas.httphostlocal != null && canvas.httphostlocal.length > 0) { + return canvas.httphostlocal; + } + return canvas.rtmphostlocal; + ]]> + </method> + + <method name="getUrl"> + <![CDATA[ + return canvas.protocol + '://' + getHttpHost() + ':' + canvas.red5httpport + canvas.httpRootKey; + ]]> + </method> + + <method name="getServicesUrl"> + <![CDATA[ + return getUrl() + 'services/'; + ]]> + </method> + + <method name="getTestingUrl"> + <![CDATA[ + return getUrl() + '?swf=networktesting' + ($debug ? 'debug' : '') + '.swf10.swf'; + ]]> + </method> + + <method name="getAppBaseUrl"> + <![CDATA[ + return getUrl() + "swf"; + ]]> + </method> + + <method name="mybaseinit"> + <![CDATA[ + canvas.mediaerrortimeout = 30000; + canvas.medialoadtimeout = 30000; + + if($debug) Debug.write("main.lzx/config.xml ondata",this); + + //Set Config-values by public/config.xml, see comments on public/config.xml + if (!canvas.isCluster) { + this.setAttribute('rtmphostlocal',canvas.myConfigSet.getPointer().xpathQuery('config/rtmphostlocal/text()')); + } + this.setAttribute('rtmpport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/rtmpport/text()'))); + this.setAttribute('rtmpsslport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/rtmpsslport/text()'))); + + var userSSLString = canvas.myConfigSet.getPointer().xpathQuery('config/useSSL/text()'); + if ($debug) Debug.write("userSSLString",userSSLString) + if (userSSLString == "yes") { + this.setAttribute('useSSL',true); + } + + this.setAttribute('red5httpport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/red5httpport/text()'))); + + this.setAttribute('loudnessAcitviation',canvas.myConfigSet.getPointer().xpathQuery('config/loudnessAcitviation/text()')); + this.setAttribute('webAppRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/webAppRootKey/text()')); + this.setAttribute('showWindowEffect',canvas.myConfigSet.getPointer().xpathQuery('config/showWindowEffect/text()')); + + //Audio-Video-Settings + this.setAttribute('loudnessAcitviation',canvas.myConfigSet.getPointer().xpathQuery('config/loudnessAcitviation/text()')); + this.setAttribute('codecType',canvas.myConfigSet.getPointer().xpathQuery('config/codecType/text()')); + this.setAttribute('framesPerSecond',Number(canvas.myConfigSet.getPointer().xpathQuery('config/framesPerSecond/text()'))); + this.setAttribute('bandwidthNeededNormal',Number(canvas.myConfigSet.getPointer().xpathQuery('config/bandwidthNeededNormal/text()'))); + this.setAttribute('bandwidthNeededBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/bandwidthNeededBest/text()'))); + this.setAttribute('camQualityNormal',Number(canvas.myConfigSet.getPointer().xpathQuery('config/camQualityNormal/text()'))); + this.setAttribute('camQualityBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/camQualityBest/text()'))); + this.setAttribute('microphoneRateBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/microphoneRateBest/text()'))); + this.setAttribute('echoPath',Number(canvas.myConfigSet.getPointer().xpathQuery('config/echoPath/text()'))); + this.setAttribute('echoSuppression',canvas.myConfigSet.getPointer().xpathQuery('config/echoSuppression/text()')); + + this.setAttribute('defaultWhiteboardWidth',Number(canvas.myConfigSet.getPointer().xpathQuery('config/defaultWhiteboardWidth/text()'))); + this.setAttribute('defaultWhiteboardHeight',Number(canvas.myConfigSet.getPointer().xpathQuery('config/defaultWhiteboardHeight/text()'))); + + + this.setAttribute('httpRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/httpRootKey/text()')); + this.setAttribute('httphostlocal',canvas.myConfigSet.getPointer().xpathQuery('config/httphostlocal/text()')); + this.setAttribute('protocol',canvas.myConfigSet.getPointer().xpathQuery('config/protocol/text()')); + this.setAttribute('proxyType',canvas.myConfigSet.getPointer().xpathQuery('config/proxyType/text()')); + + //set user color + canvas.currentusercolor = canvas.getColorForUser(); + + var _url = this.getDisplayObject().loaderInfo.url; + if($debug) Debug.write("_url: ",_url); + var cleanUrl = _url; + + var hasParams = _url.indexOf("?"); + if (hasParams != -1) { + cleanUrl = _url.substr(0, hasParams); + } + + if ($debug) Debug.write("_url ",_url,cleanUrl); + var doubleSlash = cleanUrl.indexOf("//"); + var isNotPort80 = cleanUrl.indexOf(":", doubleSlash+2); + if ($debug) Debug.write("isNotPort80: ",isNotPort80,doubleSlash); + if (isNotPort80!=-1){ + //Debug.write("isNotPort80: ",doubleSlash+2, _url.indexOf(":", doubleSlash+2)-doubleSlash-2); + var server = cleanUrl.substr(doubleSlash+2, _url.indexOf(":", doubleSlash+2)-doubleSlash-2); + } else { + var server = cleanUrl.substr(doubleSlash+2, _url.indexOf("/", doubleSlash+2)-doubleSlash-2); + } + + if ($debug) Debug.write("this zielnr: ",this,server); + + this.setAttribute('rtmphost',server); + + if (this.rtmphostlocal.length==0){ + this.setAttribute('rtmphostlocal',server); + } + + //Check for Invitation + var invitationHash = lz.Browser.getInitArg('invitationHash'); + + if ($debug) Debug.info("###################### -1 "); + if ($debug) Debug.info("invitationHash :: ",invitationHash); + + if (invitationHash != undefined){ + canvas.isinitRoomDirect = true; + canvas.invitationHash = invitationHash; + } + + var secureHash = lz.Browser.getInitArg('secureHash'); + if (secureHash != undefined){ + canvas.secureRemoteUserLogin = true; + canvas.secureHash = secureHash; + } + + if ($debug) Debug.info("###################### -2 "); + + var language = lz.Browser.getInitArg('language'); + if (language != undefined) { + canvas.language_id = Number(language); + } + + var wicketroomid = lz.Browser.getInitArg('wicketroomid'); + if (wicketroomid != undefined && !isNaN(wicketroomid)) { + canvas.setAttribute('wicketroomid', Number(wicketroomid)); + } + canvas.setAttribute('wicketsid', null); + var wicketsid = lz.Browser.getInitArg('wicketsid'); + if (wicketsid != undefined) { + canvas.setAttribute('wicketsid', wicketsid); + } + var uid = lz.Browser.getInitArg('uid'); + if (!!uid) { + canvas.setAttribute('publicSID', uid); + } + this.setColors(); + if ($debug) Debug.info("###################### -3 "); + + if (!!canvas.myinit) { + canvas.myinit(); + } else { + new lz.editRecordStreamSWF10(canvas.main_content,{ + name:"editRecordStream", + doDefaultAnimation:false, + isInterview:true, + interviewPodId:this.parent.parent.interviewPodId, + isSyncUpdate:true}); + } + ]]> + </method> + + <method name="getLabelName" args="id"> + //if($debug) Debug.write("main.lzx/getLabelName()",id); + return getLabelTag(id); + </method> + + <!-- + exportFilePNG exportFileJPG exportFilePDF exportFileSVG exportFileTIF + --> + + <method name="doWhiteboardActionmenu" args="action"> + if (action == "exportFilePNG") { + canvas._drawarea.confirmSaveAsImageTypeExport("image","png"); + } else if (action == "exportFileJPG") { + canvas._drawarea.confirmSaveAsImageTypeExport("image","jpg"); + } else if (action == "exportFilePDF") { + canvas._drawarea.confirmSaveAsImageTypeExport("image","pdf"); + } else if (action == "exportFileSVG") { + canvas._drawarea.confirmSaveAsImageExport("image"); + } else if (action == "exportFileTIF") { + canvas._drawarea.confirmSaveAsImageTypeExport("image","tif"); + } + </method> + + <method name="quit"> + canvas.thishib.src = null; + canvas.thishib.reconnectionAction = false; + canvas.thishib.counterror = 100; + canvas.thishib.disconnect(); + if (canvas.thishib._nc) { + canvas.thishib._nc.close(); + } + ExternalInterface.call("roomExit"); + </method> + + <method name="setRoomValues" args="roomObj"> + <![CDATA[ + if ($debug) Debug.warn("setRoomValues ",roomObj); + //this is needed cause in the rpc-method *getCurrentModeratorList* we check if its room.type == 'restricted' + //if so we will not show any *There is no Moderator* Warning Dialog + canvas.currentRoomObj = roomObj; + + if (roomObj != null) { + hib.currentroomid = roomObj.id; + canvas.isConference = roomObj.type == 'conference'; + canvas.isInterview = roomObj.type == 'interview'; + + if (roomObj.type == 'conference') { + new lz.flexibleConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); + } else if (roomObj.type == 'restricted') { + new lz.restrictedConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); + } else if (roomObj.type == 'interview') { + new lz.interviewConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); + } + } + ]]> + </method> + + <method name="parseLanugageObject" args="obj"> + + ////Debug.write('parseLanugageObject: ',obj); + ////Debug.write('parseLanugageObject: ',obj.childNodes); + <![CDATA[ + var t = new Array(); + for (var i=0;i<obj.childNodes.length;i++){ + for (var k=0;k<obj.childNodes[i].childNodes.length;k++){ + ////Debug.write(obj.childNodes[i].childNodes[k]); + var t2 = new Array(); + t2[obj.childNodes[i].childNodes[k].childNodes[0].nodeName]=obj.childNodes[i].childNodes[k].childNodes[0].childNodes[0].data; + t2[obj.childNodes[i].childNodes[k].childNodes[1].nodeName]=obj.childNodes[i].childNodes[k].childNodes[1].childNodes[0].data; + t.push(t2); + } + } + setLabelObject(t); + canvas.initScreen(); + //Debug.write(t); + ]]> + </method> + + <!--- + @doc The function does compare the new moderator list with the old and prepares the list + the removeModeratorList is used in the performance optimized user list of the restricted + room type to re-render the list items only if really something has changed in any + of the user list items + --> + <method name="analyzeModerationList" args="newList"> + <![CDATA[ + canvas.removeModeratorList = new Array(); + + if (canvas.currentModeratorList != null) { + for (var i = 0; i < canvas.currentModeratorList.length; ++i) { + canvas.currentModeratorList[i].found = false; + for (var k = 0; k < newList.length; ++k) { + if (newList[k].publicSID == canvas.currentModeratorList[i].publicSID) { + canvas.currentModeratorList[i].found = true; + } + } + } + } + if (canvas.currentModeratorList != null) { + for (var i = 0; i < canvas.currentModeratorList.length; ++i) { + if (!canvas.currentModeratorList[i].found) { + canvas.removeModeratorList.push(canvas.currentModeratorList[i]) + } + } + } + + if ($debug) Debug.write("removeModeratorList :: ",canvas.removeModeratorList); + ]]> + </method> + + <!--- + Updates the "ismoderator" flag + the setAttribute method will broadcast an event to all event listeners that + did subscribe using the "onismoderator" handler with reference to canvas ! + --> + <method name="updateModerationFlag"> + <![CDATA[ + var isCurrentModerator = false; + if ($debug) Debug.write("updateModerationFlag", canvas.removeModeratorList); + for (var i = 0; i < canvas.removeModeratorList.length; ++i) { + var item = canvas.removeModeratorList[i]; + if (canvas.publicSID == item.publicSID) { + isCurrentModerator = false; + } + } + if ($debug) Debug.write("updateModerationFlag", canvas.currentModeratorList); + for (var i = 0; i < canvas.currentModeratorList.length; ++i) { + var item = canvas.currentModeratorList[i]; + if (canvas.publicSID == item.publicSID) { + isCurrentModerator = true; + } + } + + // do always spread this event, we need to broadcast the "onismoderator" event + // so that we can update the status of other users in the user list + try { + canvas.setAttribute('ismoderator', isCurrentModerator); + } catch (e:Error) { + new lz.errorPopup(canvas, {error: "update moder "+e}); + if ($debug) Debug.error("updateModerationFlag::error ", e); + } + ]]> + </method> + + <!--- + Checks if a certain publicSID is a moderator + --> + <method name="getIsModeratorByPublicSID" args="publicSID"> + <![CDATA[ + for (var i = 0; i < canvas.currentModeratorList.length; ++i) { + var item = canvas.currentModeratorList[i]; + if (publicSID == item.publicSID) { + return true; + } + } + return false; + ]]> + </method> + + <!--- + Sets the flag for the isAllowedToGiveExclusiveAudio status and broadcasts it to the + SWF10 container + --> + <method name="setExclusiveAudioAllowStatus" args="roomClientObj"> + <![CDATA[ + if ($debug) Debug.write("giveExclusiveAudioStatus changes ###### "); + if (roomClientObj.publicSID==canvas.publicSID) { + canvas.setAttribute("isAllowedToGiveExclusiveAudio",roomClientObj.canGiveAudio); + canvas.commonVideoViewContent.setExclusiveAudioAllowStatus(roomClientObj.canGiveAudio); + } + ]]> + </method> + + <method name="setMuteStatus" args="roomClientObj"> + <![CDATA[ + if ($debug) Debug.write("setMuteStatus changes ###### ",roomClientObj.micMuted); + //Check for self status + if (roomClientObj.publicSID == canvas.publicSID) { + canvas.setAttribute("micMuted",roomClientObj.micMuted); + } + + canvas._videocontainer.updateMuteStatusVideoView(roomClientObj); + + //Notify all Listeners for change of the item + canvas.setAttribute("micMutedStatusChangedItem", roomClientObj); + ]]> + </method> + + <method name="addFolderSequence" args="foldername"> + <![CDATA[ + this.uploadmoduleimgfolder = '/'; + this.uploadmoduleimgfolder += foldername; + this.setAttribute('uploadmoduleimgfolder',this.uploadmoduleimgfolder); + ]]> + </method> + + + <handler name="onmousewheeldelta" reference="lz.Keys" args="d"> + <![CDATA[ + var obj = getCurrentMouseWheelObject(); + ////Debug.write("onmousewheeldelta 12: ",d,obj); + if (obj!=null) { + obj.step(-d); + } + ]]> + </handler> + + <method name="reverseWordingsBySplit" args="str"> + <![CDATA[ + var words_arr = str.split( " " ); // an array of chars + for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order + { + str += words_arr[ words_arr.length - i - 1 ]; + if (words_arr.length != 1) { + str += " "; + } + } + return str; + + ]]> + </method> + + <method name="reverseAll" args="str"> + <![CDATA[ + var words_arr = str.split( "" ); // an array of chars + for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order + { + str += words_arr[ words_arr.length - i - 1 ]; + + } + return str; + + ]]> + </method> + + <method name="reverseWords" args="str"> + <![CDATA[ + if ( str == "" || str == null ) return ""; // undefined + // first char indicates the main directive of str (rtl/ltr) + if ( isLTR( str.charCodeAt( 0 ) ) ) return str; // english or number + var words_arr = str.split( "" ); // an array of chars + for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order + str += words_arr[ words_arr.length - i - 1 ]; + return str; + ]]> + </method> + + <method name="isLTR" args="c"> + <![CDATA[ + return ( c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 ); + ]]> + </method> + + <method name="isHEB" args="c"> + <![CDATA[ + return ( c >= 224 && c <= 250 ); + ]]> + </method> + + <method name="setTextAlign" args="obj,type"> + switch ( type ) { + case "left" : + obj.setX( 0 ); + break; + case "center" : + obj.setX( this.parent.width / 2 - this.getTextWidth() / 2 ); + break; + case "right" : + obj.setX( this.parent.width - this.getTextWidth() ); + break; + } + </method> + + <method name="getUserData"> + var so:SharedObject = SharedObject.getLocal('userdata'); + var g = so.data; + if (g == null) { + if($debug) Debug.write("sharedObject.getData IS null"); + g = new Array(); + } + return g; + </method> + + <method name="setUserData" args="g"> + var so:SharedObject = SharedObject.getLocal('userdata'); + for (var i in g) { + if($debug) Debug.write("g[" + i + "] = ", g[i]); + so.data[i] = g[i]; + } + so.flush(); + </method> + + <method name="getThemeImage" args="tName"> + //if ($debug) Debug.write("load Image by Name: ",tName); + var tPath = canvas.mainTheme.getPointer().xpathQuery("theme/resource[@name='"+tName+"']/@src"); + //if ($debug) Debug.write("tPath "+tPath); + if (tPath == null) { + if ($debug) Debug.warn("getThemeImage - No Image found for config: ",tName); + } else { + tPath = canvas.getUrl() + 'public/' + tPath; + } + return tPath; + </method> + + <method name="getThemeColor" args="tColor"> + //if ($debug) Debug.write("load Color by Name: ",tColor); + var tResColor = canvas.mainTheme.getPointer().xpathQuery("theme/color[@name='"+tColor+"']/@value"); + //if ($debug) Debug.write("tColor "+tColor); + if (tResColor == null) { + if ($debug) Debug.warn("getThemeColor - No Color found for config: ",tColor); + } + return tResColor; + </method> + + <method name="setColors"> + defaultstyle.setAttribute("basecolor",canvas.getThemeColor('basebgcolorizer')); + itemStyle.setAttribute("basecolor",canvas.getThemeColor('basebgcolorizer')); + menuStyle.setAttribute("basecolor",canvas.getThemeColor('styleMenuBarBaseColor')); + main_content.setAttribute("bgcolor",canvas.getThemeColor('mainBackgroundColor')); + if (!!canvas.setBaseColors) { + canvas.setBaseColors(); + } + </method> + + <method name="getPictureUrl" args="pictureuri,extraParams"> + <![CDATA[ + var pUri = (pictureuri == null || pictureuri.length == 0) ? "d.jpg" : pictureuri; + var downloadurl = pUri; + if (!pUri.startsWith("http://") && !pUri.startsWith("https://")) { + pUri = "_profile_" + pUri; + + downloadurl = canvas.getUrl() + 'DownloadHandler?fileName=' + pUri + + '&parentPath=&room_id=&r=' + (new Date()).getTime() + + extraParams + '&sid='+canvas.sessionId; + } + if($debug) Debug.write("getPictureUrl/downloadurl ", downloadurl); + return downloadurl; + ]]> + </method> + + <method name="getNotNullString" args="value"> + return value == null ? '' : value; + </method> + + <method name="isRemoteUser" args=""> + return canvas.isinitRoomDirect || canvas.remoteUserLogin || canvas.directUserLogin || canvas.secureRemoteUserLogin; + </method> + + <method name="loadImgBySrc" args="cmp, imgUrl, completeCallback"> + cmp.sprite.resource = imgUrl; + if (!cmp.sprite.imgLoader) { + if (cmp.sprite.resourceContainer) { + // unload previous internal image-resource + cmp.sprite.unload(); + } + cmp.sprite.imgLoader = new Loader(); + cmp.sprite.imgLoader.mouseEnabled = false;// @devnote: see LPP-7022 + cmp.sprite.imgLoader.mouseChildren = false; + cmp.sprite.resourceContainer = cmp.sprite.imgLoader; + cmp.sprite.addChild(cmp.sprite.imgLoader); + } + var res:Loader = cmp.sprite.imgLoader; + if (res) { + res.scaleX = res.scaleY = 1.0; + } + if (completeCallback) { + cmp.sprite.imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeCallback); + } + cmp.sprite.imgLoader.load(new URLRequest(imgUrl), LzSprite.loaderContext); + </method> +</library> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/library.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/library.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/library.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/library.lzx Thu Aug 11 17:29:16 2016 @@ -19,14 +19,15 @@ --> <library> - <include href="remote/" /> - <include href="components/" /> - <include href="hibernate/" /> - <include href="contentviews/" /> + <include href="remote/" /> + <include href="components/" /> + <include href="hibernate/" /> + <include href="contentviews/" /> <!-- for main.lzx --> + <include href="baseMethods.lzx" /> <include href="externalJavaScript.lzx" /> - <include href="functions.lzx" /> + <include href="functions.lzx" /> <include href="mainAttributes.lzx" /> <include href="mainDatasets.lzx" /> <include href="mainMethods.lzx" /> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainDatasets.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainDatasets.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainDatasets.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainDatasets.lzx Thu Aug 11 17:29:16 2016 @@ -8,8 +8,8 @@ "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 - + 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 @@ -55,38 +55,37 @@ <!-- get values from public/config.xml --> <dataset type="http" name="myConfigSet" request="false" ondata="parent.mainTheme.loadTheme()" proxied="false"> - <handler name="oninit"> - var d = new Date(); - this.setAttribute("src", canvas.getServerBaseUrl() + "config.xml?random=" + d.getTime()); - this.doRequest(); - </handler> - <handler name="ondata"> - if ($debug) Debug.write("ondata"); - </handler> - <handler name="onerror" args="e"> - if ($debug) Debug.write("onerror",e); - </handler> - <handler name="ontimeout" args="e"> - if ($debug) Debug.write("ontimeout",e); - </handler> + <handler name="oninit"> + var d = new Date(); + this.setAttribute("src", canvas.getServerBaseUrl() + "config.xml?random=" + d.getTime()); + this.doRequest(); + </handler> + <handler name="ondata"> + if ($debug) Debug.write("ondata"); + </handler> + <handler name="onerror" args="e"> + if ($debug) Debug.write("onerror",e); + </handler> + <handler name="ontimeout" args="e"> + if ($debug) Debug.write("ontimeout",e); + </handler> </dataset> <!-- get values from public/config.xml --> -<dataset type="http" name="mainTheme" request="false" ondata="canvas.myinit()" proxied="false"> - <method name="loadTheme"> - var d = new Date(); - this.setAttribute("src", canvas.getServerBaseUrl() + "theme.xml?random=" + d.getTime()); - this.doRequest(); - </method> - <handler name="ondata"> - if ($debug) Debug.write("ondata"); - </handler> - <handler name="onerror" args="e"> - if ($debug) Debug.write("onerror",e); - </handler> - <handler name="ontimeout" args="e"> - if ($debug) Debug.write("ontimeout",e); - </handler> +<dataset type="http" name="mainTheme" request="false" ondata="canvas.mybaseinit()" proxied="false"> + <method name="loadTheme"> + var d = new Date(); + this.setAttribute("src", canvas.getServerBaseUrl() + "theme.xml?random=" + d.getTime()); + this.doRequest(); + </method> + <handler name="ondata"> + if ($debug) Debug.write("ondata"); + </handler> + <handler name="onerror" args="e"> + if ($debug) Debug.write("onerror",e); + </handler> + <handler name="ontimeout" args="e"> + if ($debug) Debug.write("ontimeout",e); + </handler> </dataset> - </library> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx Thu Aug 11 17:29:16 2016 @@ -33,557 +33,19 @@ </when> </switch> - <attribute name="colorArray" value="null" /> - <attribute name="errorLoader" /> - - <method name="getColorForUser"> - <![CDATA[ - var colorArray = [0x92E8A4,0xC2F1FF,0xFFFCAE,0xE8C792,0xFF8073, - 0xE8DB87,0xAFFFB8,0xBED4FF,0xE0BBE8,0xFFBBA5]; - return colorArray[Math.round(Math.random()*10)]; - ]]> - </method> - - <method name="remoteLogWrite" args="message"> - if ($debug) Debug.warn("remoteLogWrite:: ", message); - if (!errorLoader) { - errorLoader = new RestCall({ - url: canvas.getUrl() + 'services/error/report/' - , method: URLRequestMethod.POST - }); - } - var vars:URLVariables = new URLVariables(); - vars.message = message; - errorLoader.load(vars); - </method> - - <method name="getHttpHost"> - <![CDATA[ - if (canvas.httphostlocal != null && canvas.httphostlocal.length > 0) { - return canvas.httphostlocal; - } - return canvas.rtmphostlocal; - ]]> - </method> - - <method name="getUrl"> - <![CDATA[ - return canvas.protocol + '://' + getHttpHost() + ':' + canvas.red5httpport + canvas.httpRootKey; - ]]> - </method> - - <method name="getServicesUrl"> - <![CDATA[ - return getUrl() + 'services/'; - ]]> - </method> - - <method name="getTestingUrl"> - <![CDATA[ - return getUrl() + '?swf=networktesting' + ($debug ? 'debug' : '') + '.swf10.swf'; - ]]> - </method> - - <method name="getAppBaseUrl"> - <![CDATA[ - return getUrl() + "swf"; - ]]> - </method> - <method name="myinit"> - <![CDATA[ - canvas.mediaerrortimeout = 30000; - canvas.medialoadtimeout = 30000; - - if($debug) Debug.write("main.lzx/config.xml ondata",this); - - //Set Config-values by public/config.xml, see comments on public/config.xml - if (!canvas.isCluster) { - this.setAttribute('rtmphostlocal',canvas.myConfigSet.getPointer().xpathQuery('config/rtmphostlocal/text()')); - } - this.setAttribute('rtmpport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/rtmpport/text()'))); - this.setAttribute('rtmpsslport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/rtmpsslport/text()'))); - - var userSSLString = canvas.myConfigSet.getPointer().xpathQuery('config/useSSL/text()'); - if ($debug) Debug.write("userSSLString",userSSLString) - if (userSSLString == "yes") { - this.setAttribute('useSSL',true); - } - - this.setAttribute('red5httpport',Number(canvas.myConfigSet.getPointer().xpathQuery('config/red5httpport/text()'))); - - this.setAttribute('loudnessAcitviation',canvas.myConfigSet.getPointer().xpathQuery('config/loudnessAcitviation/text()')); - this.setAttribute('webAppRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/webAppRootKey/text()')); - this.setAttribute('showWindowEffect',canvas.myConfigSet.getPointer().xpathQuery('config/showWindowEffect/text()')); - - //Audio-Video-Settings - this.setAttribute('loudnessAcitviation',canvas.myConfigSet.getPointer().xpathQuery('config/loudnessAcitviation/text()')); - this.setAttribute('codecType',canvas.myConfigSet.getPointer().xpathQuery('config/codecType/text()')); - this.setAttribute('framesPerSecond',Number(canvas.myConfigSet.getPointer().xpathQuery('config/framesPerSecond/text()'))); - this.setAttribute('bandwidthNeededNormal',Number(canvas.myConfigSet.getPointer().xpathQuery('config/bandwidthNeededNormal/text()'))); - this.setAttribute('bandwidthNeededBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/bandwidthNeededBest/text()'))); - this.setAttribute('camQualityNormal',Number(canvas.myConfigSet.getPointer().xpathQuery('config/camQualityNormal/text()'))); - this.setAttribute('camQualityBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/camQualityBest/text()'))); - this.setAttribute('microphoneRateBest',Number(canvas.myConfigSet.getPointer().xpathQuery('config/microphoneRateBest/text()'))); - this.setAttribute('echoPath',Number(canvas.myConfigSet.getPointer().xpathQuery('config/echoPath/text()'))); - this.setAttribute('echoSuppression',canvas.myConfigSet.getPointer().xpathQuery('config/echoSuppression/text()')); - - this.setAttribute('defaultWhiteboardWidth',Number(canvas.myConfigSet.getPointer().xpathQuery('config/defaultWhiteboardWidth/text()'))); - this.setAttribute('defaultWhiteboardHeight',Number(canvas.myConfigSet.getPointer().xpathQuery('config/defaultWhiteboardHeight/text()'))); - - - this.setAttribute('httpRootKey',canvas.myConfigSet.getPointer().xpathQuery('config/httpRootKey/text()')); - this.setAttribute('httphostlocal',canvas.myConfigSet.getPointer().xpathQuery('config/httphostlocal/text()')); - this.setAttribute('protocol',canvas.myConfigSet.getPointer().xpathQuery('config/protocol/text()')); - this.setAttribute('proxyType',canvas.myConfigSet.getPointer().xpathQuery('config/proxyType/text()')); - - //set user color - canvas.currentusercolor = canvas.getColorForUser(); - - var _url = this.getDisplayObject().loaderInfo.url; - if($debug) Debug.write("_url: ",_url); - var cleanUrl = _url; - - var hasParams = _url.indexOf("?"); - if (hasParams != -1) { - cleanUrl = _url.substr(0, hasParams); - } - - if ($debug) Debug.write("_url ",_url,cleanUrl); - var doubleSlash = cleanUrl.indexOf("//"); - var isNotPort80 = cleanUrl.indexOf(":", doubleSlash+2); - if ($debug) Debug.write("isNotPort80: ",isNotPort80,doubleSlash); - if (isNotPort80!=-1){ - //Debug.write("isNotPort80: ",doubleSlash+2, _url.indexOf(":", doubleSlash+2)-doubleSlash-2); - var server = cleanUrl.substr(doubleSlash+2, _url.indexOf(":", doubleSlash+2)-doubleSlash-2); - } else { - var server = cleanUrl.substr(doubleSlash+2, _url.indexOf("/", doubleSlash+2)-doubleSlash-2); - } - - if ($debug) Debug.write("this zielnr: ",this,server); - - this.setAttribute('rtmphost',server); - - if (this.rtmphostlocal.length==0){ - this.setAttribute('rtmphostlocal',server); - } - - //Check for Invitation - var invitationHash = lz.Browser.getInitArg('invitationHash'); - - if ($debug) Debug.info("###################### -1 "); - if ($debug) Debug.info("invitationHash :: ",invitationHash); - - if (invitationHash != undefined){ - canvas.isinitRoomDirect = true; - canvas.invitationHash = invitationHash; - } - - var secureHash = lz.Browser.getInitArg('secureHash'); - if (secureHash != undefined){ - canvas.secureRemoteUserLogin = true; - canvas.secureHash = secureHash; - } - - if ($debug) Debug.info("###################### -2 "); - - var language = lz.Browser.getInitArg('language'); - if (language != undefined) { - canvas.language_id = Number(language); - } - - var wicketroomid = lz.Browser.getInitArg('wicketroomid'); - if (wicketroomid != undefined && !isNaN(wicketroomid)) { - canvas.setAttribute('wicketroomid', Number(wicketroomid)); - hib.userScope = canvas.wicketroomid; - } - canvas.setAttribute('wicketsid', null); - var wicketsid = lz.Browser.getInitArg('wicketsid'); - if (wicketsid != undefined) { - canvas.setAttribute('wicketsid', wicketsid); - } - var uid = lz.Browser.getInitArg('uid'); - if (!!uid) { - canvas.setAttribute('publicSID', uid); - } - this.setBaseColors(); - - //Debug.write("rtmphostlocal,rtmphost: ",canvas.rtmphostlocal,canvas.rtmphost); + <![CDATA[ + hib.userScope = canvas.wicketroomid; var src = hib.getUrl(); canvas.thishib.setAttribute('src',src); canvas.thishib.loaderVar = new lz.autoLoader(canvas); canvas.thishib.loaderVar._src.setAttribute('text',src); canvas.thishib.connect(); - ]]> - </method> - - <method name="getLabelName" args="id"> - //if($debug) Debug.write("main.lzx/getLabelName()",id); - return getLabelTag(id); - </method> - - <!-- - exportFilePNG exportFileJPG exportFilePDF exportFileSVG exportFileTIF - --> - - <method name="doWhiteboardActionmenu" args="action"> - if (action == "exportFilePNG") { - canvas._drawarea.confirmSaveAsImageTypeExport("image","png"); - } else if (action == "exportFileJPG") { - canvas._drawarea.confirmSaveAsImageTypeExport("image","jpg"); - } else if (action == "exportFilePDF") { - canvas._drawarea.confirmSaveAsImageTypeExport("image","pdf"); - } else if (action == "exportFileSVG") { - canvas._drawarea.confirmSaveAsImageExport("image"); - } else if (action == "exportFileTIF") { - canvas._drawarea.confirmSaveAsImageTypeExport("image","tif"); - } - </method> - - <method name="quit"> - canvas.thishib.src = null; - canvas.thishib.reconnectionAction = false; - canvas.thishib.counterror = 100; - canvas.thishib.disconnect(); - if (canvas.thishib._nc) { - canvas.thishib._nc.close(); - } - ExternalInterface.call("roomExit"); - </method> - - <method name="setRoomValues" args="roomObj"> - <![CDATA[ - if ($debug) Debug.warn("setRoomValues ",roomObj); - //this is needed cause in the rpc-method *getCurrentModeratorList* we check if its room.type == 'restricted' - //if so we will not show any *There is no Moderator* Warning Dialog - canvas.currentRoomObj = roomObj; - - if (roomObj != null) { - hib.currentroomid = roomObj.id; - canvas.isConference = roomObj.type == 'conference'; - canvas.isInterview = roomObj.type == 'interview'; - - if (roomObj.type == 'conference') { - new lz.flexibleConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); - } else if (roomObj.type == 'restricted') { - new lz.restrictedConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); - } else if (roomObj.type == 'interview') { - new lz.interviewConferenceRoom(canvas.main_content._content.inner, {roomobj:roomObj}); - } - } ]]> </method> - <method name="parseLanugageObject" args="obj"> - - ////Debug.write('parseLanugageObject: ',obj); - ////Debug.write('parseLanugageObject: ',obj.childNodes); - <![CDATA[ - var t = new Array(); - for (var i=0;i<obj.childNodes.length;i++){ - for (var k=0;k<obj.childNodes[i].childNodes.length;k++){ - ////Debug.write(obj.childNodes[i].childNodes[k]); - var t2 = new Array(); - t2[obj.childNodes[i].childNodes[k].childNodes[0].nodeName]=obj.childNodes[i].childNodes[k].childNodes[0].childNodes[0].data; - t2[obj.childNodes[i].childNodes[k].childNodes[1].nodeName]=obj.childNodes[i].childNodes[k].childNodes[1].childNodes[0].data; - t.push(t2); - } - } - setLabelObject(t); - canvas.initScreen(); - //Debug.write(t); - ]]> - </method> - - <!--- - @doc The function does compare the new moderator list with the old and prepares the list - the removeModeratorList is used in the performance optimized user list of the restricted - room type to re-render the list items only if really something has changed in any - of the user list items - --> - <method name="analyzeModerationList" args="newList"> - <![CDATA[ - canvas.removeModeratorList = new Array(); - - if (canvas.currentModeratorList != null) { - for (var i = 0; i < canvas.currentModeratorList.length; ++i) { - canvas.currentModeratorList[i].found = false; - for (var k = 0; k < newList.length; ++k) { - if (newList[k].publicSID == canvas.currentModeratorList[i].publicSID) { - canvas.currentModeratorList[i].found = true; - } - } - } - } - if (canvas.currentModeratorList != null) { - for (var i = 0; i < canvas.currentModeratorList.length; ++i) { - if (!canvas.currentModeratorList[i].found) { - canvas.removeModeratorList.push(canvas.currentModeratorList[i]) - } - } - } - - if ($debug) Debug.write("removeModeratorList :: ",canvas.removeModeratorList); - ]]> - </method> - - <!--- - Updates the "ismoderator" flag - the setAttribute method will broadcast an event to all event listeners that - did subscribe using the "onismoderator" handler with reference to canvas ! - --> - <method name="updateModerationFlag"> - <![CDATA[ - var isCurrentModerator = false; - if ($debug) Debug.write("updateModerationFlag", canvas.removeModeratorList); - for (var i = 0; i < canvas.removeModeratorList.length; ++i) { - var item = canvas.removeModeratorList[i]; - if (canvas.publicSID == item.publicSID) { - isCurrentModerator = false; - } - } - if ($debug) Debug.write("updateModerationFlag", canvas.currentModeratorList); - for (var i = 0; i < canvas.currentModeratorList.length; ++i) { - var item = canvas.currentModeratorList[i]; - if (canvas.publicSID == item.publicSID) { - isCurrentModerator = true; - } - } - - // do always spread this event, we need to broadcast the "onismoderator" event - // so that we can update the status of other users in the user list - try { - canvas.setAttribute('ismoderator', isCurrentModerator); - } catch (e:Error) { - new lz.errorPopup(canvas, {error: "update moder "+e}); - if ($debug) Debug.error("updateModerationFlag::error ", e); - } - ]]> - </method> - - <!--- - Checks if a certain publicSID is a moderator - --> - <method name="getIsModeratorByPublicSID" args="publicSID"> - <![CDATA[ - for (var i = 0; i < canvas.currentModeratorList.length; ++i) { - var item = canvas.currentModeratorList[i]; - if (publicSID == item.publicSID) { - return true; - } - } - return false; - ]]> - </method> - - <!--- - Sets the flag for the isAllowedToGiveExclusiveAudio status and broadcasts it to the - SWF10 container - --> - <method name="setExclusiveAudioAllowStatus" args="roomClientObj"> - <![CDATA[ - if ($debug) Debug.write("giveExclusiveAudioStatus changes ###### "); - if (roomClientObj.publicSID==canvas.publicSID) { - canvas.setAttribute("isAllowedToGiveExclusiveAudio",roomClientObj.canGiveAudio); - canvas.commonVideoViewContent.setExclusiveAudioAllowStatus(roomClientObj.canGiveAudio); - } - ]]> - </method> - - <method name="setMuteStatus" args="roomClientObj"> - <![CDATA[ - if ($debug) Debug.write("setMuteStatus changes ###### ",roomClientObj.micMuted); - //Check for self status - if (roomClientObj.publicSID == canvas.publicSID) { - canvas.setAttribute("micMuted",roomClientObj.micMuted); - } - - canvas._videocontainer.updateMuteStatusVideoView(roomClientObj); - - //Notify all Listeners for change of the item - canvas.setAttribute("micMutedStatusChangedItem", roomClientObj); - ]]> - </method> - - <method name="addFolderSequence" args="foldername"> - <![CDATA[ - this.uploadmoduleimgfolder = '/'; - this.uploadmoduleimgfolder += foldername; - this.setAttribute('uploadmoduleimgfolder',this.uploadmoduleimgfolder); - ]]> - </method> - - - <handler name="onmousewheeldelta" reference="lz.Keys" args="d"> - <![CDATA[ - var obj = getCurrentMouseWheelObject(); - ////Debug.write("onmousewheeldelta 12: ",d,obj); - if (obj!=null) { - obj.step(-d); - } - ]]> - </handler> - - <method name="reverseWordingsBySplit" args="str"> - <![CDATA[ - var words_arr = str.split( " " ); // an array of chars - for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order - { - str += words_arr[ words_arr.length - i - 1 ]; - if (words_arr.length != 1) { - str += " "; - } - } - return str; - - ]]> - </method> - - <method name="reverseAll" args="str"> - <![CDATA[ - var words_arr = str.split( "" ); // an array of chars - for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order - { - str += words_arr[ words_arr.length - i - 1 ]; - - } - return str; - - ]]> - </method> - - <method name="reverseWords" args="str"> - <![CDATA[ - if ( str == "" || str == null ) return ""; // undefined - // first char indicates the main directive of str (rtl/ltr) - if ( isLTR( str.charCodeAt( 0 ) ) ) return str; // english or number - var words_arr = str.split( "" ); // an array of chars - for ( var i = 0, str = ""; i < words_arr.length; i++ ) // reverse their order - str += words_arr[ words_arr.length - i - 1 ]; - return str; - ]]> - </method> - - <method name="isLTR" args="c"> - <![CDATA[ - return ( c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 ); - ]]> - </method> - - <method name="isHEB" args="c"> - <![CDATA[ - return ( c >= 224 && c <= 250 ); - ]]> - </method> - - <method name="setTextAlign" args="obj,type"> - switch ( type ) { - case "left" : - obj.setX( 0 ); - break; - case "center" : - obj.setX( this.parent.width / 2 - this.getTextWidth() / 2 ); - break; - case "right" : - obj.setX( this.parent.width - this.getTextWidth() ); - break; - } - </method> - - <method name="getUserData"> - var so:SharedObject = SharedObject.getLocal('userdata'); - var g = so.data; - if (g == null) { - if($debug) Debug.write("sharedObject.getData IS null"); - g = new Array(); - } - return g; - </method> - - <method name="setUserData" args="g"> - var so:SharedObject = SharedObject.getLocal('userdata'); - for (var i in g) { - if($debug) Debug.write("g[" + i + "] = ", g[i]); - so.data[i] = g[i]; - } - so.flush(); - </method> - - <method name="getThemeImage" args="tName"> - //if ($debug) Debug.write("load Image by Name: ",tName); - var tPath = canvas.mainTheme.getPointer().xpathQuery("theme/resource[@name='"+tName+"']/@src"); - //if ($debug) Debug.write("tPath "+tPath); - if (tPath == null) { - if ($debug) Debug.warn("getThemeImage - No Image found for config: ",tName); - } else { - tPath = canvas.getUrl() + 'public/' + tPath; - } - return tPath; - </method> - - <method name="getThemeColor" args="tColor"> - //if ($debug) Debug.write("load Color by Name: ",tColor); - var tResColor = canvas.mainTheme.getPointer().xpathQuery("theme/color[@name='"+tColor+"']/@value"); - //if ($debug) Debug.write("tColor "+tColor); - if (tResColor == null) { - if ($debug) Debug.warn("getThemeColor - No Color found for config: ",tColor); - } - return tResColor; - </method> - <method name="setBaseColors"> - defaultstyle.setAttribute("basecolor",canvas.getThemeColor('basebgcolorizer')); - itemStyle.setAttribute("basecolor",canvas.getThemeColor('basebgcolorizer')); - menuStyle.setAttribute("basecolor",canvas.getThemeColor('styleMenuBarBaseColor')); _conferencemenu.setAttribute("bgcolor",canvas.getThemeColor('baseMousecolorizer')); - main_content.setAttribute("bgcolor",canvas.getThemeColor('mainBackgroundColor')); - </method> - - <method name="getPictureUrl" args="pictureuri,extraParams"> - <![CDATA[ - var pUri = (pictureuri == null || pictureuri.length == 0) ? "d.jpg" : pictureuri; - var downloadurl = pUri; - if (!pUri.startsWith("http://") && !pUri.startsWith("https://")) { - pUri = "_profile_" + pUri; - - downloadurl = canvas.getUrl() + 'DownloadHandler?fileName=' + pUri - + '&parentPath=&room_id=&r=' + (new Date()).getTime() - + extraParams + '&sid='+canvas.sessionId; - } - if($debug) Debug.write("getPictureUrl/downloadurl ", downloadurl); - return downloadurl; - ]]> - </method> - - <method name="getNotNullString" args="value"> - return value == null ? '' : value; - </method> - - <method name="isRemoteUser" args=""> - return canvas.isinitRoomDirect || canvas.remoteUserLogin || canvas.directUserLogin || canvas.secureRemoteUserLogin; - </method> - - <method name="loadImgBySrc" args="cmp, imgUrl, completeCallback"> - cmp.sprite.resource = imgUrl; - if (!cmp.sprite.imgLoader) { - if (cmp.sprite.resourceContainer) { - // unload previous internal image-resource - cmp.sprite.unload(); - } - cmp.sprite.imgLoader = new Loader(); - cmp.sprite.imgLoader.mouseEnabled = false;// @devnote: see LPP-7022 - cmp.sprite.imgLoader.mouseChildren = false; - cmp.sprite.resourceContainer = cmp.sprite.imgLoader; - cmp.sprite.addChild(cmp.sprite.imgLoader); - } - var res:Loader = cmp.sprite.imgLoader; - if (res) { - res.scaleX = res.scaleY = 1.0; - } - if (completeCallback) { - cmp.sprite.imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeCallback); - } - cmp.sprite.imgLoader.load(new URLRequest(imgUrl), LzSprite.loaderContext); </method> </library> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/commonVideoViewContentSWF10.lzx Thu Aug 11 17:29:16 2016 @@ -33,7 +33,6 @@ <attribute name="videoWidth" type="number" value="132"/> <attribute name="videoHeight" type="number" value="132"/> <attribute name="SIDEPANEL_WIDTH" type="number" value="270" /> - <attribute name="testingApplication" value="null" /> <attribute name="baseVideoStream" value="null" /> <method name="toggleVideo" args="value"> @@ -497,29 +496,6 @@ </method> <!--- - Starts the 5 second audio/video testing application and connect to RTMP - --> - <method name="doInitTestingApplication" args="x,y,connection_url"> - if($debug) Debug.write("doInitTestingApplication ",x,y); - canvas.thishib.setAttribute('src',connection_url); - canvas.thishib.connect(); - this.testingApplication = new lz.testingApplication(canvas,{name:'currentSharing',x:x+1,y:y+24}); - </method> - - <!--- - Stops and destroys the view with the audio/video testing application - and send confirmation back via LocalConnection - --> - <method name="closeInitTestingApplication"> - if($debug) Debug.write("closeInitTestingApplication "); - if (this.testingApplication != null) { - this.testingApplication.storeSettings(); - this.testingApplication.destroy(); - this.testingApplication = null; - } - </method> - - <!--- Initializes video playback component and connect to RTMP --> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/main.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/main.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/main.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/main.lzx Thu Aug 11 17:29:16 2016 @@ -45,7 +45,6 @@ <include href="modules/" /> <include href="video/" /> <include href="screensharing/" /> - <include href="audioVideoTest/" /> <include href="lzrecorder/" /> <include href="commonVideoViewContentSWF10.lzx" /> <include href="dragHelper.lzx" /> Added: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/settings.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/settings.lzx?rev=1756016&view=auto ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/settings.lzx (added) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/settings.lzx Thu Aug 11 17:29:16 2016 @@ -0,0 +1,75 @@ +<?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. + +--> +<canvas width="100%" height="100%" title="OpenMeetings"> + <switch> + <when property="$as3"> + <passthrough> + import flash.net.*; + import flash.external.ExternalInterface; + import flash.events.*; + </passthrough> + </when> + </switch> + <switch> + <when property="$debug"> + <method name="doDebugInit"> + canvas.setAttribute('debug', true); + </method> + <debug fontsize="11" oninit="Debug.showInternalProperties = true" width="80%" y="50%" x="0" height="50%" /> + </when> + <otherwise> + <method name="doDebugInit"/> + </otherwise> + </switch> + + <include href="base/mainAttributes.lzx" /> + <include href="base/mainAttributes.lzx" /> + <include href="base/mainDatasets.lzx" /> + <include href="base/baseMethods.lzx" /> + <include href="base/functions.lzx" /> + <include href="base/components" /> + <include href="base/contentviews" /> + <include href="base/hibernate" /> + <include href="base/remote" /> + <include href="resources/" /> + <include href="video/" /> + <include href="dragHelper.lzx" /> + + <silverstyle name="defaultstyle" isdefault="true" canvascolor="white" /> + <silverstyle name="componentStyle" basecolor="0xFFFFFF" textcolor="0x000000" /> + <silverstyle name="itemStyle" textcolor="0xFFFFFF" /> + <whitestyle name="menuStyle" textcolor="0x000000" /> + + <!-- main colors: 264269 --> + <handler name="oninit"><![CDATA[ + doDebugInit(); + ExternalInterface.call("loadingComplete"); + canvas.currentClient = {canVideo: true}; + canvas.currentRoomObj = {audioOnly: false}; + ]]></handler> + + <handler name="onerror" args="errmsg"> + canvas.remoteLogWrite("error " + errmsg); + </handler> + + <view name="main_content" y="0" width="${canvas.width}" height="${ canvas.height }" /> + <view name="inner"></view> +</canvas> Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/library.lzx URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/library.lzx?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/library.lzx (original) +++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/video/library.lzx Thu Aug 11 17:29:16 2016 @@ -19,21 +19,30 @@ --> <library> - + <!-- APL author sebawagner --> + <resource name="level_meter_rsc" src="resources/level_meter.png" /> + <!-- APL author sebawagner --> + <resource name="test_setup_record_rsc" src="resources/webstart_record.png" /> + <!-- APL author sebawagner --> + <resource name="test_setup_play_rsc" src="resources/run.png" /> + <!-- APL author sebawagner --> + <resource name="test_setup_stop_rsc" src="resources/stop.png" /> + <!-- FamFam Icon Set --> + <resource name="test_setup_info_rsc" src="resources/information.png" /> <!-- FamFam Icon Creative Commons --> - <resource name="warning_icon_popup_devices_rsc" src="resources/error.png" /> + <resource name="warning_icon_popup_devices_rsc" src="resources/error.png" /> <!-- FamFam Icon Creative Commons --> <resource name="resyncuser_rsc" src="resources/arrow_refresh_small.png" /> <!-- APL author sebawagner --> - <resource name="mic_rsc" src="resources/micro.png" /> - - <!-- APL author sebawagner --> + <resource name="mic_rsc" src="resources/micro.png" /> + + <!-- APL author sebawagner --> <resource name="speaking" src="resources/speaking.png" /> - <!-- IconFinder Creative Commons --> - <resource name="volume" src="resources/volume.png" /> + <!-- IconFinder Creative Commons --> + <resource name="volume" src="resources/volume.png" /> <!-- FamFam Icon Creative Commons --> <resource name="mute_btn_rsc"> @@ -42,7 +51,7 @@ </resource> <!-- APL author sebawagner --> - <resource name="mute_micro_btn_rsc"> + <resource name="mute_micro_btn_rsc"> <frame src="resources/mute_micro.png" /> <frame src="resources/mute_micro_red.png" /> </resource> @@ -50,13 +59,13 @@ <!-- APL author sebawagner --> <resource name="lz_recorder_play" src="resources/webstart_play.png" /> - <include href="changeDevice.lzx" /> - <include href="videoUserProfilePicSWF10.lzx" /> - <include href="editRecordStreamSWF10.lzx" /> - <include href="baseVideoObject.lzx" /> - <include href="videoObjectPlayBroadcast.lzx" /> - <include href="videoObjectTestBroadcast.lzx" /> - <include href="videoObjectPlayTestBroadcast.lzx" /> - <include href="volumeSlider.lzx" /> - + <include href="changeDevice.lzx" /> + <include href="videoUserProfilePicSWF10.lzx" /> + <include href="editRecordStreamSWF10.lzx" /> + <include href="baseVideoObject.lzx" /> + <include href="videoObjectPlayBroadcast.lzx" /> + <include href="videoObjectTestBroadcast.lzx" /> + <include href="videoObjectPlayTestBroadcast.lzx" /> + <include href="volumeSlider.lzx" /> + </library> Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java (original) +++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java Thu Aug 11 17:29:16 2016 @@ -56,11 +56,12 @@ import org.slf4j.Logger; public class SwfPanel extends BasePanel { private static final long serialVersionUID = 1L; + private static final Logger log = Red5LoggerFactory.getLogger(SwfPanel.class, webAppRootKey); private static final String WICKET_ROOM_ID = "wicketroomid"; public static final String PARAM_PUBLIC_SID = "publicSid"; public static final String PARAM_URL = "url"; public static final String SWF_TYPE_NETWORK = "network"; - private static final Logger log = Red5LoggerFactory.getLogger(SwfPanel.class, webAppRootKey); + public static final String SWF_TYPE_SETTINGS = "settings"; private Long roomId = null; public SwfPanel(String id) { @@ -127,7 +128,14 @@ public class SwfPanel extends BasePanel } private String getFlashFile(StringValue type) { - String fmt = SWF_TYPE_NETWORK.equals(type.toString()) ? "networktesting%s.swf10.swf" : "main%s.swf11.swf"; + String fmt; + if (SWF_TYPE_SETTINGS.equals(type.toString())) { + fmt = "settings%s.swf11.swf"; + } else if (SWF_TYPE_NETWORK.equals(type.toString())) { + fmt = "networktesting%s.swf10.swf"; + } else { + fmt = "main%s.swf11.swf"; + } return String.format(fmt, DEVELOPMENT == getApplication().getConfigurationType() ? "debug" : ""); } Added: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/settings.png URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/settings.png?rev=1756016&view=auto ============================================================================== Binary file - no diff available. Propchange: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/css/images/settings.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java?rev=1756016&r1=1756015&r2=1756016&view=diff ============================================================================== --- openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java (original) +++ openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/SwfPanel.java Thu Aug 11 17:29:16 2016 @@ -32,10 +32,12 @@ import org.apache.wicket.request.mapper. import org.apache.wicket.request.resource.JavaScriptResourceReference; import org.apache.wicket.request.resource.ResourceReference; import org.apache.wicket.util.string.StringValue; +import org.apache.wicket.util.string.Strings; public class SwfPanel extends BasePanel { private static final long serialVersionUID = 1L; public static final String SWF_TYPE_NETWORK = "network"; + public static final String SWF_TYPE_SETTINGS = "settings"; public SwfPanel(String id) { this(id, new PageParameters()); @@ -47,15 +49,26 @@ public class SwfPanel extends BasePanel public String getInitFunction(PageParameters pp) { String initStr = null; - StringValue type = pp.get("swf"); - if (SWF_TYPE_NETWORK.equals(type.toString())) { - String swf = String.format("networktesting%s.swf10.swf", DEVELOPMENT == getApplication().getConfigurationType() ? "debug" : "") - + new PageParametersEncoder().encodePageParameters(pp); + String swf = getFlashFile(pp.get("swf")); + if (!Strings.isEmpty(swf)) { + swf += new PageParametersEncoder().encodePageParameters(pp); initStr = String.format("initSwf('%s');", swf); } return initStr; } + private String getFlashFile(StringValue type) { + String fmt; + if (SWF_TYPE_SETTINGS.equals(type.toString())) { + fmt = "settings%s.swf11.swf"; + } else if (SWF_TYPE_NETWORK.equals(type.toString())) { + fmt = "networktesting%s.swf10.swf"; + } else { + return ""; + } + return String.format(fmt, DEVELOPMENT == getApplication().getConfigurationType() ? "debug" : ""); + } + public SwfPanel(String id, PageParameters pp) { super(id); add(new Label("init", getInitFunction(pp)).setEscapeModelStrings(false)); Added: openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/settings.png URL: http://svn.apache.org/viewvc/openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/settings.png?rev=1756016&view=auto ============================================================================== Binary file - no diff available. Propchange: openmeetings/application/trunk/openmeetings-web/src/main/webapp/css/images/settings.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream