disable streaming download on mobile firefox
This commit is contained in:
parent
ff9be6a213
commit
924f5dc682
@ -76,8 +76,8 @@ async function polyfillStreams() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async function getCapabilities() {
|
export default async function getCapabilities() {
|
||||||
const serviceWorker =
|
const browser = browserName();
|
||||||
'serviceWorker' in navigator && browserName() !== 'edge';
|
const serviceWorker = 'serviceWorker' in navigator && browser !== 'edge';
|
||||||
let crypto = await checkCrypto();
|
let crypto = await checkCrypto();
|
||||||
const nativeStreams = checkStreams();
|
const nativeStreams = checkStreams();
|
||||||
let polyStreams = false;
|
let polyStreams = false;
|
||||||
@ -97,13 +97,16 @@ export default async function getCapabilities() {
|
|||||||
window.matchMedia('(display-mode: standalone)').matches ||
|
window.matchMedia('(display-mode: standalone)').matches ||
|
||||||
navigator.standalone;
|
navigator.standalone;
|
||||||
|
|
||||||
|
const mobileFirefox =
|
||||||
|
browser === 'firefox' && /mobile/i.test(navigator.userAgent);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
account,
|
account,
|
||||||
crypto,
|
crypto,
|
||||||
serviceWorker,
|
serviceWorker,
|
||||||
streamUpload: nativeStreams || polyStreams,
|
streamUpload: nativeStreams || polyStreams,
|
||||||
streamDownload:
|
streamDownload:
|
||||||
nativeStreams && serviceWorker && browserName() !== 'safari',
|
nativeStreams && serviceWorker && browser !== 'safari' && !mobileFirefox,
|
||||||
multifile: nativeStreams || polyStreams,
|
multifile: nativeStreams || polyStreams,
|
||||||
share,
|
share,
|
||||||
standalone
|
standalone
|
||||||
|
Loading…
Reference in New Issue
Block a user