mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 16:48:12 +00:00
revert fix for html5 audio progress bar - now in audio-bug branch
This commit is contained in:
parent
a63a749e3f
commit
d6f3d79d04
@ -2328,14 +2328,13 @@ jsPsych.pluginAPI = (function() {
|
||||
function load_audio_file_html5audio(source, count){
|
||||
count = count || 1;
|
||||
var audio = new Audio();
|
||||
audio.addEventListener('canplaythrough', function handleCanPlayThrough(){
|
||||
audio.addEventListener('canplaythrough', function(){
|
||||
audio_buffers[source] = audio;
|
||||
n_loaded++;
|
||||
loadfn(n_loaded);
|
||||
if(n_loaded == files.length){
|
||||
finishfn();
|
||||
}
|
||||
this.removeEventListener('canplaythrough', handleCanPlayThrough);
|
||||
});
|
||||
audio.addEventListener('onerror', function(){
|
||||
if(count < jsPsych.initSettings().max_preload_attempts){
|
||||
|
Loading…
Reference in New Issue
Block a user