mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
ui: sw: handle events for streamsaver
This commit is contained in:
1 parent
27bf54ed34
commit
e8b6459e01
3 files changed
+6
-8
No files matched your search
@@ -16,11 +16,7 @@ function onBeforeUnload(e) {
|
||||
}
|
||||
e.returnValue = '';
|
||||
}
|
||||
if (window.location.protocol === 'https:'
|
||||
|| window.location.protocol === 'chrome-extension:'
|
||||
|| window.location.hostname === 'localhost') {
|
||||
streamsaver.mitm = '/streamsaver/mitm.html';
|
||||
}
|
||||
streamsaver.mitm = `${window.isSecureContext ? '' : 'https://hydro.ac'}/streamsaver/mitm.html`;
|
||||
|
||||
const waitForWritableStream = window.WritableStream
|
||||
? Promise.resolve()
|
||||
|
||||
Reference in new issue
Block a user