http://support.jwplayer.com/customer/portal/articles/1499103-quickstart-reference

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "http://example.com/uploads/myVideo.mp4",
image: "http://example.com/uploads/myPoster.jpg",
width: 640,
height: 360
}); jwplayer("myElement").setup({
file: "http://example.com/uploads/myAudio.m4a",
width: 640,
height: 30
}); jwplayer("myElement").setup({
file: "/assets/myLiveStream.m3u8",
image: "/assets/myPoster.jpg"
}); jwplayer("myElement").setup({
playlist: [{
image: "/assets/myPoster.jpg",
sources: [{
file: "/assets/myStream.m3u8"
},{
file: "/assets/myVideo.mp4"
}]
}],
primary: "flash"
});
we also has the primary option set to flash. If this is not set, the JW Player will attempt to play the video in HTML5. jwplayer("myElement").setup({
file: "rtmp://example.com/application/mp4:myVideo.mp4",
image: "/assets/myVideo.jpg",
height: 360,
width: 640
}); jwplayer("myElement").setup({
playlist: [{
image: "/assets/myVideo.jpg",
sources: [{
file: "rtmp://example.com/application/mp4:myVideo.mp4"
},{
file: "/assets/myVideo.mp4"
}]
}],
height: 360,
primary: "flash",
width: 640
});
The RTMP stream will be played on desktops, the HTTP download will be played on devices, since many browsers support that in HTML5
rtmp://example.com/vod/mp4:myFolder/myVideo.mp4
rtmp://example.com/vod/flv:myFolder/myVideo.flv
rtmp://example.com/live/flv:myFolder/myLiveStream
rtmp://example.com/vod/mp3:myFolder/mySong.mp3
rtmp://example.com/vod/mp4:myFolder/mySong.m4a
If no prefix is found, the player splits application/stream after the last / in the filename jwplayer("myElement").setup({
file: "rtmp://example.com/vod/mp4:myVideo.mp4",
height: 360,
image: "/assets/myVideo.jpg",
rtmp: {
bufferlength: 0.1
},
width: 640
}); jwplayer("myElement").setup({
file: "rtmp://example.com/xxxx/myStream",
height: 360,
image: "/assets/myLivestream.jpg",
rtmp: {
subscribe: true
},
width: 640
});
When streaming RTMP live streams using the Akamai, Edgecast or Limelight CDN, players cannot simply connect to the live stream.
Instead, they have to subscribe to it, by sending a so-called FC Subscribe call to the server. Basic Options
1.aspectratio
This option, used to setup JW Player for responsive design, is set to the video display aspect ratio, for example "16:9". When
the width of the player changes, it then automatically scales its height accordingly. When the aspectratio is set, the height
option is ignored
2.autostart
Automatically start playing the video on page load. Can be true or false (default). Autostart does not work on mobile devices (iOS and Android)
3.controls
Whether to display the video controls (controlbar, display icons and dock buttons). Can be false or true (default). When false,
use the JavaScript API to control the chromeless player
4.file
URL to a single video file, audio file, YouTube video or live stream to play. See for example the MP4 Video Embed article.
Note this option is ignored if the playlist configuration block is used
5.height
Height of the player in pixels. We recommend setting this to at least 180, so all UI elements will fit. However, it can be set
to a small size (e.g. 40) for audio-only playback. Defaults to 270
6.width
Width of the player. Defaults to 480 pixels. We recommend setting this to at least 320 pixels, since otherwise certain UI elements
may not fit. It can also be set to "100%" to enable responsive design, in combination with the aspectratio option
7.image
URL to a poster image to display before playback starts. For audio-only media, the poster image stays visible during playback. See
for example the MP4 Video Embed article. Note this option is ignored if the playlist configuration block is used
8.mute
Whether to have the sound muted on startup or not. Can be false (default) or true. Mute does not work on mobile devices (iOS and Android).
9.primary
Which rendering mode to use for rendering the player if both are available. Can be html5 (default) or flash
10.repeat
Whether to loop playback of the playlist or not. Can be true (keep playing forever) or false (stop playback when completed). Defaults to false.
11.skin
Which skin to use for styling the player (the default skin is named Six). Is set to either the name of one of our
8 Pro skins (e.g. five) or the URL of a custom skin (e.g. http://example.com/skin.xml)
12.androidhls
The default value for this flag is false. Set this value to true if you would like the JW Player to play HLS video
sources on Android devices 4.1 and greater

  

JWPlayer使用指南的更多相关文章

  1. JWPlayer高速入门指南(中文)

    将JW Player嵌入到网页中很的简单,仅仅须要进行例如以下3个步骤: 1.解压mediaplayer-viral.zip文件.将jwplayer.js和player.swf文件复制到project ...

  2. JWPlayer快速入门指南(中文)

    将JW Player嵌入到网页中非常的简单,只需要进行如下3个步骤: 1.解压mediaplayer-viral.zip文件,将jwplayer.js和player.swf文件拷贝到工程中: 2.在页 ...

  3. jwplayer

    将JW Player嵌入到网页中非常的简单,只需要进行如下3个步骤: 1.解压mediaplayer-viral.zip文件,将jwplayer.js和player.swf文件拷贝到工程中: 2.在页 ...

  4. JavaScript权威指南 - 函数

    函数本身就是一段JavaScript代码,定义一次但可能被调用任意次.如果函数挂载在一个对象上,作为对象的一个属性,通常这种函数被称作对象的方法.用于初始化一个新创建的对象的函数被称作构造函数. 相对 ...

  5. UE4新手之编程指南

    虚幻引擎4为程序员提供了两套工具集,可共同使用来加速开发的工作流程. 新的游戏类.Slate和Canvas用户接口元素以及编辑器功能可以使用C++语言来编写,并且在使用Visual Studio 或 ...

  6. JavaScript权威指南 - 对象

    JavaScript对象可以看作是属性的无序集合,每个属性就是一个键值对,可增可删. JavaScript中的所有事物都是对象:字符串.数字.数组.日期,等等. JavaScript对象除了可以保持自 ...

  7. JavaScript权威指南 - 数组

    JavaScript数组是一种特殊类型的对象. JavaScript数组元素可以为任意类型,最大容纳232-1个元素. JavaScript数组是动态的,有新元素添加时,自动更新length属性. J ...

  8. const extern static 终极指南

    const extern static 终极指南 不管是从事哪种语言的开发工作,const extern static 这三个关键字的用法和原理都是我们必须明白的.本文将对此做出非常详细的讲解. co ...

  9. Atitit.研发管理软件公司的软资产列表指南

    Atitit.研发管理软件公司的软资产列表指南 1. Isv模型下的软资产1 2. 实现层面implet1 3. 规范spec层1 4. 法则定律等val层的总结2 1. Isv模型下的软资产 Sof ...

随机推荐

  1. armstrong's programming erlang 2nd

    Re: json handling map functions in erlang 17 I have not read Joes final book on the matter (several ...

  2. Mysql集群读写分离(Amoeba)

    Amoeba原理戳这里:Amoeba详细介绍 实验环境 Master.Amoeba--IP:192.168.1.5 Slave---IP:192.168.1.10 安装JDK JDK下载地址:http ...

  3. Struts2的整体回顾(Action, 拦截器, 值栈, OGNL表示式, ModelDriven)

    ValueStack里有map(request, session, attr, parameters)和对象栈. Map调用的方法: ActionContext.getContext().put(k, ...

  4. selenium自动化测试

    在线安装testNg,现在分享一个离线安装的方法,及安装文件,希望能够帮到大家.1.下载附件,并解压.(后面有),或者百度网盘http://pan.baidu.com/s/1i3y1QtR2.将解压后 ...

  5. Jboss 集群配置

    环境配置:CentOS 7 x64 * 3 IP:  172.24.0.100        172.24.0.101        172.24.0.102 服务器配置: 172.24.0.100 ...

  6. WebRequest调用

    WebRequest支持不同的浏览器对象,可以在底层使用不同的XMLHttpRquest方式调用Web服务. Time.aspx <%@ Page Language="C#" ...

  7. label中添加图片

    创建NSTextAttachment的对象,用来装在图片 将NSTextAttachment对象的image属性设置为想要使用的图片 设置NSTextAttachment对象bounds大小,也就是要 ...

  8. STM8S STM8L引脚如何配置最低(转)

    源:STM8S STM8L引脚如何配置功耗最低 STM8S无任何外围电路 单片机CAP接104电容 复位接上拉电阻,其它引脚全部悬空,利用以下程序测试电流如下:(以前也用STM8L做过类似实验,情况也 ...

  9. PageRank——Google的民主表决算法

    1.搜索和民主表决:      当大多数人认为一件事为真的时候,那么这件事就是为真:即搜索时,其他网页对认为此网页好时,那么此网页排名应该靠前   2.PageRank思想:      i.起源:   ...

  10. jQuery EasyUI学习资源汇总

    jQuery EasyUI学习资源汇总 EasyUi – 1.入门 EasyUi – 2.布局Layout + 3.登录界面 EasyUi – 4.datwagrid 学习Jquery EasyUI的 ...