PennController for IBEX › Forums › Support › video not shoing up › Reply To: video not shoing up
September 4, 2022 at 5:46 am
#8388
multanip
Participant
OK I have a new script. the two videos and the picture with audio is working but first and last video don’t finish playing before it moves on.
https://farm.pcibex.net/r/OFgwcs/experiment.html?test=true
The screeen it will take a 1 minute to load is still showing up.
PennController.ResetPrefix(null) // Keep this here PennController.DebugOff() //The experiment is design for Eng based study //CREDIT: The credit for the picture and Audio to Psychling lab and Dr. Dato for all the files //Credit: the script was learned and borrowed from PCIbex website PreloadZip("https://psyli-lab.research-zas.de/Eye-tracking_eng_Priya/Eyetracker_eng_resources/Audio.zip") PreloadZip("https://psyli-lab.research-zas.de/Eye-tracking_eng_Priya/Eyetracker_eng_resources/Neutral.zip") PreloadZip("https://psyli-lab.research-zas.de/Eye-tracking_eng_Priya/Eyetracker_eng_resources/Videos.zip") // EyeTrackerURL("https://psyli-lab.research-zas.de/Eye-tracking_eng_Priya/Eyetracker_eng_results/Eng_eyetracker_priya.php") // var showProgressBar = false; // Sequence("Preload","Counter",randomize("eyetracking"),"Exit") // CheckPreloaded ("Preload") // SetCounter("Counter", "inc", 1); // Template("Video_EyeTracking_english.csv", row=> // all newText commands will automatically print the text centered when run newTrial("eyetracking", defaultImage.center().print(), // all newImage commands will automatically print the image centered when run defaultImage.size(950,650).print(), defaultVideo.center().print(), // all newImage commands will automatically print the image centered when run defaultVideo.size(1000,620).print()//, .print("center at 50vw", "center at 50vh") //defaultText.center().print() , newEyeTracker("tracker",1).callback( function (x,y) { if (this != getEyeTracker("tracker")._element.elements[0]) return; getEyeTracker("tracker")._element.counts._Xs.push(x); getEyeTracker("tracker")._element.counts._Ys.push(y); }) , newFunction(()=>{ getEyeTracker("tracker")._element.counts._Xs = []; getEyeTracker("tracker")._element.counts._Ys = []; }).call() , getEyeTracker("tracker") .calibrate(5) // Make sure that the tracker is still calibrated .log() // log the calibration scores , newTimer("pre-trial", 400).start().wait() , newVideo("image1", row.main_picture_video),// the first image is set in design.csv getVideo("image1").print().play(), newTimer("displayTime", 3000).start().wait(), //.start().wait() // wait 400ms before moving on to the next image getVideo("image1").remove() .log() , newTimer("trial1", 400).start().wait() , newImage("video2", row.middle_picture_s_video),// we always use middleImage.png as the middle image newAudio("audio", row.wav_file).play(), // the audio file is set in design.csv getAudio("audio").wait("first"), // wait until the Audio element has finished playing back newTimer("displayTime", 400).start().wait(), //.start(),//.wait() //wait 400ms befoere moving to the last iamge getImage("video2").remove() .log() , newTimer("trial1", 400).start().wait() , newVideo("image3", row.end_picture_video), getVideo("image3").print().play(),// the third image is set in design.csv, newTimer("displayTime", 3000).start().wait(), getVideo("image3").remove() .log() ) .noHeader() .log("group" ,row.group) .log("Condition" ,row.Condition) .log("ID_No" ,row.ID_No) .log("main_video" ,row.main_picture_video) .log("end_video" ,row.end_picture_video) .log("Neutral_picture_video" ,row.middle_picture_s_video) .log("ViewportWidth" ,window.innerWidth ) // Screensize: width .log("ViewportHeight" ,window.innerHeight ) // Screensize: Height ) // SendResults("Send"); //Exit newTrial("Exit", exitFullscreen() , newText("Final","Thank you. This is the end of the experiment, you can now close this window. Thank you!") , newCanvas("myCanvas", "60vw" , "60vh") .settings.add(0,0, getText("Final")) .css("font-size", "1.1em") .print("center at 50%", "middle at 50%") , newButton("waitforever") .wait() // Not printed: wait on this page forever )