使用方法:

方法一、js嵌入

直接copy下面代码,修改其中红色部分,即:swf_width、swf_height、texts、files 参数

<script type="text/javascript">
var swf_width=240
var swf_height=240
var texts=’
幸福的脚丫预告片
var files=’
http://www.ruochi.com/product/vcastr/flv/happy_feet.flv
document.write(’<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="’+ swf_width +’" height="’+ swf_height +’">’);
document.write(’<param name="movie" value="
http://www.ruochi.com/product/vcastr2/vcastr22.swf"><param name="quality" value="high">’);
document.write(’<param name="menu" value="false"><param name="allowFullScreen" value="true" />’);
document.write(’<param name="FlashVars" value="vcastr_file=’+files+’&vcastr_title=’+texts+’">’);
document.write(’<embed src="
http://www.ruochi.com/product/vcastr2/vcastr22.swf" allowFullScreen="true" FlashVars="vcastr_file=’+files+’&vcastr_title=’+texts+’" menu="false" quality="high" width="’+ swf_width +’" height="’+ swf_height +’" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />’); document.write(’</object>’);
</script>

其中:
幸福的脚丫预告片是标题。
http://www.ruochi.com/product/vcastr/flv/happy_feet.flv是FLV文件地址。
http://www.ruochi.com/product/vcastr2/vcastr22.swf是FLV文件播放器地址(如果你不会制作,可下载别人的然后上传到自己的空间再调用)。

flv播放器Vcastr 2.0 下载
http://www.ruochi.com/product/vcastr2/vcastr22.zip

方法二、简单直接传递影片地址

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="240" height="180">
<param name="movie" value="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
<embed src="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="240" height="180"></embed>
</object>

方法三、读取影片xml

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="240" height="120">
<param name="movie" value="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_xml=http://www.ruochi.com/product/vcastr2/vcastr.xml">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
<embed src="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_xml=http://www.ruochi.com/product/vcastr2/vcastr.xml" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="240" height="120"></embed>
</object>

其中:http://www.ruochi.com/product/vcastr/vcastr.xml是播放列表的xml地址

高级选项

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="240" height="180">
<param name="movie" value="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
<embed src="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="240" height="180"></embed>
</object>

<http://www.ruochi.com/product/vcastr2/vcastr22.swf?参数A=111&参数B=222&....>

在以上"参数A=111&参数B=222"部分添加参数,使用参数=值的格式,多个参数用&连接,参数数量不限制,注意有2个红色部分http://www.ruochi.com/product/vcastr2/vcastr22.swf地方需要修改

例如:

value="http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1"

表示影片地址是"http://www.ruochi.com/product/vcastr/flv/happy_feet.flv",标题是"变形金刚预告片",控制栏颜色是0xFF6600,控制栏位置在下方。

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="500" height="224">
<param name="movie" value="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1">
<param name="quality" value="high">
<param name="allowFullScreen" value="true" />
<embed src="
http://www.ruochi.com/product/vcastr2/vcastr22.swf?vcastr_file=http://www.ruochi.com/product/vcastr/flv/happy_feet.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="224"></embed>

参数名称

参数说明

默认值

vcastr_file

方法2传递影片flv文件地址参数,多个使用|分开

vcastr_title

影片标题参数,多个使用|分开,与方法2配合使用

vcastr_xml

方法3 传递影片flv文件地址参数,样板参考 http://www.ruochi.com/product/vcastr2/vcastr.xml

vcastr.xml

IsAutoPlay

影片自动播放参数:0表示不自动播放,1表示自动播放

0

IsContinue

影片连续播放参数:0表示不连续播放,1表示连续循环播

1

IsRandom

影片随机播放参数:0表示不随机播放,1表示随机播放

0

DefaultVolume

默认音量参数 :0-100 的数值,设置影片开始默认音量大小

100

BarPosition

控制栏位置参数 :0表示在影片上浮动显示,1表示在影片下方显示

0

IsShowBar

控制栏显示参数 :0表示不显示;1表示一直显示;2表示鼠标悬停时显示;3表示开始不显示,鼠标悬停后显示

2

BarColor

播放控制栏颜色,颜色都以0x开始16进制数字表示

0x000033

BarTransparent

播放控制栏透明度

60

GlowColor

按键图标颜色,颜色都以0x开始16进制数字表示

0x66ff00

IconColor

鼠标悬停时光晕颜色,颜色都以0x开始16进制数字表示

0xFFFFFF

TextColor

播放器文字颜色,颜色都以0x开始16进制数字表示

0xFFFFFF

LogoText

可以添加自己网站名称等信息(英文)

LogoUrl

可以从外部读取logo图片,注意自己调整logo大小,支持图片格式和swf格式

EndSwf

影片播放结束后,从外部读取swf文件,可以添加相关影片信息,影片分享等信息,需自己制作

BeginSwf

影片开始播放之前,从外部读取swf文件,可以添加广告,或者网站信息,需自己制作

IsShowTime

是否显示时间 : 0表示不显示时间,1表示显示时间

1

BufferTime

影片缓冲时间,单位(秒)

2

常见问题

问:Logo 文字无法显示
答:Logo 文字不能支持中文,可以用LogoUrl参数将Logo做成.swf文件或者.png文件。

问:xml 如何设置高级参数
答:如下

<param name="FlashVars" value="vcastr_xml=http://www.ruochi.com/product/vcastr2/vcastr.xml&vcastr_title=幸福的脚丫预告片|变形金刚预告片|江南MV|魔兽世界-晚安部落&BarColor=0xFF6600&BarPosition=1" /> 
<embed src="http://www.ruochi.com/product/vcastr2/vcastr2.swf" allowFullScreen="true" FlashVars="vcastr_xml=http://www.ruochi.com/product/vcastr2/vcastr.xml&vcastr_title=
幸福的脚丫预告片|变形金刚预告片|江南MV|魔兽世界-晚安部落&BarColor=0xFF6600&BarPosition=1">

问:不能全屏
答:需要升级到flashplayer9.0以上

问:不能退出全屏
答:双击可以进入或退出全屏

问:影片不能拖动进度
答:是由于转换文件格式时候有一些信息丢失,可以使用FLV MetaData Injector修复, 下载地址: http://www.buraks.com/flvmdi;

问:flv放在自己服务器上就不能播放了
答:是由于您的服务器不支持.flv文件格式下载,修改成其他格式比如.swf,当然,相应的vcastr_file或者vcastr_xml中的flv文件名也要修改成.swf

网页中播放FLV文件的代码相关推荐

  1. 网页中播放FLV视频文件的代码

    使用方法: 方法一.js嵌入 直接copy下面代码,修改其中红色部分,即:swf_width.swf_height.texts.files 参数 引用 <script type="te ...

  2. html中加载rmvb,网页中播放RMVB格式的代码写法

    -------------------------------------------------------------------------------- 看着很多很复杂的样子,其实就是多了些播 ...

  3. 网页中播放mp4文件

    最近给企业做了一个网站,为了宣传企业形象,录了很多宣传片.这就涉及到网站视频的播放,在html5时代,实现视频播放很简单,而且也有很多jquery插件可以更简洁的播放视频. 本文记录一下这次开发中使用 ...

  4. html flash 循环播放,在网页中插入flv格式的flash视频怎么让其循环播放_html/css_WEB-ITnose...

    求解 在网页中插入flv格式的flash视频怎么让其循环播放 回复讨论(解决方案) 求解 在网页中插入flv格式的flash视频怎么让其循环播放 这个得让flash coder设置flash播放器吧 ...

  5. 通过Vue+flvjs在HTML5中播放flv格式视频文件—demo及api

    目前主流浏览器不能直接嵌入并且播放FLV文件,所以直接用video标签播放是行不通的. 因此提供两种解析方法 嵌入一个swf媒体播放文件,并利用该文件来播放你预设的文件. 这里推荐dplayer--h ...

  6. 在网页中插入FLV视频,经测试兼容IE、火狐、谷歌等浏览器

    比较目前,所有的浏览器都支持FLASH.所以,这个方法大众普遍都很接受,优酷.土豆等在线视频就是使用的FLASH的. 本例播放器使用Flvplayer.swf.播放器在下文的demo文件中.网页中插入 ...

  7. 在Flash中播放flv视频

    采用ActionScript3.0脚本实现flv视频的播放,需要用一系列类的协作: 你需要一个NetStream对象来加载视频和控制视频的播放: 然而NetStream类只处理流动数据,它并不处理数据 ...

  8. html显示docx,网页中显示PDF的HTML代码.docx

    网页中显示PDF的HTML代码 您可能想打开文档至某一特别页面或目标,或显示书签.要与 链接一起放入一个动作命令,可紧接在 PDF 文件名后面键入数字符号 (#) 和该命令.以下表格显示可能的动作命令 ...

  9. vue中播放flv流视频

    1.安装环境 npm install video.js npm install flv.js 2.引入video,在main.js中引入 import videojs from "video ...

最新文章

  1. 【实战】用机器学习来提升你的用户增长(二)
  2. 哪种编程语言好找工作_哪种编程语言可以工作? 为了周末?
  3. (10)System Verilog 关联数组
  4. vue 项目难点_Vue 项目里戳中你痛点的问题及解决办法
  5. python循环5次_Python自学之路五:分支,循环,迭代
  6. html转word 图片丢失 java_Java 实现 Word 转 pdf 文档的工具来了
  7. 使用cgroup限制某个程序对内存的使用
  8. 代码编辑器CodeMirror及其简单的配置
  9. java求两点间的距离_java计算两点间的距离方法总结
  10. 江苏省2021年高考成绩查询有分数吗,江苏省2021年普通高考录取分数线公布
  11. 模拟无线透传的STM32的24L01无线模块与串口USART通信
  12. 西门子主程序调用子程序_子程序编程举例说明-广数m98调用子程序实例-西门子子程序调用实例...
  13. 厨电智能化趋势下,究竟什么才是真正的“用户思维”?
  14. 测试系统导出Excel无法打开
  15. mysql分区表 缓存_Mysql 分区表-分区操作
  16. 计算机网络词汇解释(一)——网络协议体系
  17. 计算机辅助设计2004,电子线路计算机辅助设计( Protel 2004 ).PDF
  18. 软件质量测试:Jmeter察看结果树的响应数据中的中文显示乱码问题处理
  19. 算法——最优解之动态规划
  20. AES加密算法工作原理

热门文章

  1. Percona XtraDB cluster--第一部分:XtraDB cluster安装 (Centos7)
  2. Dropbox 官方中文版!最优秀实用的免费跨平台文件网络同步网盘云存储服务
  3. mac识别androidUSB调试
  4. 容器编排技术 -- Kubernetes kubectl 与 Docker 命令关系
  5. local variable 'xxx' referenced before assignment
  6. Spring Boot Framework的关键组件和内部构造(自动装配、起步依赖、CLI、Actuator)
  7. 结构设计模式 - 适配器设计模式
  8. java UDP 使用示例
  9. 初识函数式编程(Functional Programming,FP)
  10. sqlachemy入门基础手册