From 7ec44d56d5c7ee09687b815348fb4b06728dfe8f Mon Sep 17 00:00:00 2001 From: thierrytiti Date: Sat, 25 Apr 2015 14:48:03 +0200 Subject: [PATCH] add sounds path --- converse.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/converse.js b/converse.js index 8b236bf78..1a117e09e 100644 --- a/converse.js +++ b/converse.js @@ -262,6 +262,7 @@ message_carbons: false, no_trimming: false, // Set to true for phantomjs tests (where browser apparently has no width) play_sounds: false, + play_sounds_path: '/sounds/', password: undefined, authentication: 'login', // Available values are "login", "prebind", "anonymous". prebind: false, // XXX: Deprecated, use "authentication" instead. @@ -367,11 +368,11 @@ this.playNotification = function () { var audio; if (converse.play_sounds && typeof Audio !== "undefined"){ - audio = new Audio("/sounds/msg_received.ogg"); + audio = new Audio(converse.play_sounds_path."msg_received.ogg"); if (audio.canPlayType('/audio/ogg')) { audio.play(); } else { - audio = new Audio("/sounds/msg_received.mp3"); + audio = new Audio(converse.play_sounds_path."msg_received.mp3"); audio.play(); } }