2

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?

0

1 Answer 1

5

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.

1
  • That worked perfect, thank you so much. I wish I could upvote this 30 times.
    – tfer77
    Commented Aug 22, 2013 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.