jPlayer flash 回退不缓冲?
我的 jPlayer 实例的 Flash 回退似乎无法在 IE8 及更低版本中传输视频。相反,它会等到整个视频下载完毕然后播放!考虑到我的视频平均下载时间为 2 分钟,这确实是个问题。
以下是选项:
// DASHBOARD JPLAYER: Load first video from #vidlist, set title
var vid2 = $j('#videos').find('option:nth-child(2)').val();
var name2 = $j('#videos').find('option:nth-child(2)').html();
$j('#jquery_jplayer_1').jPlayer({
ready: function () {
$j(this).jPlayer("setMedia", {
m4v: vid2+".mp4",
ogv: vid2+".ogv",
webm: vid2+".webm"
});
},
swfPath: "/wp-content/plugins/jplayer",
supplied: "webmv, ogv, m4v",
size: {
width: "320px",
height: "180px",
cssClass: "jp-video-180p"
},
solution: "html,flash"
//errorAlerts:true,
//warningAlerts:true
});
文件名“vid2”是绝对路径,并且 swfPath 工作正常。您是否看到任何直接错误?有没有办法强制流式传输或缓冲?
The flash fallback for my jPlayer instance doesn't seem to stream videos in IE8 and below. Instead, it waits until the entire video is downloaded and then plays it! Kind of an issue, considering my average video takes 2 minutes to download.
Here's the options:
// DASHBOARD JPLAYER: Load first video from #vidlist, set title
var vid2 = $j('#videos').find('option:nth-child(2)').val();
var name2 = $j('#videos').find('option:nth-child(2)').html();
$j('#jquery_jplayer_1').jPlayer({
ready: function () {
$j(this).jPlayer("setMedia", {
m4v: vid2+".mp4",
ogv: vid2+".ogv",
webm: vid2+".webm"
});
},
swfPath: "/wp-content/plugins/jplayer",
supplied: "webmv, ogv, m4v",
size: {
width: "320px",
height: "180px",
cssClass: "jp-video-180p"
},
solution: "html,flash"
//errorAlerts:true,
//warningAlerts:true
});
The filename 'vid2' is an absolute path, and the swfPath is working fine. Do you see any immediate errors? Is there a way to force streaming or buffering?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保您的 M4V 和 FLV 文件在开头而不是末尾使用元数据进行编码。在下载元数据之前,视频不会播放。
根据 http://www.jplayer.org/latest/developer-guide /#jPlayer-media-encoding
“元数据应该位于编码数据的开头,因为 Flash 解决方案必须具有元数据才能开始播放。”
Make sure that your M4V and FLV file are encoded with the metadata in the beginning, not the end. The video will not play until metadata is downloaded.
Per http://www.jplayer.org/latest/developer-guide/#jPlayer-media-encoding
"The metadata should be at the start of the encoded data, since the Flash solution must have the metadata in order to begin playling."
确保服务器为 M4V、OGV 和 WebM 请求返回正确的 MIME 类型。
Ensure server returning the correct MIME types for M4V, OGV and WebM requests.