Merge pull request #592 from r-b-g-b/master

Bug in video trial when video is preloaded
This commit is contained in:
Josh de Leeuw 2019-01-31 22:02:49 -05:00 committed by GitHub
commit 219aed23b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,8 +99,8 @@ jsPsych.plugins.video = (function() {
var video_preload_blob = jsPsych.pluginAPI.getVideoBuffer(trial.sources[0]); var video_preload_blob = jsPsych.pluginAPI.getVideoBuffer(trial.sources[0]);
if(!video_preload_blob) { if(!video_preload_blob) {
for(var i=0; i<sources.length; i++){ for(var i=0; i<trial.sources.length; i++){
var file_name = sources[i]; var file_name = trial.sources[i];
if(file_name.indexOf('?') > -1){ if(file_name.indexOf('?') > -1){
file_name = file_name.substring(0, file_name.indexOf('?')); file_name = file_name.substring(0, file_name.indexOf('?'));
} }