-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
mp3 files are served as text/html #4792
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
Comments
Hi, thanks for your report. |
@sodatea you can find the git repo here: https://codesandbox.io/s/github/kdekooter/rhino. Run the app click on "Start" and watch the browser console (on FF preferably) |
In this case, you are referring to it with an absolute URL, it should be placed in the For more details, see https://cli.vuejs.org/guide/html-and-static-assets.html#static-assets-handling And as I just checked it out, if you want to refer to it with a relative URL, there's currently a caveat that Two workarounds:
module.exports = {
chainWebpack: (config) => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.transformAssetUrls = { audio: 'src' }
return options
})
}
} And then you can use the syntax like |
Thanks for the swift response @sodatea. The vue config solution is not working unfortunately. Placing the files in the public folder does. So I can move on. |
Version
4.0.5
Environment info
Steps to reproduce
/assets
<audio>
tagWhat is expected?
it will be served with the correct mime type
What is actually happening?
it is served as text/html leading the browser to reject it, with the following console messages:
HTTP “Content-Type” of “text/html” is not supported. Load of media resource <edited> failed.
Cannot play media. No decoders for requested formats: text/html
The text was updated successfully, but these errors were encountered: