gpt4 book ai didi

javascript - jQuery jPlayer 在 iPad 上不显示持续时间

转载 作者:行者123 更新时间:2023-11-28 09:55:30 25 4
gpt4 key购买 nike

Possible Duplicate:
HTML5 audio duration issue

我在我的网站上使用 jPlayer,一切正常。即使在 Mac 上的 Safari 浏览器上也是如此。

但是当从 iPad 中的 Safari 加载网站时,持续时间显示 NaN(不是数字)。

这就是我启动播放器的方式:

$('#someId').jPlayer({
supplied: 'mp3'
,swfPath: '/libjs_geral/jPlayer.2.1.0/js'
,wmode: 'window'
,ready: function () {
$(this)
.jPlayer('setMedia', { mp3: mp3Url })
.jPlayer('play');
}
});

最佳答案

检查您的服务器是否启用了范围请求。

来自this page在 Jplayer 网站上:

Your server must enable Range requests. This is easy to check for by seeing if your server's response includes the Accept-Ranges in its header. Most HTML5 browsers enable seeking to new file positions during a download, so the server must allow the new Range to be requested.

Failure to accept byte Range requests will cause problems on some HTML5 browsers. Often the duration cannot be read from the file as some formats require that the start and end of the file is read to know its duration. Chrome tends to be the browser that has most problems if the Range request is not enabled on the server, but all browsers will have some issue even if it is only that you have to wait for all the media to load before jumping close to the end.

关于javascript - jQuery jPlayer 在 iPad 上不显示持续时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10128659/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com