Youtube API seekTo() in float seconds

强颜欢笑 提交于 2019-11-30 21:07:57

Yes, the API accepts seekTo time in float perfectly; it will advance to the closest keyframe before your float, whatever that may be. Here's a demonstration:

http://goo.gl/E4jzu

Seeking to a frame is a little trickier of a beast, as different videos have different fps rates. Since you can't get the fps via the API (unless there's a method I don't know?), it would be too difficult to try to write a wrapper that could convert the frame you want to seek to into a float. If they are your videos, though, and you know the fps rate, it would be pretty trivial.

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