主题:介绍一个播放flv文件的控件
一江秋水
[专家分:9680] 发布于 2012-06-06 06:15:00
介绍一个播放flv文件的控件
现在从网上下载的视频多是flv格式的文件,如果要想自编的播放器也能播放,有两个办法:第一个办法是添加一个播放flv文件的控件,这个办法需要自编的代码较简单; 第二个办法是不要控件,即用所谓的纯代码来编写,这个办法需要的代码量较多,比较复杂。笔者今天介绍的是一个播放flv文件的控件,它至少能播放flv、f4v、mp4三种格式的视频文件(别的格式视频文件我没有试过)。我上传的附件包里,不但有控件,还有一个简单的播放器源代码,都是从网上下载的,我仅稍微整理了一下,并把原控件右上角总是出现的“淘宝客影院”五个字消除了。
下面是该控件独有的属性、方法、事件:
flv控件独有的属性
-----------------
BufferTime: 单精度。缓冲时间。
FullScreen: 布尔型。是否全屏。
LoadedBytes:长整形。已装载字节
Movie: 字符型,只读。影片
Mute: 布尔型。是否静音。
Name: 字符型,只读。代码中使用的标识对象的名称。
State: 字符型,只读。状态。
TotalBytes: 长整形,只读。总字节。
TotalTime: 长整形,只读。总时间。
Volume: 长整形。音量。
flv控件独有的方法
-----------------
GotoTime(Value As Long): 跳转到时间。输入参数单位为秒
PauseMovie(): 暂停。
PlayMovie(FilePath As String):播放。输入参数为全路径文件名
StopMovie(): 停止。
flv控件独有的事件
-----------------
ButterProgress(TotalBytes As Long, LoadedBytes As Long):缓冲进展
参数1:总字节
参数2:已装载字节
OnReadyStateChange(newState As String):当前状态
参数1:当前状态字符串:
"Empty": 正在缓冲
"Play": 正在播放
"Pause": 暂停
"Stop": 停止播放
"FlvNotFound":非flv类型文件
PlayProgress(TotalTime As Single, CurrentTime As Single, BufferLength As Single):播放进展
参数1:总时间
参数2:当前时间
参数3:缓冲时间
ReSize():大小变化
回复列表 (共4个回复)
沙发
sc-xzh [专家分:10] 发布于 2012-09-14 13:35:00
没有看到源码。谢谢!sc-xzh@163.com
板凳
一江秋水 [专家分:9680] 发布于 2012-09-16 06:39:00
在附件里面
3 楼
chenfeicc [专家分:0] 发布于 2012-10-06 16:36:00
Russian President Dmitry Medvedev on Sunday [url=http://www.soccercleatsonlines.com/adidas-soccer-cleats-adidas-adipower-predator-trx-fg-c-1_29.html]adidas Adipower predator[/url] ordered an investigation into the allegations of electoral fraud during last weeks parliamentary vote. The announcement came a day after tens of thousands of people rallied in Moscow and other cities to demand the December 4 polls [url=http://www.cheaptimberlandswholesale.com/]cheap timberlands[/url] won by Prime Minister Vladimir Putins ruling United Russia party be annulled and rerun. In a post on the social media site Facebook, Mr. Medvedev said that although he does not agree with any slogans or speeches made at the rallies, he has given [url=http://www.soccercleatcheap.com/]cheap soccer cleats[/url] instructions to check all information from polling station regarding compliance with the election laws. Within minutes of his statement, Mr. Medvedev had received over 1,000 comments on his Facebook site, most of them angry and some [url=http://www.timberlandoutletonline.com/]timberland outlet online[/url] disrespectful. The Occupy London protest site reached its 60th day Monday, running longer than its counterpart in New York did before it was dismantled. It now occupies three sites across the City of London - a cathedral courtyard, a square [url=http://www.soccercleatsonlines.com/adidas-soccer-cleats-adidas-f50-adizero-micoach-fg-c-1_9.html]adidas adizero f50[/url] and a building. One of the sites even has an art gallery. But with growth has come rivalry between the two, with criticism that some American protesters who have decamped to London from New York are too reliant on their creature [url=http://www.cheaptimberlandswholesale.com/mens-timberland-roll-top-boots-c-3.html]timberland boots on sale[/url] comforts. The U.S. economy has recently showed signs of improvement with the unemployment rate dropping from nine percent to 8.6 percent but it remains far above a normal traditional rate of four or five percent. The jobless rate [url=http://www.soccercleatcheap.com/nike-mercurial-glide-iii-ag-green-black-p-289.html]nike mercurial green[/url] is seen as a major factor in whether Mr. Obama can win re-election to another four-year term next November. The president once again called on Congress to approve his nominee, Richard Cordray, to head a new consumer [url=http://www.timberlandoutletonline.com/mens-timberland-roll-top-boots-wheat-p-50.html]timberland roll top boots[/url] protection agency. U.S. President Barack Obama is pressing Republicans in Congress to approve his nominee Richard Cordray to head the first ever consumer guardian agency. During his weekly address Saturday, Obama urged lawmakers to give [url=http://www.soccercleatsonlines.com/nike-soccer-cleats-nike-mercurial-vapor-viii-fg-c-41_64.html]nike mercurial vapor fg[/url] Americans the protection they need from being taken advantage of by mortgage lenders, payday lenders and debt collectors. The president says many people on Wall Street have made a lot money taking advantage of consumers. He is appealing [url=http://www.cheaptimberlandswholesale.com/]timberland for sale[/url] to legislators to give Americans an advocate he says will protect them from unscrupulous practices. Protesters came out across the worlds largest country to demand clean elections and to say what, only one week ago, [url=http://www.soccercleatcheap.com/nike-soccer-cleats-nike-mercurial-victory-iv-ag-c-41_73.html]nike mercurial victory iv[/url] was unsayable. Russia Without Putin was the favorite chant of thousands of demonstrators who marched within earshot of the Kremlin in the largest pro-democracy demonstration since Vladimir Putin came to power in 2000. From Vladivostok on the Pacific [url=http://www.timberlandoutletonline.com/mens-timberland-6-inch-premium-boots-olive-green-p-112.html]timberland boots for men[/url] Coast to Kaliningrad on the Baltic.CF
4 楼
liuyh [专家分:310] 发布于 2012-10-14 22:26:00
向各位老师大神学习;好好学习天天向上
我来回复