您的位置:首页 > 其它

flowPlayer播放flv视频基本设置

2013-12-11 10:50 246 查看
flowplayer 版本: flowplayer-3.2.16

首先官网下载(网址:http://flash.flowplayer.org/download/)

1. 解压后,可以先看一下example文件夹,里面有一个demo。

修改index.html

里面的相关属性可以在官网查询到,http://flash.flowplayer.org/documentation/configuration/plugins.html, 大家可以详细的看看,在这里只是简单介绍:

里面的相关swf文件可以在官网下载:

http://releases.flowplayer.org/swf/  加上文件名,例如:http://releases.flowplayer.org/swf/flowplayer.commercial-3.2.16.swf


先附带代码,只是一个小例子:

<html><head>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<!-- A minimal Flowplayer setup to get you started -->

<!--

include flowplayer JavaScript file that does

Flash embedding and provides the Flowplayer API.

-->

<script type="text/javascript" src="../flowplayer-3.2.12.min.js"></script>

<!-- some minimal styling, can be removed -->

<link rel="stylesheet" type="text/css" href="style.css">

<!-- page title -->

<title>Minimal Flowplayer setup</title>

</head><body>

<div id="page">

<!-- this A tag is where your Flowplayer will be placed. it can be anywhere -->

<div id="player" style="display:block;width:520px;height:330px""> </div>

<!-- this will install flowplayer inside previous A- tag. -->

<script>

flowplayer("player", "../flowplayer.commercial-3.2.16.swf",{

logo: { //公司logo

url: 'logo.jpg',

top: 20,

right: 5,

opacity: 1.0,

// you can supply a relative size

// (to make the logo larger in fullscreen)

width: '10%',

height: '10%',

// if set to false, then the logo is also shown in non-fullscreen mode

fullscreenOnly: false,

// time to display logo (in seconds). 0 = show forever

displayTime: 0,

// if displayTime > 0 then this specifies the time it will take

// for the logo to fade out. this happens internally by changing

// the opacity property from its initial value to full

// transparency. value is given in milliseconds.

// for commercial versions you can specify where the user is

// redirected when the logo is clicked

},

clip: { //播放属性

scaling: 'fit',

bufferLength:5,

live:true,

autoPlay: true,

autoBuffering: true,

url: '', //视频地址,自己找

},

play:{ //暂停图品

url:'showme.png',

width:35,

height:30,

},

canvas: {

backgroundGradient: 'none',

},

plugins: {

controls: { //视频控制栏

url: '../flowplayer.controls-3.2.15.swf',

// display properties

bottom:0,

height:24,

zIndex:1,

backgroundColor: '#2d3e46',

backgroundGradient: 'low',

// controlbar-specific configuration

fontColor: '#ffffff',

timeFontColor: '#333333',

// which buttons are visible and which are not?

play:true,

volume:false,

mute:false,

time:false,

stop:false,

fullscreen:true,

// scrubber is a well-known nickname for the timeline/playhead

// combination

scrubber: true,

tooltips: {

buttons: true,

fullscreen: 'Enter fullscreen mode',

},

},

myContent: { //在播放器添加文字等信息

url: '../flowplayer.content-3.2.8.swf',

opacity:0.8,

bottom:'10%',

right: '25%',

width: '30%',

height:'10%',

border:'none',

textAlign:'right',

backgroundColor: 'transparent',

backgroundGradient: 'none',

border: 0,

style: {

'.title': {

fontSize: 10,

fontFamily: 'verdana,arial,helvetica',

color:'#ffffff',

}

},

html: '<p class="title">dasdasdas</p>',

},

},

});

</script>

</div>

</body></html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: