Skip to content

Commit 2829d33

Browse files
committed
Merge branch 'wsc' of github.com:flashphoner/flashphoner_client into wsc
2 parents 462f5da + 43c71b7 commit 2829d33

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

client/client/src/js/ws/SoundControl.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ var SoundControl = function () {
1515
//Init sounds
1616
me.registerSound = me.initSound(flashphonerLoader.registerSound, false, "auto");
1717
me.ringSound = me.initSound(flashphonerLoader.ringSound, true, "none");
18-
me.busySound = me.initSound(flashphonerLoader.busySound,false, "none");
19-
me.finishSound = me.initSound(flashphonerLoader.finishSound,false, "none");
18+
me.busySound = me.initSound(flashphonerLoader.busySound, false, "none");
19+
me.finishSound = me.initSound(flashphonerLoader.finishSound, false, "none");
2020
};
2121

2222
SoundControl.prototype = {
@@ -63,9 +63,11 @@ SoundControl.prototype = {
6363
stopSound: function (soundName) {
6464
switch (soundName) {
6565
case "RING":
66-
me.ringSound.pause();
67-
me.ringSound.currentTime = 0;
68-
break
66+
if (!me.ringSound.paused) {
67+
me.ringSound.pause();
68+
me.ringSound.currentTime = 0;
69+
}
70+
break;
6971
default:
7072
console.error("Do not know what to stop on " + soundName);
7173

0 commit comments

Comments
 (0)