Merge pull request #2748 from capilkey/add-checkbox-chat-sounds

Miscellaneous Client fixes for 1.0
This commit is contained in:
Richard Alam 2015-08-26 17:21:44 -04:00
commit ebd98168c4
9 changed files with 112 additions and 60 deletions

View File

@ -529,7 +529,7 @@ TitleWindow {
.micSettingsWindowHearFromHeadsetLabelStyle, .micSettingsWindowSpeakIntoMicLabelStyle, .micSettingsWindowMicNameLabelStyle, .webcamPermissionSettingsTextStyle {
fontFamily: Arial;
fontSize: 12;
fontSize: 14;
}
.micSettingsWindowPlaySoundButtonStyle, .micSettingsWindowChangeMicButtonStyle {
@ -883,4 +883,12 @@ PollChoicesModal {
fontSize: 14;
paddingLeft: 16;
paddingRight: 16;
}
.chatOptionsLabel {
fontSize: 12;
color: #000000;
textRollOverColor: #000000;
textSelectedColor: #000000;
fontFamily: Arial;
}

View File

@ -75,6 +75,7 @@ bbb.webrtcWarning.failedError.1006 = Error 1006: Call timed out
bbb.webrtcWarning.failedError.1007 = Error 1007: ICE negotiation failed
bbb.webrtcWarning.failedError.1008 = Error 1008: Transfer failed
bbb.webrtcWarning.failedError.1009 = Error 1009: Could not fetch STUN/TURN server information
bbb.webrtcWarning.failedError.1010 = Error 1010: ICE negotiation timeout
bbb.webrtcWarning.failedError.unknown = Error {0}: Unknown error code
bbb.webrtcWarning.failedError.mediamissing = Could not get your microphone for a WebRTC call
bbb.webrtcWarning.failedError.endedunexpectedly = The WebRTC echo test ended unexpectedly

View File

@ -1,5 +1,5 @@
var userID, callerIdName, conferenceVoiceBridge, userAgent=null, userMicMedia, userWebcamMedia, currentSession=null, callTimeout, callActive, callICEConnected, callFailCounter, callPurposefullyEnded, uaConnected, transferTimeout;
var userID, callerIdName, conferenceVoiceBridge, userAgent=null, userMicMedia, userWebcamMedia, currentSession=null, callTimeout, callActive, callICEConnected, iceConnectedTimeout, callFailCounter, callPurposefullyEnded, uaConnected, transferTimeout;
var inEchoTest = true;
function webRTCCallback(message) {
@ -419,6 +419,17 @@ function make_call(username, voiceBridge, server, callback, recall, isListenOnly
callback({'status':'started'});
} else {
callback({'status':'waitingforice'});
console.log('Waiting for ICE negotiation');
iceConnectedTimeout = setTimeout(function() {
console.log('60 seconds without ICE finishing');
callback({'status':'failed', 'errorcode': 1010}); // Failure on call
currentSession = null;
if (userAgent != null) {
var userAgentTemp = userAgent;
userAgent = null;
userAgentTemp.stop();
}
}, 60000);
}
clearTimeout(callTimeout);
});
@ -426,6 +437,7 @@ function make_call(username, voiceBridge, server, callback, recall, isListenOnly
console.log('received ice negotiation failed');
callback({'status':'failed', 'errorcode': 1007}); // Failure on call
currentSession = null;
clearTimeout(iceConnectedTimeout);
if (userAgent != null) {
var userAgentTemp = userAgent;
userAgent = null;
@ -441,6 +453,7 @@ function make_call(username, voiceBridge, server, callback, recall, isListenOnly
console.log('Received ICE status changed to connected');
if (callICEConnected === false) {
callICEConnected = true;
clearTimeout(iceConnectedTimeout);
if (callActive === true) {
callback({'status':'started'});
}
@ -452,6 +465,7 @@ function make_call(username, voiceBridge, server, callback, recall, isListenOnly
console.log('Received ICE status changed to completed');
if (callICEConnected === false) {
callICEConnected = true;
clearTimeout(iceConnectedTimeout);
if (callActive === true) {
callback({'status':'started'});
}

View File

@ -21,7 +21,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:mate="http://mate.asfusion.com/"
xmlns:common="org.bigbluebutton.common.*"
width="600" height="380"
width="600" height="390"
creationComplete="onCreationComplete()"
styleName="micSettingsWindowStyle"
showCloseButton="false"

View File

@ -457,7 +457,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
var chromeBrowser:ChromeMicPermissionImage = PopUpManager.createPopUp(mdiCanvas, ChromeMicPermissionImage, true) as ChromeMicPermissionImage;
chromeBrowser.addEventListener(FlexEvent.CREATION_COMPLETE, function(e:Event):void {
chromeBrowser.x = 20;
chromeBrowser.y = 80;
chromeBrowser.y = 130;
});
}
}

View File

@ -0,0 +1,15 @@
package org.bigbluebutton.modules.chat.events {
import flash.events.Event;
public class ChatNoiseEnabledEvent extends Event {
public static const CHAT_NOISE_CHANGE_EVENT:String = "chat noise change event";
public var enabled:Boolean = false;
public function ChatNoiseEnabledEvent(enabled:Boolean) {
super(CHAT_NOISE_CHANGE_EVENT, true);
this.enabled = enabled;
}
}
}

View File

@ -43,6 +43,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
import org.bigbluebutton.core.managers.UserManager;
import org.bigbluebutton.main.model.users.BBBUser;
import org.bigbluebutton.main.model.users.Conference;
import org.bigbluebutton.modules.chat.events.ChatNoiseEnabledEvent;
import org.bigbluebutton.modules.chat.events.ChatOptionsEvent;
import org.bigbluebutton.modules.chat.model.ChatOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -63,6 +64,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} else {
LOGGER.debug("fontSize in config.xml not found: {0}", [chatOptions.fontSize]);
}
chatNoiseCheckBox.visible = Accessibility.active;
}
public function accessibleClick(event:KeyboardEvent):void{
@ -78,6 +80,11 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
dispatchEvent(e);
}
private function changeChatNoise():void {
LOGGER.debug("changing chat noise, active=" + chatNoiseCheckBox.selected);
dispatchEvent(new ChatNoiseEnabledEvent(chatNoiseCheckBox.selected));
}
protected function openPrivateChat(event:Event):void{
if (usersList.selectedIndex == -1) return;
@ -117,23 +124,21 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
]]>
</mx:Script>
<common:TabIndexer id="tabIndexer" startIndex="1" tabIndices="{[usersList, cmbFontSize]}"/>
<mx:HBox width="100%" height="100%">
<mx:VBox height="100%" width="50%" enabled="true">
<mx:Label id="lblSelect" text="{ResourceUtil.getInstance().getString('bbb.chat.privateChatSelect')}" visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"/>
<mx:List id="usersList" height="100%" width="100%" dataProvider="{users}" dragEnabled="false"
visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"
itemRenderer="org.bigbluebutton.modules.chat.views.UserRenderer"
itemClick="openPrivateChat(event)" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.usersList.toolTip')}"/>
<mx:VBox id="optionsBox" height="100%" width="50%" >
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.chat.chatOptions')}" />
<mx:HBox width="100%">
<mx:Label text="{ResourceUtil.getInstance().getString('bbb.chat.fontSize')}" />
<mx:ComboBox width="60" id="cmbFontSize" dataProvider="{fontSizes}" change="changeFontSize()"
selectedIndex="1" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmbFontSize.toolTip')}" />
</mx:HBox>
</mx:VBox>
</mx:VBox>
</mx:HBox>
<common:TabIndexer id="tabIndexer" startIndex="1" tabIndices="{[usersList, cmbFontSize, chatNoiseCheckBox]}"/>
<mx:Label id="lblSelect" styleName="chatOptionsLabel"
text="{ResourceUtil.getInstance().getString('bbb.chat.privateChatSelect')}"
visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"/>
<mx:List id="usersList" height="50%" width="50%" dataProvider="{users}" dragEnabled="false"
visible="{chatOptions.privateEnabled}" includeInLayout="{chatOptions.privateEnabled}"
itemRenderer="org.bigbluebutton.modules.chat.views.UserRenderer"
itemClick="openPrivateChat(event)" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.usersList.toolTip')}"/>
<mx:Label styleName="chatOptionsLabel" text="{ResourceUtil.getInstance().getString('bbb.chat.chatOptions')}" />
<mx:HBox width="100%">
<mx:Label styleName="chatOptionsLabel" text="{ResourceUtil.getInstance().getString('bbb.chat.fontSize')}" />
<mx:ComboBox width="60" id="cmbFontSize" dataProvider="{fontSizes}" change="changeFontSize()"
selectedIndex="1" toolTip="{ResourceUtil.getInstance().getString('bbb.chat.cmbFontSize.toolTip')}" />
</mx:HBox>
<mx:CheckBox id="chatNoiseCheckBox" label="Audible Chat Notification" labelPlacement="left"
selected="true" change="changeChatNoise()" styleName="chatOptionsLabel" />
</mx:VBox>

View File

@ -35,26 +35,27 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import flash.accessibility.Accessibility;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.media.Sound;
import mx.controls.Button;
import flexlib.controls.tabBarClasses.SuperTab;
import flexlib.events.SuperTabEvent;
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.modules.chat.events.PrivateChatMessageEvent;
import org.bigbluebutton.modules.chat.events.PublicChatMessageEvent;
import org.bigbluebutton.modules.chat.model.ChatOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
import com.asfusion.mate.events.Dispatcher;
import flash.accessibility.Accessibility;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.media.Sound;
import flexlib.controls.tabBarClasses.SuperTab;
import flexlib.events.SuperTabEvent;
import mx.controls.Button;
import org.bigbluebutton.core.EventConstants;
import org.bigbluebutton.core.UsersUtil;
import org.bigbluebutton.core.events.CoreEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.modules.chat.events.ChatNoiseEnabledEvent;
import org.bigbluebutton.modules.chat.events.PrivateChatMessageEvent;
import org.bigbluebutton.modules.chat.events.PublicChatMessageEvent;
import org.bigbluebutton.modules.chat.model.ChatOptions;
import org.bigbluebutton.util.i18n.ResourceUtil;
private static const PUBLIC_CHAT_USERID:String = 'public_chat_userid';
private var PUBLIC_CHAT_USERNAME:String = ResourceUtil.getInstance().getString("bbb.chat.publicChatUsername");
@ -69,7 +70,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
private static const PUBLIC_TAB_NEW:String = ResourceUtil.getInstance().getString("bbb.accessibility.chat.chatView.publicTabNew");
private var publicWaiting:Boolean = false;
private var publicFocus:Boolean = false;
private var noticeLabel:String;
private var noticeLabel:String;
private var chatNoiseEnabled:Boolean = true;
[Embed(source="../sounds/notice.mp3")]
private var noticeSoundClass:Class;
@ -85,19 +87,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
}
private function onCreationComplete():void{
private function onCreationComplete():void{
openChatBoxFor(PUBLIC_CHAT_USERID, true);
makePublicChatUncloseable();
if (chatOptions.privateEnabled) {
createAddTabBox();
makeAddPrivateChatUncloseable();
}
makePublicChatUncloseable();
if (chatOptions.privateEnabled) {
createAddTabBox();
makeAddPrivateChatUncloseable();
}
ResourceUtil.getInstance().addEventListener(Event.CHANGE, localeChanged); // Listen for locale changing
addEventListener(SuperTabEvent.TAB_CLOSE, onUserClosedTab);
addEventListener(ChatNoiseEnabledEvent.CHAT_NOISE_CHANGE_EVENT, onChatNoiseChangeEvent);
systemManager.stage.addEventListener(Event.MOUSE_LEAVE, mouseLeave);
systemManager.stage.addEventListener(Event.ACTIVATE, activate);
systemManager.stage.addEventListener(Event.DEACTIVATE, deactivate);
@ -293,9 +296,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
// Activates an audio alert for screen-reader users on public message reception
private function publicNotification():void {
publicWaiting = true;
if (Accessibility.active){
noticeSound.play();
}
playSound();
chatTabs.getChildByName(PUBLIC_CHAT_USERID).addEventListener(FocusEvent.FOCUS_IN, publicChatFocus);
chatTabs.getChildByName(PUBLIC_CHAT_USERID).addEventListener(FocusEvent.FOCUS_OUT, publicChatUnfocus);
}
@ -303,12 +304,20 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
// Activates an audio alert for screen-reader users on private message reception
private function privateNotification(event:PrivateChatMessageEvent):void{
if (! UsersUtil.isMe(event.message.fromUserID)) {
if (Accessibility.active){
noticeSound.play();
}
playSound();
}
}
private function playSound():void {
if (Accessibility.active && chatNoiseEnabled){
noticeSound.play();
}
}
private function onChatNoiseChangeEvent(e:ChatNoiseEnabledEvent):void {
chatNoiseEnabled = e.enabled;
}
public function publicChatFocus(event:FocusEvent):void{
publicFocus = true;
publicWaiting = false;

View File

@ -798,7 +798,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
mouseUp="mouseDown = false" verticalScrollPolicy="off" horizontalScrollPolicy="off"/>
<mx:ControlBar id="presCtrlBar" name="presCtrlBar" width="100%" verticalAlign="middle" styleName="presentationWindowControlsStyle"
paddingTop="2" paddingBottom="2">
<mx:HBox id="presenterControls" width="100%" height="100%" horizontalAlign="center">
<mx:HBox id="presenterControls" width="100%" height="100%" visible="false" includeInLayout="false" horizontalAlign="center">
<mx:Button id="uploadPres" visible="false" height="30" styleName="presentationUploadButtonStyle"
toolTip="{ResourceUtil.getInstance().getString('bbb.presentation.uploadPresBtn.toolTip')}"
click="onUploadButtonClicked()"/>
@ -829,6 +829,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
<!-- This spacer is to prevent the whiteboard toolbar from overlapping the fit-ot-page button -->
<mx:Spacer width="30" height="30" id="spacer4"/>
</mx:HBox>
<mx:HBox id="pollVoteBox" width="100%" height="100%" horizontalAlign="center" />
<mx:HBox id="pollVoteBox" width="100%" height="100%" visible="false" includeInLayout="false" horizontalAlign="center" />
</mx:ControlBar>
</pres:CustomMdiWindow>