diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as index 6203bd5f70..8cc7ad818f 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/managers/FlashCallManager.as @@ -3,6 +3,9 @@ import com.asfusion.mate.events.Dispatcher; import flash.external.ExternalInterface; + import flash.media.Sound; + import flash.media.SoundChannel; + import flash.media.SoundTransform; import org.as3commons.logging.api.ILogger; import org.as3commons.logging.api.getClassLogger; @@ -46,7 +49,7 @@ private static const CONNECTING_TO_LISTEN_ONLY_STREAM:String = "CONNECTING_TO_LISTEN_ONLY_STREAM"; private static const ON_LISTEN_ONLY_STREAM:String = "ON_LISTEN_ONLY_STREAM"; - private var state:String = INITED; + private var _state:String = INITED; private var options:PhoneOptions; private var echoTestDone:Boolean = false; @@ -61,6 +64,10 @@ private var usingFlash:Boolean = false; + [Embed(source="../sounds/LeftCall.mp3")] + private var noticeSoundClass:Class; + private var noticeSound:Sound = new noticeSoundClass() as Sound; + public function FlashCallManager() { micNames = Media.getMicrophoneNames(); connectionManager = new ConnectionManager(); @@ -75,6 +82,17 @@ connectionManager.setup(uid, UsersUtil.getMyUserID(), uname , UsersUtil.getInternalMeetingID(), options.uri); } + private function get state():String { + return _state; + } + + private function set state(s:String):void { + if (_state == IN_CONFERENCE && _state != s) { // when state changes from IN_CONFERENCE play sound + var tSC:SoundChannel = noticeSound.play(0, 0, new SoundTransform(0.25)); + } + _state = s; + } + private function isWebRTCSupported():Boolean { return (ExternalInterface.available && ExternalInterface.call("isWebRTCAvailable")); } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/models/WebRTCModel.as b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/models/WebRTCModel.as old mode 100644 new mode 100755 index 3affe99847..4a403477c4 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/models/WebRTCModel.as +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/models/WebRTCModel.as @@ -1,10 +1,18 @@ package org.bigbluebutton.modules.phone.models { + import flash.media.Sound; + import flash.media.SoundChannel; + import flash.media.SoundTransform; + public class WebRTCModel { private var _state:String = Constants.INITED; + [Embed(source="../sounds/LeftCall.mp3")] + private var noticeSoundClass:Class; + private var noticeSound:Sound = new noticeSoundClass() as Sound; + public function WebRTCModel() { } @@ -14,6 +22,9 @@ package org.bigbluebutton.modules.phone.models } public function set state(s:String):void { + if (_state == Constants.IN_CONFERENCE && _state != s) { // when state changes from IN_CONFERENCE play sound + var tSC:SoundChannel = noticeSound.play(0, 0, new SoundTransform(0.25)); + } _state = s; } diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/phone/sounds/LeftCall.mp3 b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/sounds/LeftCall.mp3 new file mode 100755 index 0000000000..9a64f01329 Binary files /dev/null and b/bigbluebutton-client/src/org/bigbluebutton/modules/phone/sounds/LeftCall.mp3 differ