Closed philipbulley closed 7 years ago
I have same problem with YouTube. 'hd=1' has no effect in 'https://www.youtube.com/embed/UGPuEDyAsU8?hd=1&autoplay=1', but this works fine in Safari.
I can confirm that any movement or animations (including canvas) in this wrapper has a significantly lower frame rate than in the browser.
I'm not sure why it might have a lower frame rate than Safari. I suspect the WebView that's used in Safari is different from the one that is exposed for developers.
I generally get pretty good framerates on my 2014 MacBook Air for youtube videos though.
This may not be something we can do anything about. Closing this issue for now.
Just used this solution on another project that solved all performance issues with 2D canvas' in WebViews like this: https://stackoverflow.com/a/36363908
@round I tried the workaround of enabling accelerated canvas rendering to no avail.
I ran
defaults write net.liquidx.WebViewScreenSaver WebKitAccelerated2dCanvasEnabled -bool true
defaults write net.liquidx.WebViewScreenSaver WebKitAcceleratedDrawingEnabled -bool true
defaults write net.liquidx.WebViewScreenSaver WebKitCanvasUsesAcceleratedDrawing -bool true
in terminal as suggested by the workaround, then built the application and installed it. The website still rendered extremely slowly (<10 fps).
The website I am setting as my background uses requestAnimationFrame()
to draw on the canvas. I wonder why the suggested websites in the README render fine and mine doesn't.
I can't see the app set animationTimeInterval anywhere.
I read somewhere that the default is one second, which would explain why, e.g. http://foldoc.org/pub/js/clock.html (JavaScript canvas animation) runs smoothly in Safari but jerkily in webviewscreensaver.
Would setting this to a really low value (a) solve the problem and (b) be a good idea?
Anyone know why https://www.tumblr.com/tv has a good framerate in Safari, but suffers significantly when loaded into this screensaver?