added a new attribute for the PhoneModule definition on config.xml to enable only the presenter to share the microphone - it fits perfectly on the global audio stream feature for webinars; refactored a little the PhoneOptions class to parse the options directly in a single place
This commit is contained in:
parent
98f8b9be4f
commit
e5a604bf17
@ -44,6 +44,7 @@
|
||||
uri="rtmp://HOST/sip"
|
||||
autoJoin="false"
|
||||
joinGlobal="true"
|
||||
presenterShareOnly="false"
|
||||
skipCheck="false"
|
||||
showButton="true"
|
||||
enabledEchoCancel="true"
|
||||
|
@ -60,8 +60,8 @@
|
||||
private var _xPosition:int;
|
||||
private var _yPosition:int;
|
||||
|
||||
[Bindable] private var muteAllIcon:Class = images.sound_mute;
|
||||
[Bindable] private var unmuteAllIcon:Class = images.sound_none;
|
||||
[Bindable] private var muteIcon:Class = images.sound_mute;
|
||||
[Bindable] private var unmuteIcon:Class = images.sound_none;
|
||||
[Bindable] private var kickIcon:Class = images.eject_user;
|
||||
[Bindable] public var listeners:ArrayCollection = new ArrayCollection();
|
||||
[Bindable] public var moderator:Boolean;
|
||||
@ -128,11 +128,9 @@
|
||||
if (mute){
|
||||
muteAllBtn.toolTip = ResourceUtil.getInstance().getString('bbb.listeners.unmuteAllBtn.toolTip');
|
||||
muteAllBtn.selected = true;
|
||||
muteAllIcon = images.sound_mute;
|
||||
} else{
|
||||
muteAllBtn.toolTip = ResourceUtil.getInstance().getString('bbb.listeners.muteAllBtn.toolTip');
|
||||
muteAllBtn.selected = false;
|
||||
muteAllIcon = images.sound_none;
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,7 +212,7 @@
|
||||
toolTip="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.pushToTalk.toolTip') : ResourceUtil.getInstance().getString('bbb.listeners.pushToMute.toolTip')}"
|
||||
click="toggleMuteMeState()" height="30" maxWidth="180">
|
||||
<mx:HBox verticalAlign="middle" horizontalGap="0" paddingLeft="5" paddingTop="5" paddingRight="5" paddingBottom="5">
|
||||
<mx:Image source="{UserManager.getInstance().getConference().voiceMuted ? images.sound_mute : images.sound_none}" />
|
||||
<mx:Image source="{UserManager.getInstance().getConference().voiceMuted ? muteIcon : unmuteIcon}" />
|
||||
<mx:Label text="{UserManager.getInstance().getConference().voiceMuted ? ResourceUtil.getInstance().getString('bbb.listeners.talk') : ResourceUtil.getInstance().getString('bbb.listeners.mute')}" />
|
||||
</mx:HBox>
|
||||
</flc:CanvasButton>
|
||||
|
@ -1,5 +1,7 @@
|
||||
package org.bigbluebutton.modules.phone
|
||||
{
|
||||
import org.bigbluebutton.core.BBB;
|
||||
|
||||
public class PhoneOptions {
|
||||
[Bindable]
|
||||
public var showButton:Boolean = true;
|
||||
@ -15,5 +17,19 @@ package org.bigbluebutton.modules.phone
|
||||
|
||||
[Bindable]
|
||||
public var joinGlobal:Boolean = true;
|
||||
|
||||
[Bindable]
|
||||
public var presenterShareOnly:Boolean = false;
|
||||
|
||||
public function PhoneOptions() {
|
||||
var vxml:XML = BBB.getConfigForModule("PhoneModule");
|
||||
if (vxml != null) {
|
||||
this.showButton = (vxml.@showButton.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
this.autoJoin = (vxml.@autoJoin.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
this.skipCheck = (vxml.@skipCheck.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
this.joinGlobal = (vxml.@joinGlobal.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
this.presenterShareOnly = (vxml.@presenterShareOnly.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -55,12 +55,6 @@ package org.bigbluebutton.modules.phone.managers {
|
||||
this.attributes = attributes;
|
||||
var vxml:XML = BBB.getConfigForModule("PhoneModule");
|
||||
phoneOptions = new PhoneOptions();
|
||||
if (vxml != null) {
|
||||
phoneOptions.showButton = (vxml.@showButton.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.autoJoin = (vxml.@autoJoin.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.skipCheck = (vxml.@skipCheck.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.joinGlobal = (vxml.@joinGlobal.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
}
|
||||
|
||||
if (phoneOptions.joinGlobal) {
|
||||
joinVoiceGlobal();
|
||||
|
@ -24,6 +24,7 @@
|
||||
xmlns:mx="http://www.adobe.com/2006/mxml">
|
||||
<mx:Script>
|
||||
<![CDATA[
|
||||
import org.bigbluebutton.main.events.MadePresenterEvent;
|
||||
import org.bigbluebutton.modules.phone.events.StopPhoneModuleEvent;
|
||||
import org.bigbluebutton.modules.phone.events.CallDisconnectedEvent;
|
||||
import org.bigbluebutton.modules.phone.events.CallConnectedEvent;
|
||||
@ -139,5 +140,12 @@
|
||||
<MethodInvoker generator="{PhoneEventMapDelegate}" method="enableToolbarButton"/>
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{MadePresenterEvent.SWITCH_TO_PRESENTER_MODE}" >
|
||||
<MethodInvoker generator="{PhoneEventMapDelegate}" method="switchToPresenter" />
|
||||
</EventHandlers>
|
||||
|
||||
<EventHandlers type="{MadePresenterEvent.SWITCH_TO_VIEWER_MODE}">
|
||||
<MethodInvoker generator="{PhoneEventMapDelegate}" method="switchToViewer" />
|
||||
</EventHandlers>
|
||||
|
||||
</EventMap>
|
||||
|
@ -39,12 +39,6 @@ package org.bigbluebutton.modules.phone.maps
|
||||
soundButton = new MuteButton();
|
||||
globalDispatcher = new Dispatcher();
|
||||
phoneOptions = new PhoneOptions();
|
||||
var vxml:XML = BBB.getConfigForModule("PhoneModule");
|
||||
if (vxml != null) {
|
||||
phoneOptions.showButton = (vxml.@showButton.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.autoJoin = (vxml.@autoJoin.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.skipCheck = (vxml.@skipCheck.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
public function addToolbarButton():void {
|
||||
@ -91,5 +85,13 @@ package org.bigbluebutton.modules.phone.maps
|
||||
phoneButton.enabled = true;
|
||||
//phoneButton.userJoinedConference(false);
|
||||
}
|
||||
|
||||
public function switchToPresenter():void {
|
||||
phoneButton.setPresenter(true);
|
||||
}
|
||||
|
||||
public function switchToViewer():void {
|
||||
phoneButton.setPresenter(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -24,9 +24,18 @@
|
||||
icon="{phoneIcon}" click="startPhone()"
|
||||
mouseOver = "mouseOverHandler(event)"
|
||||
mouseOut = "mouseOutHandler(event)"
|
||||
visible = "{amIPresenter || !phoneOptions.presenterShareOnly}"
|
||||
includeInLayout = "{amIPresenter || !phoneOptions.presenterShareOnly}"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.toolbar.phone.toolTip.start')}"
|
||||
implements="org.bigbluebutton.common.IBbbToolbarComponent">
|
||||
|
||||
|
||||
<!-- TABELA VERDADE (TRADUZIR AQUI!)
|
||||
phoneOptions.presenterShareOnly amIPresenter amIPresenter || !phoneOptions.presenterShareOnly
|
||||
V V V
|
||||
V F F -> do not show de button only if only presenters can share microphone and I'm not a
|
||||
F V V
|
||||
F F V
|
||||
-->
|
||||
|
||||
<mate:Listener type="SPEAKING_AND_LISTENING" method="handleBBBSpeakingAndListening"/>
|
||||
<mate:Listener type="LISTENING_ONLY" method="handleBBBListeningOnly"/>
|
||||
@ -38,6 +47,7 @@
|
||||
|
||||
import org.bigbluebutton.common.LogUtil;
|
||||
import org.bigbluebutton.core.BBB;
|
||||
import org.bigbluebutton.core.managers.UserManager
|
||||
import org.bigbluebutton.main.events.BBBEvent;
|
||||
import org.bigbluebutton.main.views.MainToolbar;
|
||||
import org.bigbluebutton.modules.phone.PhoneOptions;
|
||||
@ -48,7 +58,10 @@
|
||||
|
||||
private var images:Images = new Images();
|
||||
private var dispatcher:Dispatcher = new Dispatcher();
|
||||
|
||||
[Bindable]
|
||||
private var phoneOptions:PhoneOptions = new PhoneOptions();
|
||||
[Bindable]
|
||||
private var amIPresenter:Boolean = UserManager.getInstance().getConference().amIPresenter();
|
||||
|
||||
public const DEFAULT_STATE:Number = 0;
|
||||
public const ACTIVE_STATE:Number = 1;
|
||||
@ -64,12 +77,6 @@
|
||||
this.enabled = false;
|
||||
var vxml:XML = BBB.getConfigForModule("PhoneModule");
|
||||
var phoneOptions:PhoneOptions = new PhoneOptions();
|
||||
if (vxml != null) {
|
||||
phoneOptions.showButton = (vxml.@showButton.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.autoJoin = (vxml.@autoJoin.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.skipCheck = (vxml.@skipCheck.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
phoneOptions.joinGlobal = (vxml.@joinGlobal.toString().toUpperCase() == "TRUE") ? true : false;
|
||||
}
|
||||
if (noMicrophone() == false) {
|
||||
var askToChangeEvent:BBBEvent;
|
||||
askToChangeEvent = new BBBEvent("ASK_TO_CHANGE_VOICE_CONFERENCE_EVENT");
|
||||
@ -161,6 +168,10 @@
|
||||
public function getAlignment():String{
|
||||
return MainToolbar.ALIGN_LEFT;
|
||||
}
|
||||
|
||||
public function setPresenter(value:Boolean):void {
|
||||
amIPresenter = value;
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
</mx:Button>
|
||||
|
@ -27,6 +27,7 @@
|
||||
mouseOut = "mouseOutHandler(event)"
|
||||
toolTip="{ResourceUtil.getInstance().getString('bbb.toolbar.video.toolTip.start')}"
|
||||
visible="{isPresenter}"
|
||||
includeInLayout="{isPresenter}"
|
||||
implements="org.bigbluebutton.common.IBbbToolbarComponent">
|
||||
|
||||
<mx:Script>
|
||||
|
Loading…
Reference in New Issue
Block a user