Fallback to non worker tfjs when on Safari (#193)
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 38s
All checks were successful
Build Dev PWA / Build-PWA (push) Successful in 38s
Safari's worker limitations mean that detection threads in the worker barely function. Until Apple quits being whiny jerks about PWAs, this workaround is required to bypass the message calls to the workers and use the old single threaded system when Safari is detected. Reviewed-on: #193
This commit is contained in:
@@ -9,7 +9,8 @@ const state = reactive({
|
||||
useExternal: 'optional',
|
||||
siteDemo: false,
|
||||
externalServerList: [],
|
||||
infoUrl: false
|
||||
infoUrl: false,
|
||||
safariBrowser: false
|
||||
})
|
||||
|
||||
const set = (config, confObj) => {
|
||||
@@ -21,6 +22,10 @@ const agree = () => {
|
||||
state.disclaimerAgreement = true
|
||||
}
|
||||
|
||||
const safariDetected = () => {
|
||||
state.safariBrowser = true
|
||||
}
|
||||
|
||||
const getServerList = () => {
|
||||
if (state.useExternal == 'required') {
|
||||
return state.externalServerList[0]
|
||||
@@ -50,8 +55,10 @@ export default () => ({
|
||||
getVersion: computed(() => state.version),
|
||||
getIconSet: computed(() => state.regionIconSet),
|
||||
getInfoUrl: computed(() => state.infoUrl),
|
||||
isSafari: computed(() => state.safariBrowser),
|
||||
set,
|
||||
agree,
|
||||
safariDetected,
|
||||
getServerList,
|
||||
toggleFullscreen
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user