My survey includes audio clips that I want the user to be able to play at most 3 times. | XM Community
Skip to main content

The only option I have seen so far is to restrict them to play it only once or to have autoplay. Any ideas on how to achieve this?

Nevermind!! Solved it...
Qualtrics.SurveyEngine.addOnReady(function()
{
/*Place your JavaScript here to run when the page is fully displayed*/
var counter=2;
jQuery('audio').on('ended', function() { 
if (counter==0){
jQuery(this).hide(); 
} else {counter--;}
});

});

--Added this in the add javascript option of the question.


Leave a Reply