Bug 11431: (QA followup) Allow https in sound URLs

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
Kyle Hall 2015-04-27 07:49:50 -04:00 committed by Tomas Cohen Arazi
parent 220ff161e9
commit b8dd899738

View file

@ -122,8 +122,7 @@ function confirmDelete(message) {
}
function playSound( sound ) {
// This is way faster than substring
if ( ! ( sound.charAt(4) == ':' && sound.charAt(5) == '/' && sound.charAt(6) == '/' ) ) {
if ( ! ( sound.indexOf('http://') == 0 || sound.indexOf('https://') == 0 ) {
sound = AUDIO_ALERT_PATH + sound;
}
document.getElementById("audio-alert").innerHTML = '<audio src="' + sound + '" autoplay="autoplay" autobuffer="autobuffer"></audio>';