JW Player 嵌入代码存在问题 - 带 HTML5 后备功能的 Flash
我正在尝试设置我的页面来播放具有以下规格的视频:
- 使用获得许可的 JW 播放器
- Flash 播放器,HTML5 回退
- 我还想为 HTML5 回退提供替代文件格式(ogg、webm)
- 使用通过 cloudfront 传输视频的 RTMP 流方法
这是我的测试页面的链接: http://coachesmarketingcenter.com/test_new_ppts/index3.html
这是我的嵌入代码目前使用:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test New Videos</title>
<script type='text/javascript' src='http://coachesmarketingcenter.com/test_new_ppts/swfobject.js'></script>
<script type="text/javascript" src="http://coachesmarketingcenter.com/test_new_ppts/jwplayer.js"></script>
</head>
<body>
<div id="container1"></div>
<script type="text/javascript">
jwplayer("container1").setup({
file: "TestNewVideos/MyNewVideo.mp4",
provider: "rtmp",
streamer: "rtmp://s2cr83yb7q2jav.cloudfront.net/cfx/st",
width: 640,
height: 480,
modes: [{
type: "flash",
src: "http://coachesmarketingcenter.com/test_new_ppts/player.swf"
},{
type: "html5",
config: {
file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.mp4",
provider: "video"
}
levels: [
{ file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.mp4" }, // H.264 version
{ file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.ogg" }, // Ogg Theora version
]
});
</script>
</body>
</html>
I'm trying to setup my page to play a video with the following specs:
- Use licensed JW player
- Flash player to be used, HTML5 fall back
- I'd also like to provide alternative file formats for the HTML5 fallback (ogg, webm)
- Use the RTMP streaming method to deliver the videos via cloudfront
Here is a link to my test page:
http://coachesmarketingcenter.com/test_new_ppts/index3.html
Here is the embed code I'm currently using:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Test New Videos</title>
<script type='text/javascript' src='http://coachesmarketingcenter.com/test_new_ppts/swfobject.js'></script>
<script type="text/javascript" src="http://coachesmarketingcenter.com/test_new_ppts/jwplayer.js"></script>
</head>
<body>
<div id="container1"></div>
<script type="text/javascript">
jwplayer("container1").setup({
file: "TestNewVideos/MyNewVideo.mp4",
provider: "rtmp",
streamer: "rtmp://s2cr83yb7q2jav.cloudfront.net/cfx/st",
width: 640,
height: 480,
modes: [{
type: "flash",
src: "http://coachesmarketingcenter.com/test_new_ppts/player.swf"
},{
type: "html5",
config: {
file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.mp4",
provider: "video"
}
levels: [
{ file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.mp4" }, // H.264 version
{ file: "http://dn9lu4lqda9r4.cloudfront.net/TestNewVideos/MyNewVideo.ogg" }, // Ogg Theora version
]
});
</script>
</body>
</html>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我当前正在使用的代码:
code I'm currently using: