使用方法:

方法一、js嵌入

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

view plainprint?
  1. <script type="text/javascript">
  2. var swf_width=240
  3. var swf_height=240
  4. var texts=’幸福的脚丫预告片’
  5. var files=’http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/flv/happy_feet.flv’
  6. 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 +’">’);
  7. document.write(’<param name="movie" value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf"><param name="quality" value="high">’);
  8. document.write(’<param name="menu" value="false"><param name="allowFullScreen" value="true" />’);
  9. document.write(’<param name="FlashVars" value="vcastr_file=’+files+’&vcastr_title=’+texts+’">’);
  10. document.write(’<embed src="http://vir.jxstnu.edu.cn/xieyunc/attachment/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>’);
  11. </script>

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

flv播放器 Vcastr 2.0 下载
http://vir.jxstnu.edu.cn/xieyunc/product/vcastr2/vcastr22.zip

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

view plainprint?
  1. <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">
  2. <param name="movie" value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/flv/happy_feet.flv">
  3. <param name="quality" value="high">
  4. <param name="allowFullScreen" value="true" />
  5. <embed src="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/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>
  6. </object>

方法三、读取影片xml

view plainprint?
  1. <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">
  2. <param name="movie" value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_xml=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr2/vcastr.xml">
  3. <param name="quality" value="high">
  4. <param name="allowFullScreen" value="true" />
  5. <embed src="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_xml=http://vir.jxstnu.edu.cn/xieyunc/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>
  6. </object>

其中:http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/vcastr.xml 是播放列表的xml地址

高级选项

view plainprint?
  1. <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">
  2. <param name="movie" value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/flv/happy_feet.flv">
  3. <param name="quality" value="high">
  4. <param name="allowFullScreen" value="true" />
  5. <embed src="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/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>
  6. </object>

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

例如:

view plainprint?
  1. value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/flv/happy_feet.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1"

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

view plainprint?
  1. <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">
  2. <param name="movie" value="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr/flv/happy_feet.flv&vcastr_title=幸福的脚丫预告片&BarColor=0xFF6600&BarPosition=1">
  3. <param name="quality" value="high">
  4. <param name="allowFullScreen" value="true" />
  5. <embed src="http://vir.jxstnu.edu.cn/xieyunc/attachment/vcastr22.swf?vcastr_file=http://vir.jxstnu.edu.cn/xieyunc/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>

参数名称 参数说明 默认值 

点击在新窗口中浏览此图片
常见问题

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

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

view plainprint?
  1. <param name="FlashVars" value="vcastr_xml=http://vir.jxstnu.edu.cn/xieyunc/product/vcastr2/vcastr.xml&vcastr_title=幸福的脚丫预告片|变形金刚预告片|江南MV|魔兽世界-晚安部落&BarColor=0xFF6600&BarPosition=1" />
  2. <embed src="http://vir.jxstnu.edu.cn/xieyunc/product/vcastr2/vcastr2.swf" allowFullScreen="true" FlashVars="vcastr_xml=http://vir.jxstnu.edu.cn/xieyunc/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

转载于:https://www.cnblogs.com/xieyunc/archive/2009/04/30/2793647.html

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

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

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

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

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

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

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

  4. 网页中播放mp4文件

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

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

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

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

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

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

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

  8. 页面中播放fla文件

    videojs只能播放mp4文件,我自己测试了一下,不能播放flv文件.所以如果网站需要播放flv文件,可以使用flowplayer. flowplayer提供html5与flash两种播放器,htm ...

  9. 在Flash中播放flv视频

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

  10. 使用VLC(ActiveX)在网页中播放MP4

    问题: 从海康录像机下载下来的MP4文件的视频编码为MPEG4(DivX)类型,而不是浏览器能播放的AVC(H264)编码类型. 这样的话,就无法使用H5的Video标签进行播放,然而视频下载程序(自 ...

最新文章

  1. 微信公众平台消息接口开发(29)校验签名与消息响应合并
  2. validator API文档
  3. java string 后几位_java中String占几个位元组
  4. Android Studio使用教程
  5. 通过反射创建动态代理对象(三)
  6. A-Frame 简介03
  7. Elasticsearch学习之快速入门案例
  8. 用js来实现那些数据结构 第一章
  9. 智慧交通day02-车流量检测实现05:卡尔曼滤波器实践(小车模型)
  10. Scala模式匹配和类型系统
  11. tmp文件夹的默认权限
  12. 使用jQuery来创建平滑的页面滚动
  13. [leetcode] 11.盛最多水的容器
  14. web自动化知识点-01
  15. python生成exe文件太大了_Pyinstaller打包生成exe文件过大,四种常用处理方法集锦---嵌入式Python-02...
  16. 【高数】高数第五章节——定积分积分上限函数牛顿——莱布尼兹公式反常积分与广义积分
  17. android 高仿网易新闻,Android实战:仿网易新闻app--简介
  18. ardupilot rover ardurover 电机相关源码 PreArm servo function 33 unassigned
  19. struct的基本使用-go篇
  20. opencv滤镜-素描

热门文章

  1. rdesktop连接windows远程桌面详解
  2. 基于深度学习的目标检测
  3. caffe 实践程序4——cifar10网络
  4. python基于base64模块实现图像数据编码处理、解码还原实践【解决解码数据损失问题】
  5. 2021-06-17java各种锁
  6. c++ []是什么意思
  7. Fisco bcos 在多机器上搭建多个节点的区块链网络 教程
  8. java并发编程(12)-- 线程池 实际⽣产使⽤哪⼀个线程池 怎么设置
  9. Kubernetes 小白学习笔记(9)--搭建一个kubernetes集群--安装Ubuntu虚拟机和容器docker
  10. linux系统常见的压缩命令,Linux 系统常见的压缩指令