开发者

Closing iPhone Video Player using Javascript

开发者 https://www.devze.com 2023-01-05 21:36 出处:网络
I have a web page with several html5tags, offering users a number of posters/thumbnails for videos they can choose to play. When开发者_运维百科 a user touches one of the them the iPhone video player o

I have a web page with several html5 tags, offering users a number of posters/thumbnails for videos they can choose to play. When开发者_运维百科 a user touches one of the them the iPhone video player opens and the video plays. I want to be able to automatically close the video player after the video has finished and return the user to the thumbnails.

I have set the event listener for the "ended" event and I can detect that the video has finished, but I can't figure out how to close the video player and return to the thumbnails. It just waits for the user to touch the "done" button. Is there any way of doing this in Javascript??


jQuery -

$('video').get(0).webkitExitFullscreen();

Uncertain what iOS version this was supported. See The correct method is webkitExitFullscreen. See https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode for full support

0

精彩评论

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