I am writing a simple application to search for html5 video in both directions by dragging the mouse. I also need to overlay material on top of the video, so I use html5 canvas. The video element remains hidden, I play the video and update the canvas image every 20 ms. This has no performance issues.
However, I want to search for videos when I drag the mouse. It turns out I will need to search for a video every 20 ms, which leads to volatile performance. Another hack I tried was to speed up the drag and drop of the main video when I drag and drop it. This is almost perfect performance and enough for my use, except that I cannot rewind and speed up the video.
My research says that the only way to rewind html5 video right now is to set the current time backward in the frame, but again I cannot afford to do this every 20 ms, or the video becomes choppy.
Is there any way around these restrictions? It would be enough if I could just play the video back at normal speed.
source
share