最后的效果

1、从官网下载JWPlayer

下载后的文件,标红部分是必要的文件。

2、Jquery可以使用1.6以上版本

<html><head>
<title>Greenpeace: Aurora</title>
<style>
body, html,.full-size{overflow: hidden;padding: 0;margin: 0;width: 100%;height: 100%;background: transparent;}
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="jwplayer.js"></script>
</head>
<body>
<div id="videoPlayer_wrapper" style="position: relative; width: 100%; height: 100%;">
<object type="application/x-shockwave-flash" data="http://static.dazedcdn.com/swf/player-v5-8.swf" width="100%" height="100%" bgcolor="#000000" id="videoPlayer" name="videoPlayer" tabindex="0">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="seamlesstabbing" value="true">
<param name="wmode" value="opaque">
<param name="flashvars" value="netstreambasepath=http%3A%2F%2Fwww.dazeddigital.com%2Fembed%2F1362&id=videoPlayer&image=http%3A%2F%2Fimages.dazedcdn.com%2F786%2Fdd%2F1040%2F7%2F1047877.jpg&file=http%3A%2F%2Fpseudo01.hddn.com%2Fvod%2Fdazeddigital.dazedgroup1%2Fvideos%2F1362-greenpeace-aurora.mp4&skin=http%3A%2F%2Fstatic.dazedcdn.com%2Fswf%2Fhtml5-dazed-skin%2Fdazeddigital.zip&stretching=uniform&provider=http&bufferlength=5&autostart=false&plugins=http%3A%2F%2Flp.longtailvideo.com%2F5%2Fsharing%2Fsharing.swf&sharing.code=%253Ciframe%2520src%3D%2522http%3A%2F%2Fwww.dazeddigital.com%2Fembed%2F1362%2522%2520width%3D%2522420%2522%2520height%3D%2522237%2522%2520frameborder%3D%25220%2522%2520webkitAllowFullScreen%2520allowFullScreen%253E%253C%2Fiframe%253E&sharing.link=http%3A%2F%2Fwww.dazeddigital.com%2Fvideo%2Fgreenpeace-aurora%2F1362&sharing.pluginmode=HYBRID&controlbar.position=over&logo.hide=true">
</object> </div> <script type="text/javascript">
jwplayer("videoPlayer").setup({
"width": "100%",
"height": "100%",
"image": "http://images.dazedcdn.com/786/dd/1040/7/1047877.jpg",
"file": "http://pseudo01.hddn.com/vod/dazeddigital.dazedgroup1/videos/1362-greenpeace-aurora.mp4",
"skin": "http://static.dazedcdn.com/swf/html5-dazed-skin/dazeddigital.zip",
"stretching": "uniform",
"provider": "http",
"id": "videoPlayer",
"bufferlength": "5",
"autostart": false,
"logo.hide": true,
/* Please can you add in the info for embed of remove the plugin */
"plugins": {
"sharing-3": {
Video ID Has to added after "/embed/"
"code": "%3Ciframe%20src=%22" + "http://www.dazeddigital.com/embed/1362" + "%22%20width=%22420%22%20height=%22237%22%20frameborder=%220%22%20webkitAllowFullScreen%20allowFullScreen%3E%3C/iframe%3E",
// Page URL has to go here. (For Sharing)
"link": "http://www.dazeddigital.com/video/greenpeace-aurora/1362"
},
/*Also will need data added - UA-753100-14 instead of _videogaq js?*/
"gapro-2": {
"trackingobject": "_gaq",
"idstring": "Greenpeace: Aurora",
"trackstarts": true,
"trackpercentage": true,
"tracktime": true
}
}, "modes": [
{ "type": "flash", "src": "http://static.dazedcdn.com/swf/player-v5-8.swf" },
{ "type": "html5" }
]
});
</script>
</body></html>

说明:

file为要播放的视频路径,

image为设置未播放的封面图片

skin为设置具体的皮肤

plugins可以做些插件,比如分享、播放视屏前,播放几秒广告等。

3、动态load文件

file为要播放的视频路径,image为设置未播放的封面图片。

jwplayer().load([{file:fielUrl,image:imageUrl}]);

4、其他的一些操作可以参考JWplayer提供的API

JWPlayer 使用小记的更多相关文章

  1. [原]Paste.deploy 与 WSGI, keystone 小记

    Paste.deploy 与 WSGI, keystone 小记 名词解释: Paste.deploy 是一个WSGI工具包,用于更方便的管理WSGI应用, 可以通过配置文件,将WSGI应用加载起来. ...

  2. MySql 小记

    MySql  简单 小记 以备查看 1.sql概述 1.什么是sql? 2.sql发展过程? 3.sql标准与方言的关系? 4.常用数据库? 5.MySql数据库安装? 2.关键概念 表结构----- ...

  3. Git小记

    Git简~介 Git是一个分布式版本控制系统,其他的版本控制系统我只用过SVN,但用的时间不长.大家都知道,分布式的好处多多,而且分布式已经包含了集中式的几乎所有功能.Linus创造Git的传奇经历就 ...

  4. 广州PostgreSQL用户会技术交流会小记 2015-9-19

    广州PostgreSQL用户会技术交流会小记 2015-9-19 今天去了广州PostgreSQL用户会组织的技术交流会 分别有两个session 第一个讲师介绍了他公司使用PostgreSQL-X2 ...

  5. 东哥读书小记 之 《MacTalk人生元编程》

         一直以来的自我感觉:自己是个记性偏弱的人.反正从小读书就喜欢做笔记(可自己的字写得巨丑无比,尼玛不科学呀),抄书这事儿真的就常发生俺的身上. 因为那时经常要背诵课文之类,反正为了怕自己忘记, ...

  6. Paypal支付小记

    Paypal支付小记 *:first-child { margin-top: 0 !important; } body>*:last-child { margin-bottom: 0 !impo ...

  7. jwplayer播放器停止 单页内多个jwplayer对象停止问题

    单页内多个jwplayer对象停止问题,一直没有找到单页内多个jwplayer播放器停止问题,点击其中一个停止其他播放器; 整个播放代码Remove(),这样就可以停止了,也在ie下防止暂停不了.重音 ...

  8. linux 下cmake 编译 ,调用,调试 poco 1.6.0 小记

    上篇文章 小记了: 关于 Poco::TCPServer框架 (windows 下使用的是 select模型) 学习笔记. http://www.cnblogs.com/bleachli/p/4352 ...

  9. mongodb入门学习小记

    Mongodb 简单入门(个人学习小记) 1.安装并注册成服务:(示例) E:\DevTools\mongodb3.2.6\bin>mongod.exe --bind_ip 127.0.0.1 ...

随机推荐

  1. 使用jQuery出现the function undefined

    出现function undefined往往是相关的JS文件没有导入导致,在相关文件都导入的情况下,使用jQuery提供的方法还会出现function undefined错误,或许就是jQuery对象 ...

  2. HTML5 标签元素的一些注意事项

    不运行写结束标记的元素(但标签元素): area.base.br.col.command.embed.hr.img.input.keygen.link.meta.param.source.track. ...

  3. ios字符串计算高度总结

    1.用xib的话,设置约束的时候 不设置lable的高度即可,高度返回的就是最优高度. 2.用lable代码计算高度 CGFloat getHeightForLableString(NSString ...

  4. CC++初学者编程教程(3) 安装VS2010 boost标准库开发环境

    1.      BOOST编译过程非常复杂,目前为了学习BOOST,首先搭建基于VS2010的BOOST开发环境. Boost库 8 9. 10. 11 12 13 14 15. 16. 17. 18 ...

  5. java多线程向数据库写入数据

    任务: 从sqlserver中将一个表A(约16W条数据)导到mysql中对应的一个表B中. 思路:分段获取A表中的数据后,用多个线程同时向B表中写入. 关键代码 //将数据库中的数据条数分段 pub ...

  6. WKWebView与sessionID的因果

    问题描述:在webView中点击下载按钮后,下载成功文件,然后再去点击上传文件,这时候服务器会报用户未登录错误. 暂时分析的原因是WKWebView在下载后cookie会保存服务器产生的session ...

  7. 将图片文件以byte的形式从导数据库中

    byte[] FileByteArray = new byte[FileLength];  //图象文件临时储存Byte数组                 //Stream StreamObject ...

  8. Ext.Net 使用总结之GridPanel的删除事件

    1.关于Ext.net中GridPanel的删除事件 首先是GridPanel,如下: <ext:GridPanel ID="GridPanel1" runat=" ...

  9. ES6 JavaScript Promise的感性认知

    http://www.zhangxinxu.com/wordpress/2014/02/es6-javascript-promise-感性认知/ 这篇文章讲的很透彻 http://www.zhangx ...

  10. JavaSE学习总结第13天_API常用对象3

      13.01 StringBuffer的概述 StringBuffer类概述:线程安全的可变字符序列.一个类似于 String 的字符串缓冲区,但不能修改.虽然在任意时间点上它都包含某种特定的字符序 ...