我得到了以下错误信息。我正在使用HTML5。我尝试添加音频文件。错误如下:
无法获取属性'jPlayer'的值:对象为空或未定义
这个错误发生在标签上。
这是我的脚本代码:
无法获取属性'jPlayer'的值:对象为空或未定义
这个错误发生在标签上。
这是我的脚本代码:
$(document).ready(function () {
$("#jpId").jPlayer({
ready: function () {
this.element.jPlayer("setFile", "../179_short_all-the-family-together_0033.mp3"); // Defines the counterpart mp3 and ogg files
},
oggSupport: true,
});
});
我的 HTML5 div:
<div id="jpId">
</div>
我尝试使用 <audio> 标签,但需要在 IE8、IE9、Firefox 和 Chrome 中都能播放。我知道需要添加 .ogg 文件,但想先让它能正常工作,再添加其他文件类型。谢谢!