Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xhr.setRequestHeader('Access-Control-Allow-Origin', '*') in mp4 plugin causes CORS error #90

Closed
easychen opened this issue May 13, 2019 · 1 comment · Fixed by #91
Closed
Labels
bug🐛 Something isn't working

Comments

@easychen
Copy link

easychen commented May 13, 2019

🐛 Bug Report

when using MSE on mp4 file which hosted on SinaCloud, got an error:

Access to XMLHttpRequest at 'https://static.ftqq.com/resource-f392edb2f32fe3b2cb2fd58619ac798381b91602' from origin 'http://localhost:3000' has been blocked by CORS policy: Request header field access-control-allow-origin is not allowed by Access-Control-Allow-Headers in preflight response.

image

To Reproduce

add https://static.ftqq.com/resource-f392edb2f32fe3b2cb2fd58619ac798381b91602 as source play_url , turn useMSE on , press play button and you will see the error.

comment line 51~52 on griffith-mp4/esm/index.js , then works well .

Expected behavior

play the video.

Run npx envinfo --system --binaries --npmPackages griffith --markdown --clipboard

Paste the results here:

*** Clipboard option removed - use clipboardy or clipboard-cli directly ***


## System:
 - OS: macOS High Sierra 10.13.6
 - CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
 - Memory: 85.70 MB / 10.00 GB
 - Shell: 5.3 - /bin/zsh
## Binaries:
 - Node: 9.11.2 - ~/.nvm/versions/node/v9.11.2/bin/node
 - Yarn: 1.15.2 - ~/.yarn/bin/yarn
 - npm: 5.6.0 - ~/.nvm/versions/node/v9.11.2/bin/npm
 - Watchman: 4.7.0 - /usr/local/bin/watchman
@easychen easychen changed the title xhr.setRequestHeader('Access-Control-Allow-Origin', '*') in mp4 plugin cause CORS error xhr.setRequestHeader('Access-Control-Allow-Origin', '*') in mp4 plugin causes CORS error May 13, 2019
@xiaoyuhen xiaoyuhen added the bug🐛 Something isn't working label May 13, 2019
@xiaoyuhen
Copy link
Contributor

hi @easychen

Thanks for your report, it's an unuseful code, we already remove this.

please use v1.5.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐛 Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants