Issue #1 resolved

Loop doesn't work on remote wav files in Chrome browser

tarascv
created an issue

For quick test I modified function:

{{{

!javascript

html5.play = function (s) { setTimeout(function () { //var snd = new Audio('sounds/' + s + '.mp3'); //snd.play(); //TODO: detect which formats are supported, and use that. var soundPath = "http://www.soundjay.com/button/beep-1.wav"; var audioElement = document.createElement('audio');

        audioElement.setAttribute('src', soundPath);
        audioElement.setAttribute('id', 'aSound_' + s);
        audioElement.setAttribute('autobuffer', 'true');

        audioElement.setAttribute('autoplay', 'true');
        audioElement.setAttribute('loop', 'loop');
        audioElement.load()
        //audioElement.play();
        audioElement.addEventListener("load", function() {
            audioElement.play();
        }, true);
    }, 10);
};

}}}

Comments (4)

  1. Log in to comment