简体   繁体   中英

How to get FrameRate of the video on HTML5 Video element

I am developing a time-lapse video player using HTML5 Video element and is controlled by mouse (touch) events. The problem is that the videos which will be played are encoded at a different frame rate , not fixed like common 24 FPS. In native platforms such as iOS, there is a native API which provides video's frame rate. I am wondering if is there any similar API on HTML5 Media API. Without this information, I cannot play a video smoothly on my player.

Mozzila Developer Network does not list any methods for finding the framerate of a media element. However, there is an experimental method called seekToNextFrame which could be used to advance frame by frame. This is only supported by firefox behind a flag.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM