Video-Fun2
hh
hh at hyperhh.de
Tue Jan 1 16:45:22 EST 2019
> Peter B. wrote:
> It looks great!
> After awhile (10-15 minutes) it froze. Reloaded the page, then Safari had the
> message, “This page is using significant memory….”
Yes, I had this too. It's probably a caching problem of Safari. They do a lot of
caching, that's why they are the fastest browser with our LC-standalones. Firefox
complains with HTML5 standalones about the memory usage already when loading it.
On the other hand, all that is done every 33 millisecs (while a video is playing):
1. One frame is taken from the video and drawn into an offset canvas.
2. (Optional) The imageData of that canvas is manipulated with an image filter.
3. The optionally manipulated imageData is drawn into a second offset canvas.
4. The imageData of that second canvas is base64Encoded and sent to the standalone.
5. The standalone displays the base64Decoded imagedata in an (rotated) image object.
There is one remedy: If the time per frame goes in average over 66 ms then one
could zoom out the image (slider "zoom").
There would be less stress for your CPU/GPU if we would omit steps 4 and 5, but
then we have only the controls in LiveCode and we could also use a JavaScript
package only. As soon as there is one that can also do what LiveCode can do ...
More information about the use-livecode
mailing list