A solution for this is to put this in Each frame:
if ((t > 5)) {
$('iframe').each(function(index) {
$('#iframe-o').remove();
});
continueRoutine = false;
}
Implementing this suggestion:
And adding a jquery to end the movie. This is needed because I removed the ‘Continue’ button in the html.