最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How do I get a more precise current, video and start time with YouTube iframe? - Stack Overflow

programmeradmin3浏览0评论

At the moment my start time and end time for an embedded video is put in seconds. However, I know it's possible to be much more precise than this (when I go to my playlists in YouTube, I can edit the start and end times of each video, and YouTube lets me drag the player head around and displays milliseconds - although of course you can't move ms by ms).

My app needs precision, and both getCurrentTime and seekTo only take seconds as arguments. How does YouTube manage to be more precise? A 1/4 second precision would be fine enough for me.

At the moment my start time and end time for an embedded video is put in seconds. However, I know it's possible to be much more precise than this (when I go to my playlists in YouTube, I can edit the start and end times of each video, and YouTube lets me drag the player head around and displays milliseconds - although of course you can't move ms by ms).

My app needs precision, and both getCurrentTime and seekTo only take seconds as arguments. How does YouTube manage to be more precise? A 1/4 second precision would be fine enough for me.

Share Improve this question edited Mar 22, 2013 at 17:23 istepaniuk 4,2772 gold badges37 silver badges63 bronze badges asked Mar 22, 2013 at 17:15 user1011444user1011444 1,4092 gold badges17 silver badges25 bronze badges 1
  • Possible duplicate of Youtube API seekTo() in float seconds – rogerdpack Commented Oct 21, 2018 at 5:03
Add a ment  | 

1 Answer 1

Reset to default 6

You can specify fractions of seconds using a float number

I think this answer and this example may be useful

Youtube API seekTo() in float seconds

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论