mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 09:09:01 +00:00
Improve handling of x-origin duration fetching
This commit is contained in:
parent
c42b33dff7
commit
41862ffde6
1 changed files with 1 additions and 0 deletions
|
|
@ -232,6 +232,7 @@ export function fetchMediaDuration(url, id) {
|
|||
// TODO: Does this actually stop downloading the file once it's
|
||||
// got the duration?
|
||||
const audio = document.createElement("audio");
|
||||
audio.crossOrigin = "anonymous";
|
||||
const durationChange = () => {
|
||||
const { duration } = audio;
|
||||
dispatch({ type: SET_MEDIA_DURATION, duration, id });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue