SOURCE URL:https://flowplayer.org/docs/embedding.html

Embedding

Video embedding is an act where the viewers place your video on their site. Furthermore the audience on these foreign sites can do the same. The video can spread "like a virus". The terms "viral" and "viral marketing" originate from this concept. In Flowplayer this feature is enabled by default.

How it works?

When end user clicks the embed icon the following HTML code is offered:

<script src="//embed.flowplayer.org/5.4.6/embed.min.js"><div
class="flowplayer" style="width: 624px; height: 260px;">
<video>
<source type="video/webm" src="http://mydomain.com/my-video.webm">
<source type="video/mp4" src="http://mydomain.com/my-video.mp4">
<source type="video/ogg" src="http://mydomain.com/my-video.ogg">
</video>
</div></script>

This can be pasted on any website's source code and the player will work in place. The embed code has following features:

  1. The flowplayer is placed inside a script tag and upon setup the script tag is replaced by the player
  2. The setup is minimal without splash screens or custom tweaks.
  3. The script loads following files: jQuery, flowplayer.js, Google Analytics and flowplayer skin only if they are not present on the embedding page. They are loaded from trusted CDN's and cannot be modified by any party.
  4. Player dimensions are taken from the video file or if not present the original player dimensions are used
  5. If Google Analytics is enabled the embedded players will also track to your Analytics account
  6. Embedded players can be further embedded

Custom logo and returning visitors

In the commercial version you can supply an absolute URL of your logo:

flowplayer.conf.logo = 'http://mydomain.com/logo.png';

By default this will be displayed on bottom/left corner of the player in the embedded players. When user clicks the logo she will be redirected to the page where the video was originally. Note that the logo is not displayed on your site only on the embedded site. If you want to override this you must force it visible with CSS:

.flowplayer .fp-logo {
display: block;
opacity: 1;
}

Configuration

By default the embed feature loads the embed script and Flowplayer assets from our CDN. Since v5.4.1 this can be customized in the embed configuration object if you prefer to host the files yourself. Here is a list of all embed options:

option default value description
library //releases.flowplayer.org/5.4.6/flowplayer.min.js URL of the Flowplayer API library script
script //embed.flowplayer.org/5.4.6/embed.min.js URL of the embed script
skin //releases.flowplayer.org/5.4.6/skin/minimalist.css URL of skin for embedding
swf //releases.flowplayer.org/5.4.6/flowplayer.swf URL of SWF file for embedding

The global configuration is a good place to configure embedding because it applies to all players on your page. Example:

flowplayer.conf = {
embed: {
library: "//mydomain.com/js/flowplayer.min.js",
script: "//mydomain.com/js/embed.min.js",
skin: "//mydomain.com/css/minimalist.css",
swf: "//mydomain.com/swf/flowplayer.swf"
}
};

Note: The locations must not be paths but full URLs.

This way you can for instance propagate your own customized skin.

Ideally you want to make all required Flowplayer assets available via both the http: and https: protocols. As with the default locations this can be achieved by simply omitting the protocol from the URL - as long as the files are available at that location via both protocols. By contrast, the videos themselves are better delivered via http: as the secure protocol affects playback performance and may cause problems on older Android devices.

Disabling embedding

You can turn off the embedding feature completely with this boolean shorthand:

flowplayer.conf.embed = false;

Facebook

Currently Facebook does not support embedding of HTML5 video and thus Flowplayer cannot be directly embedded to Facebook. However you can share your page so that instead of playing the video inline people will come to your site. If direct embedding matters to you a lot we recommend using Flowplayer Flash.

Beware that direct embedding on Facebook is based on Flash and most mobile devices don't have Flash support. Due to enormous growth of mobile users we expect Facebook to look for HTML5 based solutions for embedding in near future.

Flowplayer-Embedding的更多相关文章

  1. embedding mono实战笔录(一)

    最近在给自己的服务器节点添加脚本功能,考虑到 执行性能.开发效率.调试效率.可维护性.严谨性 五大要素,最终选用C#作为脚本语言,并使用mono作为中间层,使其具备跨平台特性,以备具有在Windows ...

  2. Embedding Scripts

    Mono http://www.mono-project.com/docs/advanced/embedding/ http://www.mono-project.com/docs/advanced/ ...

  3. 论文笔记之: Deep Metric Learning via Lifted Structured Feature Embedding

    Deep Metric Learning via Lifted Structured Feature Embedding CVPR 2016 摘要:本文提出一种距离度量的方法,充分的发挥 traini ...

  4. HTML5播放器FlowPlayer的极简风格效果

    在线演示 本地下载 使用Flowplayer生成的极简风格的播放器效果.

  5. [开发笔记]-flowplayer视频播放插件

    最近项目中需要添加播放视频的功能,视频文件是flv格式的.在网上找了一些jQuery视频播放插件,还是觉得“flowplayer”要好一些.特将使用方法记录一下. flowplayer也有html5版 ...

  6. Embedding Lua in C: Using Lua from inside C.

    Requirments:     1: The Lua Sources.    2: A C compiler - cc/gcc/g++ for Unix, and Visual C++ for Wi ...

  7. flowplayer+flashhls使用过程中发现的一些小问题

    flashls里边有好几套代码,主要看生成路径,其中flowplayer用了flashls.swc,flashls.swc使用的代码在这里:/src/org/mangui/hls,所以要注意,当搜索代 ...

  8. FlowPlayer 参数说明

    <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> & ...

  9. 论文:network embedding

    KDD2016: network embedding model: deep walk(kdd 2014): http://videolectures.net/kdd2014_perozzi_deep ...

  10. 兼容各个浏览器的H.264播放: H.264+HTML5+FLOWPLAYER+WOWZA+RMTP

    一.方案确定 计划做视频播放,要求可以播放H264编码的mp4文件,各个浏览器,各种终端都能播放. 首先查找可行性方案, http://www.cnblogs.com/sink_cup/archive ...

随机推荐

  1. Java序列化机制

    java的序列化机制支持将对象序列化为本地文件或者通过网络传输至别处, 而反序列化则可以读取流中的数据, 并将其转换为java对象. 被序列化的类需要实现Serializable接口, 使用Objec ...

  2. spring-session整合

    如果项目之前没有整合过spring-data-redis的话,这一步需要先做,在maven中添加这两个依赖: <dependency>     <groupId>org.spr ...

  3. 安装Arch Linux(桌面环境)

    安装xorg-server # pacman -S xorg-server xorg-server-utils xorg-xinit 安装显卡驱动 如果不知道是什么显卡,就使用以下命令查看 # lsp ...

  4. 浏览器中Javascript的加载和执行

    在刚学习Javascript时曾对该问题在小组内做个一次StudyReport,发现其中的基础还是值得分析的. 从标题分析,可以加个Javascript的加载和执行分为两个阶段:加载.执行.而加载即浏 ...

  5. Why MySQL could be slow with large tables ?

    https://www.percona.com/blog/2006/06/09/why-mysql-could-be-slow-with-large-tables/

  6. 【转】ArcGIS 创建切片缓存方法工具总结

    ArcGIS 创建切片缓存方法工具总结 http://wenku.baidu.com/link?url=Bm8AkmcJBzfiyat9N_Me6vlfSHEDCC_D1qBk5IB4X4CIDeKI ...

  7. JMeter学习-019-JMeter 监听器之【聚合报告】界面字段解析及计算方法概要说明

    聚合报告是 JMeter 使用过程中使用率非常高的监听器之一,可通过右键单击,依次选择[添加 / 监听器 / 聚合报告] 来进行添加.执行 JMeter 脚本后,聚合报告显示如下:

  8. TCP 长连接与短连接的区别

    TCP连接 当网络通信时采用TCP协议时,在真正的读写操作之前,server与client之间必须建立一个连接,当读写操作完成后,双方不再需要这个连接时它们可以释放这个连接,连接的建立是需要三次握手的 ...

  9. Centos7网络配置,vsftpd安装及530报错解决

    今天在虚拟机安装CentOS7,准备全新安装LTMP,结果又是一堆问题,不过正好因为这些出错,又给自己长了见识. 1,CentOS7网络配置 最小化安装CentOs7后,ifconfig提示comma ...

  10. 解决 Android SDK下载和更新失败“Connection to https://dl-ssl.google.com refused."

    缘由: 更新sdk,遇到了更新下载失败问题: Fetching https://dl-ssl.google.com/android/repository/addons_list-2.xml Fetch ...