File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export const Sounds = {
2727 isInCall : false ,
2828 lastPlayedJoin : 0 ,
2929 lastPlayedLeave : 0 ,
30+ playedWaiting : 0 ,
3031 backgroundAudio : null ,
3132 backgroundInterval : null ,
3233
@@ -52,13 +53,20 @@ export const Sounds = {
5253 console . debug ( 'Playing waiting sound' )
5354 this . backgroundAudio . play ( )
5455
56+ this . playedWaiting = 0
5557 this . backgroundInterval = setInterval ( ( ) => {
5658 if ( ! store . getters . playSounds ) {
5759 return
5860 }
5961
6062 console . debug ( 'Playing waiting sound' )
6163 this . backgroundAudio . play ( )
64+ this . playedWaiting ++
65+
66+ if ( this . playedWaiting >= 3 ) {
67+ // Played 3 times, so we stop now.
68+ clearInterval ( this . backgroundInterval )
69+ }
6270 } , 15000 )
6371 } ,
6472
@@ -91,7 +99,7 @@ export const Sounds = {
9199 }
92100
93101 if ( playWaitingSound ) {
94- this . playWaiting ( )
102+ await this . playWaiting ( )
95103 } else {
96104 this . _playSounceOnce ( 'LibremEmailNotification.ogg' )
97105 }
You can’t perform that action at this time.
0 commit comments