Flowplayer-playlist
SOURCE URL: https://flowplayer.org/docs/playlist.html
HTML layout
Here is a typical setup for a playlist for a html based playlist:
<div class="flowplayer">
<!-- initial clip -->
<video>
<source type="video/webm" src="http://mydomain.com/night1/640x360.webm">
<source type="video/mp4" src="http://mydomain.com/night1/640x360.mp4">
<source type="video/ogg" src="http://mydomain.com/night1/640x360.ogv">
</video>
<!-- playlist root -->
<div class="fp-playlist">
<!-- playlist entries so. "trigger" elements -->
<a href="http://mydomain.com/night1/640x360.mp4"></a>
<a href="http://mydomain.com/night2/640x360.mp4"></a>
<a href="http://mydomain.com/night3/640x360.mp4"></a>
<a href="http://mydomain.com/night4/640x360.mp4"></a>
</div>
</div>
- The initial clip is configured with multiple formats (webm, mp4, ogv). The playlist assumes that all playlist entries are delivered via HTTP and have the same formats available and obey to the same filename and filename suffix naming scheme. If the entries cannot follow a consistent naming scheme or the videos are delivered via RTMP for the Flash engine you must set up the playlist via JavaScript.
- The playlist is nested inside the player so you can style it differently depending on the player state.
- By default the playlist entries are anchor tags inside a tag with CSS class name
.fp-playlist. A user without JavaScript support can still see the videos by clicking on the link. - You can use autoplay or a splash setup just like when you are not using a playlist.
- If Analytics is enabled each video is tracked separately.
- You can have several playlists on one page.
- When a playlist is configured the
next,prevandplay(index)methods are available from the API. Additionally theindexandis_lastproperties are available from the video object.
CSS classes
A "video{clip_index}" CSS class name will be assigned to the root element and a "is-active" CSS class is given to the currently active trigger. For example
<div class="flowplayer video1">
<div class="fp-playlist">
<a href="http://mydomain.com/video1.mp4"></a>
<a href="http://mydomain.com/video2.mp4" class="is-active"></a>
<a href="http://mydomain.com/video3.mp4"></a>
<a href="http://mydomain.com/video4.mp4"></a>
</div>
</div>
You can for example show/hide HTML inside the player based on which clip is being played.
.flowplayer.video1 .info1 {
display: block;
}
v5.1 A convenience class last-video represents the last clip. For example
.last-video.is-finished {
/ do your marketing magic /
}
Next and prev links
Anchors with "fp-prev" and "fp-next" class names will move forward and backward on the playlist. For example
<div class="flowplayer">
<video>
<source type="video/webm" src="http://mydomain.com/my-video.webm">
<source type="video/mp4" src="http://mydomain.com/my-video.mp4">
</video>
<a class="fp-prev">prev</a>
<a class="fp-next">next</a>
<div class="fp-playlist">
<a href="http://mydomain.com/my-video.mp4"></a>
...
</div>
</div>
Configuration
The playlist behaviour is configured at the top level of the configuration object. The following options are available:
| option | default value | description |
| active | "is-active" | CSS class name for the trigger element |
| advance | True | seek to next clip when previous one is finished and stop when last clip ends |
| loop | True | v5.1 continue from the first clip when last clip ends. Overrides the clip specific loop variable |
| query | ".fp-playlist a" | jQuery selector for trigger elements |
Clip specific cuepoints
v5.1 You can have a separate set of cuepoints for each clip of a playlist. For example:
<div class="flowplayer">
<video>
<source type="video/webm" src="http://mydomain.com/night1/640x360.webm">
<source type="video/mp4" src="http://mydomain.com/night1/640x360.mp4">
</video>
<div class="fp-playlist">
<a href="http://mydomain.com/night1/640x360.mp4" data-cuepoints="[0.5, 1]"></a>
<a href="http://mydomain.com/night2/640x360.mp4" data-cuepoints="[0.9, 1.5]"></a>
<a href="http://mydomain.com/night3/640x360.mp4"></a>
</div>
</div>
Note: Clip specific cuepoints discard all cuepoints set globally for the player. If you want to have cuepoints common to all clips in a playlist while specifying individual ones, you must repeat the common cuepoints for every clip's data-cuepoints.
Javascript playlists
v5.4 Flowplayer allows playlists to be configured completely using javascript. This allows dynamic scenarios where the playlist needs to be retrieved by an API call to be implemented without any DOM manipulation.
This also allows for a minimal HTML structure for the player.
<div id="jsplaylist"></div>
Please take a look at our javascript playlist demo for a complete implementation. Abbreviated snippets from that demo are used here as examples.
The playlist is provided as an array of video sources. A video source can either be key-value pair of type and url or simply an URL.
var allVideos = [
[
{webm: "http://stream.flowplayer.org/night7/640x360.webm"},
{mp4: "http://stream.flowplayer.org/night7/640x360.mp4"},
{ogg: "http://stream.flowplayer.org/night7/640x360.ogv"},
{flash: "mp4:night7/640x360"}
],
[
{webm: "http://stream.flowplayer.org/night5/640x360.webm"},
{mp4: "http://stream.flowplayer.org/night5/640x360.mp4"},
{ogg: "http://stream.flowplayer.org/night5/640x360.ogv"},
{flash: "mp4:night5/640x360"}
],
[
{webm: "http://stream.flowplayer.org/night6/640x360.webm"},
{mp4: "http://stream.flowplayer.org/night6/640x360.mp4"},
{ogg: "http://stream.flowplayer.org/night6/640x360.ogv"},
{flash: "mp4:night6/640x360"}
],
[
{webm: "http://stream.flowplayer.org/night4/640x360.webm"},
{mp4: "http://stream.flowplayer.org/night4/640x360.mp4"},
{ogg: "http://stream.flowplayer.org/night4/640x360.ogv"},
{flash: "mp4:night4/640x360"}
]
];
Once the list of videos is set up, the player can be initialized with a simple call to flowplayer().
$("#jsplaylist").flowplayer({
rtmp: "rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st",
playlist: allVideos
});
Please note how the net connection URL provided by thertmp configuration option is automatically associated with video sources of type flash.
Flowplayer-playlist的更多相关文章
- FlowPlayer 参数说明
<html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> & ...
- js网页视频播放: vcastr22 、 flowplayer 、 jwplayer
实例结构: 实例1: demo.html <embed src="vcastr22.swf?vcastr_file=../wujiandao.flv" allowFullSc ...
- CF 268E Playlist(贪心)
题目链接: 传送门 Playlist time limit per test:1 second memory limit per test:256 megabytes Description ...
- HTML5播放器FlowPlayer的极简风格效果
在线演示 本地下载 使用Flowplayer生成的极简风格的播放器效果.
- [开发笔记]-flowplayer视频播放插件
最近项目中需要添加播放视频的功能,视频文件是flv格式的.在网上找了一些jQuery视频播放插件,还是觉得“flowplayer”要好一些.特将使用方法记录一下. flowplayer也有html5版 ...
- Codeforces Round #164 (Div. 2) E. Playlist 贪心+概率dp
题目链接: http://codeforces.com/problemset/problem/268/E E. Playlist time limit per test 1 secondmemory ...
- flowplayer+flashhls使用过程中发现的一些小问题
flashls里边有好几套代码,主要看生成路径,其中flowplayer用了flashls.swc,flashls.swc使用的代码在这里:/src/org/mangui/hls,所以要注意,当搜索代 ...
- 兼容各个浏览器的H.264播放: H.264+HTML5+FLOWPLAYER+WOWZA+RMTP
一.方案确定 计划做视频播放,要求可以播放H264编码的mp4文件,各个浏览器,各种终端都能播放. 首先查找可行性方案, http://www.cnblogs.com/sink_cup/archive ...
- flowplayer视频播放插件
flowplayer视频播放插件 最近项目中需要添加播放视频的功能,视频文件是flv格式的.在网上找了一些jQuery视频播放插件,还是觉得“flowplayer”要好一些.特将使用方法记录一下. f ...
- C. Playlist Educational Codeforces Round 62 (Rated for Div. 2) 贪心+优先队列
C. Playlist time limit per test 2 seconds memory limit per test 256 megabytes input standard input o ...
随机推荐
- Java面试题大全(三)
81.如何设定的weblogic的热启动模式(开发模式)与产品发布模式? 可以在管理控制台中修改对应服务器的启动模式为开发或产品模式之一.或者修改服务的启动文件或者commenv文件,增加set PR ...
- Log4J简单使用
一.一般会将commons-logging和Log4j一起使用 原因:1.commons-logging功能较弱 2.log4j功能强大. 所需jar: log4j-1.2.16.ja ...
- 如果使用 Excel5 ,输出的内容应该是GBK编码
下面就是php导出excel的程序 <?phpini_set("display_errors",1);//是否显示报错信息set_include_path(get_inclu ...
- JS开发windows phone8.1系列之1
http://msdn.microsoft.com/zh-cn/library/windows/apps/dn629638.aspx,要点: 1.了解项目结构:package.appxmanifest ...
- DevExpress GridView加入DevExpress中的右键菜单PopuMenu
1. 添加一个Barmanager控件 2. 加入popumenu控件,点击该控件右上角的黑色三角号,编辑选项,点击编辑的选项,选择事件,编辑事件. 3. 在使用该右键菜单的控件添加MouseUp事件 ...
- yii2知识点理解(成员属性)
yii2成员属性 成员变量类似于public $a; 成员属性类似于 public function a(){} 成员变量是就类的结构构成而言的概念,而属性是就类的功能逻辑而言的概念 成员属性应用: ...
- iOS中集成ijkplayer视频直播框架
ijkplayer 是一款做视频直播的框架, 基于ffmpeg, 支持 Android 和 iOS, 网上也有很多集成说明, 但是个人觉得还是不够详细, 在这里详细的讲一下在 iOS 中如何集成ijk ...
- C++笔记----构造函数与析构函数(二)
构造函数是一种特殊的成员函数.在创建对象的时候自动调用,对对象的数据成员进行初始化. (1)栈区中创建的对象,在生存期结束的时候会自动调用析构函数. (2) 在堆上创建的对象,要由程序员显示调用del ...
- 安卓和ios的lineheight的不一样如何解决?
lineheight在pc端上显示很正常,但是在手机就很不同,在iphone6上,设置了lineheight,但是文本上面多了几像素,如果你设置lineheight在35px一下的按钮(用span做的 ...
- linux添加ip、路由相关命令
1- Linux添加永久路由vi /etc/sysconfig/network-scripts/route-eth1ADDRESS0=192.168.10.0NETMASK0=255.255.255. ...