Include no_sleep.js only on web builds - #142
Conversation
DublikuntMux
left a comment
There was a problem hiding this comment.
After some future investigation on web build i find that:
Flutter currently supports safari 15.6 and newer, while safari added native Screen Wake Lock support in version 16.4.
This leaves safari 15.6-16.3 within flutter supported browser range but without native Screen Wake Lock support. The video fallback is therefore still required to preserve compatibility with flutter current minimum browser versions.
Previously all browsers downloaded and parsed fallback js and its embedded video data, including browsers that support the native api.
So i propose:
Legacy video based fallback is load only in browsers that not expose navigator.wakeLock. Fallback media is also move out of js source into separate assets, avoiding the embedded base64 payload in modern browsers.
DublikuntMux
left a comment
There was a problem hiding this comment.
Also in future when flutter drop support of old safari remove this:
- no_sleep.js
- fallback videos
- js loader
- fallback js interop layer
|
@DublikuntMux the latest changes made to your PR are completely separate from the original version. Please create a separate PR with those changes instead of polluting this one. Thanks. |
Please return this PR back to its original state, where it focused on one issue, instead of trying to slip non-pertinent changes into it. Thanks.
Description
Include no_sleep.js only on web platform build as it realy need only for it.