Hello,
I'm trying to get a timestamp when a participant starts watching a video. I'm using Vimeo to upload my videos and embed them in the survey. For some reason, the function jQuery("video").on('play', function() does not run when the video is played. Maybe it is somehow related to using Vimeo?
I'm using the following code:
Qualtrics.SurveyEngine.addOnReady(function()
{
var s='';
alert(Date.now())
jQuery("video").on('play', function() {
alert(Date.now())
if(s==''){
s= Date.now();
Qualtrics.SurveyEngine.setEmbeddedData( 'Vid1PlayTime', s);
}
});
});
Solved
jQuery("video").on('play', function() does not run when video is played
Best answer by ahmedA
The on play method works for HTML media elements. The vimeo api exposes other methods, read the docs.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
