Chromium won't play audio created in an inactive tab until the tab has been focused.
This commit is contained in:
parent
3151b75400
commit
7c893c4734
@ -2,6 +2,8 @@ ThreadUpdater =
|
|||||||
init: ->
|
init: ->
|
||||||
return if g.VIEW isnt 'thread' or !Conf['Thread Updater']
|
return if g.VIEW isnt 'thread' or !Conf['Thread Updater']
|
||||||
|
|
||||||
|
@audio = $.el 'audio', src: ThreadUpdater.beep
|
||||||
|
|
||||||
if Conf['Updater and Stats in Header']
|
if Conf['Updater and Stats in Header']
|
||||||
@dialog = sc = $.el 'span',
|
@dialog = sc = $.el 'span',
|
||||||
id: 'updater'
|
id: 'updater'
|
||||||
@ -91,7 +93,6 @@ ThreadUpdater =
|
|||||||
beep: 'data:audio/wav;base64,<%= grunt.file.read("src/Monitoring/beep.wav", {encoding: "base64"}) %>'
|
beep: 'data:audio/wav;base64,<%= grunt.file.read("src/Monitoring/beep.wav", {encoding: "base64"}) %>'
|
||||||
|
|
||||||
playBeep: ->
|
playBeep: ->
|
||||||
ThreadUpdater.audio or= $.el 'audio', src: ThreadUpdater.beep
|
|
||||||
{audio} = ThreadUpdater
|
{audio} = ThreadUpdater
|
||||||
if audio.paused
|
if audio.paused
|
||||||
audio.play()
|
audio.play()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user