Flash video player vcastr 3.0

Source: Internet
Author: User

Http://www.ruochi.com/main/2008/03/19/vcastr-30/

 

Vcastr 3.0-Flash video (FLV) player (Open Source)

 

Insert code to directly write the parameter <object type = "application/X-Shockwave-flash" Data = "vcastr3.swf" width = "650" Height = "500" id = "vcastr3">
<Param name = "movie" value = "vcastr3.swf"/>
<Param name = "allowfullscreen" value = "true"/>
<Param name = "flashvars" value = "xml =
<Vcastr>
<Channel>
<Item>
<Source> http://vcastr.ruochi.com/video/happy_feet.flv </source>
<Duration> </duration>
<Title> </title>
</Item>
</Channel>
<Config>
</Config>
<Plugins>
</Plugins>
"/>
</Param> </Object>

 

Use XML to PASS Parameters <object type = "application/X-Shockwave-flash" Data = "vcastr3.swf" width = "650" Height = "500" id = "vcastr3">
<Param name = "movie" value = "vcastr3.swf"/>
<Param name = "allowfullscreen" value = "true"/>
<Param name = "flashvars" value = "xml = vcastr. xml"/>
</Object>
Parameter description

All parameters that can be set in XML and default values

<Vcastr>
<Channel>
<Item>
<Source> http://vcastr.ruochi.com/video/happy_feet.flv </source>
<Duration> </duration>
<Title> </title>
</Item>
<Item>
<Source> http://vcastr.ruochi.com/video/happy_feet.flv </source>
<Duration> </duration>
<Title> </title>
</Item>
<Item>
<Source> http://vcastr.ruochi.com/video/happy_feet.flv </source>
<Duration> </duration>
<Title> </title>
</Item>
</Channel>
<Config>
<Buffertime> 4 </buffertime>
& Lt; contralpanelalpha & gt; 0.75 & lt;/contralpanelalpha & gt;
<Controlpanelbgcolor> 0xff6600 </controlpanelbgcolor>
<Controlpanelbtncolor> 0 xffffff </controlpanelbtncolor>
<Contralpanelbtnglowcolro> 0xffff00 </contralpanelbtnglowcolro>
<Controlpanelmode> float </controlpanelmode>
<Defautvolume> 0.8 </defautvolume>
<Isautoplay> true </isautoplay>
<Isloadbegin> true </isloadbegin>
<Isshowabout> true </isshowabout>
<Scalemode> showall </scalemode>
</Config>
<Plugins>
<Logoplugin>
<URL> logoplugin.swf </URL>
<Logotext> ruochi.com </logotext>
<Logotextalpha> 0.75 </logotextalpha>
<Logotextfontsize> 24 </logotextfontsize>
<Logotextcolor> 0 xffffff </logotextcolor>
<Textmargin> 10 Auto auto 10 </textmargin>
<Logoclipurl> http://www.ruochigroup.com/images/logo.png </logoclipurl>
<Logoclipalpha> 1 </logoclipalpha>
<Clipmargin> 10 10 Auto </clipmargin>
</Logoplugin>
<Beginendimageplugin>
<URL> beginendimageplugin.swf </URL>
<Source> beginswftest.swf </source>
<Type> begin </type>
<Scaletype> exactfit </scaletype>
</Beginendimageplugin>
<Javascriptplugin>
<URL> javascriptplugin.swf </URL>
</Javascriptplugin>
</Plugins>
</Vcastr>
 

The following describes the XML tree structure with "." and describes the function of parameters.

Video Information

Channel. Item

Video information. You can set multiple videos.

Channel. itme. Source

FLV video address parameter. this parameter is a unique and mandatory parameter. Other parameters are optional. the player has default parameters.

Channel. itme. Duration

The total time of the corresponding video, in seconds. You can set it here because the time information of some films is lost during preparation.

Channel. itme. tilte

Corresponding film title

Channel. itme. Link

Corresponding link after the video is clicked

Player settings

Config. buffertime

Video time in the cache area, in seconds

Config. contralpanelalpha

The transparency of the control bar, ranging from 0 to 1.

Config. controlpanelbgcolor

Color of the control Bar background

Config. controlpanelbtncolor

Control button color

Config. contralpanelbtnglowcolro

Color of the control button halo

Config. defautvolume

Default sound size. The value ranges from 1 to 0.

Config. controlpanelmode

Display Mode of the control bar,
"Float": the default floating mode. If you move the mouse to remove the player, the player will be hidden.
"Normal": normal mode. It is displayed at any time in the lower part of the video.
"Bottom": lower mode, not floating on the film, but displayed below the film
"None": the player control bar is not displayed.

Config. isautoplay

Whether the video starts playing automatically. The default value is true.

Config. isloadbegin

Whether to read the video from the beginning. The default value is true.

Config. isrepeat

Whether to play the video cyclically. The silent value is false.

Config. isshowabout

Show information?

Config. scalemode

Video contraction mode:
"Showall": You can see all the films and maintain the ratio, which may be up or down or left or right.
"Exactfit": the size of the video to the player, which may be out of proportion.
"Noscale": the original size of the video, which is not scaled down.
"Noborder": the video is full of players. The video may be cropped to maintain the proportion.

Plug-in settings

Each subnode in plugins represents a plug-in. You can set multiple plug-ins.

Plugins. logoplugin. The parameter settings of the logo plug-in are displayed.

Plug-in address. You can use an absolute address or a relative address. The absolute address must start with http: //.

Plugins. logoplugin. logotext

Logo text. Note that you can use English and English Punctuation Marks. Chinese characters are not supported. If you want to make Chinese characters into PNG transparent images, you can use plugins. logoplugin. logoclipurl to set parameters.

Plugins. logoplugin. logotextalpha

Text transparency

Plugins. logoplugin. logotextlink

Text connection

Plugins. logoplugin. logotextfontsize

Text font size

Plugins. logoplugin. logotextcolor

Text color

Plugins. logoplugin. textmargin

The position of the text. The margin concept of CSS is used. Four values represent the distance between the top, right, and bottom of the left to the player. The four values are separated by spaces and do not need to be filled in with "Auto, for example, if the upper left alignment has a distance of 10 pixels, you can write "10 Auto 10", and the lower right alignment is "auto 10 Auto"

Plugins. logoplugin. logoclipurl

The URL of the image logo. You can use an absolute address or a relative address. The absolute address must start with http: //.

Plugins. logoplugin. logoclipalpha

Image logo transparency

Plugins. logoplugin. logocliplink

Image logo connection

Plugins. logoplugin. clipmargin

The position of the image logo. The concept of CSS margin is used. The four values represent the distance between the top, right, and bottom to the player. The four values are separated by spaces and do not need to be filled in with "Auto, for example, if the upper left alignment has a distance of 10 pixels, you can write "10 Auto 10", and the lower right alignment is "auto 10 Auto"

Plugins. javascriptplugin, JavaScript controls the parameter settings of the plugin

Plugins. javascriptplugin. url

Plug-in address. You can use an absolute address or a relative address. The absolute address must start with http: //.

Javascript plugin

For usage, see the instance page.
Http://vcastr.ruochi.com/v3/vcastr_javaScript_example.html

Javascript can control the player playback, pause, stop, fast forward, fast forward, next, last, volume control, and time required for the video to jump
Player events can be obtained in Javascript. Four parameters are returned: Type: event type, state: Current Status, phayheadtime: Current playback time, loadpersent: Download percentage

The event type has
Statechange, playback status change, playing or pausing
Complete
Init. The Player Initialization is complete.
Ready. The video has been downloaded and can be played.
Playheadupdate, once every second
Startbuffering, start Buffering
Stopbuffering: buffer stops.

Status state
Playing, playing
Paused, paused

Beginendimageplugin plug-in beginendimageplugin. logoplugin. url

Plug-in address, which can be a relative or absolute address. The absolute address must start with http: //

Beginendimageplugin. logoplugin. Source

Start image or SwF address

Beginendimageplugin. logoplugin. Type

Display Mode. There are three display Methods: Begin: show at the beginning, end: show at the end, and beginend: show at the beginning and end at the same time.

Beginendimageplugin. logoplugin. scaletype

"Showall": You can see all the films and maintain the ratio, which may be up or down or left or right.
"Exactfit": the size of the video to the player, which may be out of proportion.
"Noscale": the original size of the video, which is not scaled down.
"Noborder": the video is full of players. The video may be cropped to maintain the proportion.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.