Play online sound only once at time.
This commit is contained in:
parent
84581e372d
commit
3713014079
1 changed files with 3 additions and 0 deletions
|
@ -19,8 +19,11 @@ class App.OnlineNotification extends App.Model
|
|||
preferences = App.Session.get('preferences')
|
||||
return if !preferences
|
||||
return if !App.OnlineNotification.soundEnabled()
|
||||
sound = App.Config.get('latest_online_notification_sond')
|
||||
return if sound && !sound.ended
|
||||
file = App.OnlineNotification.soundFile()
|
||||
sound = new Audio("assets/sounds/#{file}")
|
||||
App.Config.set('latest_online_notification_sond', sound)
|
||||
sound.play()
|
||||
|
||||
###
|
||||
|
|
Loading…
Reference in a new issue