HTML5 音频在 Firefox 上不起作用 [英] HTML5 audio not working on Firefox

查看:40
本文介绍了HTML5 音频在 Firefox 上不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Chrome 上运行良好.此外,我使用的是 ogg 文件,所以这不是问题.我在最新版本 9.0.1 上运行.Chrome 和 Firefox 应该都支持 HTML5 音频.

Works fine on Chrome. Moreover, I'm using an ogg file so that's not the problem. I'm running on the latest version 9.0.1. HTML5 audio is supposed to be supported by both Chrome and Firefox.

<audio id="audio">
  <source src="audio/Your_Hand_In_Mine.ogg" type="audio/ogg" />
  <source src="audio/Your_Hand_In_Mine.mp3" type="audio/mpeg" />
  Your browser does not support the audio element.
</audio>

推荐答案

解决方案是将 ogg 文件正确转换为 mp3,反之亦然.当我刚刚将 .ogg 文件重命名为 mp3 时,编码是错误的,我很傻.我使用名为Audacity"和Switch"的软件来完成此操作.

The solution is to properly convert the ogg file into mp3 or vice versa. The encoding was wrong when I just renamed the .ogg file to mp3, silly me. I used software called "Audacity" and "Switch" to accomplish this.

这篇关于HTML5 音频在 Firefox 上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆