Reply To: Video Primes

Home Forums Support Video Primes Reply To: Video Primes

#6395
Becky
Guest

Hi Joshua,

I’m working on an experiment that plays sound files (after they’ve been buffered) and moves automatically on when the sound ends. I embedded the sound in the question HTML with the HTML5 audio tag with an ID (e.g. id=”stim”). Then, in the question JavaScript, I got the element from the page using the ID:

var stimuli = document.getElementById("stim");

I dealt with the variable loading/buffering times by checking stimuli.readyState and setting the event handlers for ‘oncanplaythrough’ and ‘ended’. To get the trial to continue after the sound ends, the event handler for ‘ended’ contains ‘QRTE.proceed();’. However I haven’t tested the data logging with this solution yet – see my forum post here.

Anyway I think you could do something similar with video – see here for the HTML5 and JavaScript reference.

Becky