mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
UrlPlayer: clearing the hash in the URL for Safari
This commit is contained in:
parent
ef8aca3476
commit
e5c96709d8
1 changed files with 7 additions and 1 deletions
|
|
@ -17,9 +17,15 @@ const prepareVM = ({ url, setStatus, setParts }) => {
|
||||||
return args
|
return args
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const cleanUrl = url => _ =>
|
||||||
|
url.startsWith('blob:')
|
||||||
|
? url.replace(/#(.*)$/g, '')
|
||||||
|
: url
|
||||||
|
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
.then(st('loading', 'Downloading file'))
|
.then(st('loading', 'Downloading file'))
|
||||||
.then(_ => fetch(url))
|
.then(cleanUrl(url))
|
||||||
|
.then(fetch)
|
||||||
.then(st('loading', 'Processing file'))
|
.then(st('loading', 'Processing file'))
|
||||||
.then(response => response.arrayBuffer())
|
.then(response => response.arrayBuffer())
|
||||||
.then(arrayBuffer => new Uint8Array(arrayBuffer))
|
.then(arrayBuffer => new Uint8Array(arrayBuffer))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue