In Safari for iPad, how can I get the current video position via Javascript?

◇◆丶佛笑我妖孽 提交于 2019-12-10 12:31:30

问题


When an embedded video is playing in an iPad browser, how can I retrieve the current hh:mm:ss position (and perhaps player state) in Javascript?


回答1:


If it is in a webpage, you can do

var vid = document.getElementById('videoid');
var time = vid.currentTime;

as seen in http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#htmlmediaelement



来源:https://stackoverflow.com/questions/6442552/in-safari-for-ipad-how-can-i-get-the-current-video-position-via-javascript

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!