This is an automated email from the ASF dual-hosted git repository.
pabloem pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 503adc0 [BEAM-13555] playground - quick fix for safari
new 304680d Merge pull request #16362 from [BEAM-13555] [Bugfix]
[Playground] change html renderer for safari to fix freezes
503adc0 is described below
commit 503adc0b3beadc59fc1a9c44e45f6a625339f3f6
Author: Aydar Farrakhov <[email protected]>
AuthorDate: Mon Dec 27 15:11:57 2021 +0300
[BEAM-13555] playground - quick fix for safari
---
playground/frontend/web/index.html | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/playground/frontend/web/index.html
b/playground/frontend/web/index.html
index da7225b74..3ed6f70 100644
--- a/playground/frontend/web/index.html
+++ b/playground/frontend/web/index.html
@@ -60,6 +60,20 @@
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
+
+<script type="text/javascript">
+ // The app is freezing on the Safari when using canvaskit, as a quick
workaround - enable
+ // html rendered for it
+ const { userAgent } = navigator
+ const isSafari = userAgent.indexOf('Safari') > -1 &&
userAgent.indexOf('Chrome') <= -1;
+ const useHtml = isSafari;
+ if(useHtml) {
+ window.flutterWebRenderer = 'html';
+ } else {
+ window.flutterWebRenderer = 'canvaskit';
+ }
+ console.log(`Using ${window.flutterWebRenderer} renderer`);
+ </script>
<script>
var serviceWorkerVersion = null;
var scriptLoaded = false;