html-canvas-video-player icon indicating copy to clipboard operation
html-canvas-video-player copied to clipboard

CPU and FPS

Open talltyler opened this issue 9 years ago • 1 comments

This library eats up CPU and isn't able to keep up with the frame rate of my browser (Chrome, MacBook Pro).

I addressed these issues in a fork for myself, mostly by rearranging how the requestAnimation loop relates to the timeupdate event and and cutting out events like canplay from firing every frame.

While working on this I also cut out all of the features that I didn't need (sorry) which is why I didn't make a formal PR but I wanted to share the code incase it helps anyone.

https://github.com/talltyler/html-canvas-video-player/blob/gh-pages/js/canvas-video-player.js

talltyler avatar Sep 30 '16 20:09 talltyler

Awesome, I will take a look and try to merge it to this repo as well. Thanks!

Stanko avatar Sep 30 '16 20:09 Stanko