How do browsers calculate frame rate (fps) for HTML5 <video> for accurate frame-seeking? How do browsers calculate frame rate (fps) for HTML5 <video> for accurate frame-seeking? google-chrome google-chrome

How do browsers calculate frame rate (fps) for HTML5 <video> for accurate frame-seeking?


The framerate of a video isn't calculated, it's stored as part of the video's metadata. There's just a field in the video's header that says how many frames per second (or possibly the amount of time each frame is shown). It's the same way the browser knows the video's resolution.