Fix sound notification in Internet Explorer (use mp3 file for IE and

other browsers which support audio/mp3 files)
pull/125/merge
Aleksander Machniak 11 years ago
parent fed081229f
commit bba13c33a0

@ -3,7 +3,7 @@
"type": "roundcube-plugin",
"description": "Supports three methods of notification: 1. Basic - focus browser window and change favicon 2. Sound - play wav file 3. Desktop - display desktop notification (using webkitNotifications feature, supported by Chrome and Firefox with 'HTML5 Notifications' plugin).",
"license": "GNU GPLv3+",
"version": "0.6",
"version": "0.7",
"authors": [
{
"name": "Aleksander Machniak",

@ -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 {

@ -19,9 +19,9 @@
<email>alec@alec.pl</email>
<active>yes</active>
</lead>
<date>2013-09-12</date>
<date>2013-10-04</date>
<version>
<release>0.6</release>
<release>0.7</release>
<api>0.5</api>
</version>
<stability>

Loading…
Cancel
Save