开发者

Stop video after exiting fullscreen on Mobile Safari

Hey Guys, I've got a thumbnail on a webpage that when clicked, plays a video in fullscre开发者_开发技巧en 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


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:

http://developer.apple.com/library/safari/#samplecode/HTML5VideoEventFlow/Introduction/Intro.html%23//apple_ref/doc/uid/DTS40010085-Intro-DontLinkElementID_2

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜