【发布时间】:2022-01-12 06:13:54
【问题描述】:
请帮忙。我无法播放我的音频文件。它托管在 Google Cloud Storage 中,如果我只是在 localhost 服务器中运行它,但当我使用上传的服务器时,它就可以工作。我经常收到(failed)net::ERR_CONTENT_DECODING_FAILED
以下是我在 VueJS 中使用音频文件的方式
<template>
<v-btn @click="triggerSound">Trigger Sound</v-btn>
<audio id="notif" src="adn.wxt.com/zhuanchu.wav" />
</template>
<script>
mounted() {
this.notifyAudio = document.getElementById('notif')
},
methods: {
async triggerSound() {
this.notifyAudio.play()
}
},
</script>
更新
- 在 Firefox 中运行良好
【问题讨论】:
-
您找到问题的解决方案了吗?
-
@AkshanshaSinghal 还没有。明天,我会做一个赏金
-
我已经复制了这个问题,并且可以将它上传到 Cloud Storage,正如您在 link 中看到的那样。您采取了哪些步骤?
-
步骤是什么意思?我还没有修复它.. 虽然它在 Firefox 浏览器上运行良好
-
您可以检查一次元数据吗?输入错误的元数据可能是这里的问题。
标签: vue.js google-cloud-storage