summaryrefslogtreecommitdiff
path: root/plugins/newmail_notifier/newmail_notifier.js
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/newmail_notifier/newmail_notifier.js')
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js8
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 {