From 41862ffde6fe84677b096e1aea78826f12ebd4cb Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Wed, 28 Feb 2018 16:25:07 -0800 Subject: [PATCH] Improve handling of x-origin duration fetching --- js/actionCreators.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/actionCreators.js b/js/actionCreators.js index 7fbee50e..0ef1940d 100644 --- a/js/actionCreators.js +++ b/js/actionCreators.js @@ -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 });