diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-10-04 18:27:32 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-10-04 18:27:32 +0200 |
commit | bba13c33a097ac35ef8a29ef255be3ac47858f78 (patch) | |
tree | 1fbc276a3eaf70fc980a91c9171dde70368d5de9 /plugins/newmail_notifier/newmail_notifier.js | |
parent | fed081229f81fdfe6d943b06abbcd22e59c555df (diff) |
Fix sound notification in Internet Explorer (use mp3 file for IE and
other browsers which support audio/mp3 files)
Diffstat (limited to 'plugins/newmail_notifier/newmail_notifier.js')
-rw-r--r-- | plugins/newmail_notifier/newmail_notifier.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js index 846bc94c3..2beacf650 100644 --- a/plugins/newmail_notifier/newmail_notifier.js +++ b/plugins/newmail_notifier/newmail_notifier.js @@ -71,7 +71,13 @@ function newmail_notifier_basic() // Sound notification function newmail_notifier_sound() { - var elem, src = 'plugins/newmail_notifier/sound.wav'; + var elem, src = 'plugins/newmail_notifier/sound', + plugin = navigator.mimeTypes ? navigator.mimeTypes['audio/mp3'] : {}; + + // Internet Explorer does not support wav files, + // support in other browsers depends on enabled plugins, + // so we use wav as a fallback + src += bw.ie || (plugin && plugin.enabledPlugin) ? '.mp3' : '.wav'; // HTML5 try { |