I have an html5 video that is intitally hidden then revealed and played with a custom play button. However, on the iphone, when the user clicks "Done" from the video viewing screen, the video remains visible. I'm pretty sure the "done" button is a pause function. Assuming this to be the case, is there a way is there a way I can hide the video on pause on mobile only?
1 Answer
I think you are looking for
$("video")[0].addEventListener("webkitendfullscreen", function () {
//hide video here
$(this).hide();
}, true);
The webkitendfullscreen event gets fired when the done button is pressed.
-
That worked perfect, thank you so much. I wish I could upvote this 30 times.– tfer77Commented Aug 22, 2013 at 18:36