mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-13 00:58: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){
|
function load_audio_file_html5audio(source, count){
|
||||||
count = count || 1;
|
count = count || 1;
|
||||||
var audio = new Audio();
|
var audio = new Audio();
|
||||||
audio.addEventListener('canplaythrough', function handleCanPlayThrough(){
|
audio.addEventListener('canplaythrough', function(){
|
||||||
audio_buffers[source] = audio;
|
audio_buffers[source] = audio;
|
||||||
n_loaded++;
|
n_loaded++;
|
||||||
loadfn(n_loaded);
|
loadfn(n_loaded);
|
||||||
if(n_loaded == files.length){
|
if(n_loaded == files.length){
|
||||||
finishfn();
|
finishfn();
|
||||||
}
|
}
|
||||||
this.removeEventListener('canplaythrough', handleCanPlayThrough);
|
|
||||||
});
|
});
|
||||||
audio.addEventListener('onerror', function(){
|
audio.addEventListener('onerror', function(){
|
||||||
if(count < jsPsych.initSettings().max_preload_attempts){
|
if(count < jsPsych.initSettings().max_preload_attempts){
|
||||||
|
Loading…
Reference in New Issue
Block a user