function VolumeController(){function a(){f()}function f(){e={},t={},n=0,r=0,i=0,l()}function l(){var e=funcObj.langCon.getString("General Group"),t=funcObj.langCon.getString("General Volume");$("#main_vol_title").html(e),$("#volume_popup .label").html(t)}function c(){showDebug===3&&console.log("volume_controller.js: cleanUp");for(var t in e){var n=funcObj.devCon.getDevice(t);t!="mains"&&(n==null||n.sObj!=undefined&&!n.sObj.getSocketState())?delete e[t]:t!="mains"&&funcObj.devCon.sendMsg(t,"volume")}}function h(){o===.01?o=.02:o===.02&&(o=.04)}function p(){o=.01}function d(e,t){showDebug===2&&console.log("buttonType",e,"buttonDirection",t);var n=srcObj[funcObj.play.getCurPlaySrc()],r=n&&n.getFeature("blockVolumeButtonEvents");if(isIOS&&r)return null;var i=funcObj.UIMain.getUID(),s=funcObj.devCon.getDevice(i),u;if(t==="buttonDown")if(e==="volumeDown")if(s.isInZone()){var a=s.getZone();a.devices.forEach(function(e){e.markStartingVolume()}),a.setDisplayVolumeDelta(-1*o),u=a.getMaxDisplayVolume()}else s.markStartingVolume(),s.setVolumeDelta(-1*o),u=s.getDisplayVolume();else if(s.isInZone()){var a=s.getZone();a.devices.forEach(function(e){e.markStartingVolume()}),a.setDisplayVolumeDelta(o),u=a.getMaxDisplayVolume()}else s.markStartingVolume(),s.setVolumeDelta(o),u=s.getDisplayVolume();t==="buttonDown"&&h(),t==="buttonUp"&&p(),v(u*100)}function v(e){clearTimeout(s);var t=funcObj.devCon.getDisplayName(funcObj.UIMain.getUID());$("#volume_popup .speaker").html(t),$("#volume_popup_bar").css("-webkit-transform","translate3d("+(e-100)+"%,0,0)"),$("#volume_popup").show(),s=setTimeout(m,u)}function m(){$("#volume_popup").fadeOut(300)}var e,t,n,r,i,s,o=.01,u=1e3;this.cleanUp=c,this.volumeButtonEvent=d,this.isPartOfZone,a()};