Reputation: 14430
Hey Guys, I've got a thumbnail on a webpage that when clicked, plays a video in fullscreen using the webkitEnterFullscreen() method.
But I need the video to stop playing once the users touches the "Done" button and leaves fullscreen mode.
Is there an event that fires once the the user has exited fullscreen?
Thanks, Drew
Upvotes: 2
Views: 4402
Reputation: 14430
I had an email from an Apple developer which answered this question for me.
The two events are webkitbeginfullscreen and webkitendfullscreen. This piece of sample code is really useful for seeing the order that events fire (it logs a message to the page whenever an event is emitted), and includes these two events:
Upvotes: 8