注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

火力光波的博客

火一般的热情 光一样的速度

 
 
 

日志

 
 

wmp播放器控件属性及方法  

2009-10-17 21:09:36|  分类: VB6编程 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

windows media player控件属性及方法


windows media player 控件在我们编程时经常要用到,但是有很多属性及方法却不知道该怎么使用。现以 wmp 9.0控件为例说说其在 Delphi 7.0 中常用的属性与方法(JavaScript中用法几乎完全相同)。

假设此控件名为wmp

属性/方法名: 说明:
[基本属性]  
URL:String;                              指定媒体位置,本机或网络地址
uiMode:String;                          播放器界面模式,可为Full, Mini, None, Invisible
playState:integer;                     
播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪
enableContextMenu:Boolean;    启用/禁用右键菜单
fullScreen:boolean;                   是否全屏显示
[controls] wmp.controls //          播放器基本控制
controls.play;                           播放
controls.pause;                     
  暂停
controls.stop;                           停止
controls.currentPosition:double;            
当前进度
controls.currentPositionString:string;      当前进度,字符串格式。如“00:23”
controls.fastForward;                
  快进
controls.fastReverse;                  快退

controls.next;                            下一曲
controls.previous;                    
   上一曲
[settings] wmp.settings //         
   播放器基本设置
settings.volume:integer;             
音量,0-100
settings.autoStart:Boolean;         是否自动播放
settings.mute:Boolean;          
     是否静音
settings.playCount:integer;          播放次数
[currentMedia] wmp.currentMedia //          
当前媒体属性
currentMedia.duration:double;                 
媒体总长度
currentMedia.durationString:string;            媒体总长度,字符串格式。如“03:24”
currentMedia.getItemInfo(const string);      获取当前媒体信息

      "Title"=媒体标题,"Author"=艺术家,"Copyright"=版权信息,"Description"=媒体内容描述,
      "Duration"=持续时间(秒),"FileSize"=文件大小,"FileType"=文件类型,"sourceURL"=原始地址
currentMedia.setItemInfo(const string);      通过属性名设置媒体信息
currentMedia.name:string;                        同 currentMedia.getItemInfo("Title")
[currentPlaylist] wmp.currentPlaylist //     
当前播放列表属性
currentPlaylist.count:integer;                   
当前播放列表所包含媒体数
currentPlaylist.Item[integer];                     获取或设置指定项目媒体信息,其子属性同wmp.currentMedia

 

来源:Windows Media Player & Real Player ActiveX 属性及方法

  评论这张
 
阅读(1828)| 评论(6)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--推荐日志--> $ fc0 din ==1} js- n oul pnt" tn ==2} js- n oul pnt" tn ==3} js- erNickname|escap t";9999" &ge} clas"#" targsplay:no鋈罩--> r ea name="jsa name="jst" id} g"> a> 新闻广告 st a as x} {if !!x}
  • t-C33333 c0divsfoca> 新闻鋈罩--> C3333333} blC3333333C3h| erNickn63.com/${x. "bdwa} e ztttttttthis.g" fr${his pla(h| >} e ztttttttt iame}/">icry.don" panShow e ztttttttt iame}/">i on">&nbsame}/">lmgdbdwnk" hide${h|} e ztttttttob izndefif"d(' s-jst')&& s-jstc 1th>0${a.useztttttttztttttttock nb s-jst nbw-f40"> niztttttttztttttsiznd_r:fex>7}{bts k
    erNickn63.com/${x. "bdwa${ff}<"$_spanCite">l" targdod=>·as nbsp;|bdwa bd<#--推荐日謊 ztttttttobC3ea name="jsztttttttztttttob r e ztttttttghul日謊 ztttttttgs="fc03 noudownlm:1} eztttttttzttt${fn/wapblog.html?fromp erNickname|escap ter="
    新闻 media<#--} ezttttttt鋈罩--> C3333333<日志--> a name="jst" id} g"> 右边模块结构st a as x} {if !!xtx
  • zttt rviame}/">d="y bldivn" rv>} zttt rviame}/">d="y bldivn" rv>} zttt rviame}/">d="y bldivn" rv>} zttt rviame}/">d="y bldivn" rv>} zttt rviame}/">d="y bldivn" rv>} zttt rviame}/">d="y bldivn" rv>} s="fc03 nouanspon"a"63.com/${x. ame}/">${fn(a.nicgt;
  • 锥绦"
    :hid class="commentzttt br="hbr="} eight="1我要莟e ztag fc03">
    模块结构st a as x} {if !!xtx
  • 历蔿owtr class="2m/mailEntte ztag fc03">
  • d="y b{ftdivs2pdate=>} bl 引用模块结构st a as x} {if !!xlasllowtrav ctx -://blog.1 d="y l" targ icn icn-5an>"#" targpanShowt-C3-" s=""} 3 博主发起的投票st a as x} {if !!xlasllowtrav ctx -"thide">logv> >${aonerdiv clas<#--"#" ta"#" ta投票给} {t {v ;an title=klock nb friDet' Lw-fces friToOp_201an title=klztttsizn friToOp_201==1}} {t ztttttsizndirn" op_201== }, r "#" ta"#" ta“${譡 friToOp_201_r:fex]}”"#" ta"#" ta} {t zttt r ttttsa name="jsttttttsizn/di "#" ta"#" ta"#" ta"#" tali friTckn)} panShowt-C3t-C3sizndis onernk"'
    /锥绦blished:1, isto/"; //den;的永久链接tro魑猟en;的唯一标识} v < 200s = 1"; //den;标签,以英文逗号分隔> 纾"标签1,标签2"} v < Sv> P"bdix = 1023_04"锥绦"
    /"; // 的主页地址tro魑 的唯一标识} v < Params = 1&num=5&:12e=3&pf=锥绦
    ="mbsp. v id/p;&/dc0 fcdp;&asW"mbsp.博縪n" iptn} "/s=""} 33"#" targs=""} "/s=""} "#" targs=""} 33"#" targs=""} 33"#" targs=""} 33"#" targs=""} 33} "s="fc03 nouwkg hon}

    页脚> 8aame}/">我的照片书<#--} 999999" iame}/">( las 风格<#--} 999999" iame}/">( <#--} 999999" iame}/">( rss/vname thide"$_spanCite">(> 8aaowtr$_foot_sub ibpon" iame}/">l" targlogv icn icn-919oc"#" targpanShlogv> 8a>订阅此 <#--as } "/s=""} 9999" {list 8n>a> 公司/FON所有"#" ta"copy;1997-nam8 "/s=""} "/s="""/s=""} 9999"!--[iznoc IE 6]n" s=""历蔿owtr锥绦- mailEnteight="1我要"999 x} {rows="m-l喑蘳="m-l ="lasllowtr" -lassa="i99"a"dc0="t/blog/i {elseipft;axt?act=qbblogpo "bdwa bdc0 phelp"
    frsl" targpancpv ic1v ic1-4on"#" ta"/ >} "x.ame}/">pft;axt?act=qbblogpo "bdwa bdc0 p锥绦"
    9999"s="fc03 nougrp{/lia>g} s="n} 9999ock nbx.l nbwyan title=nigx.ame}/">itm/blog.1 "bdwaer: erNickn ="siznn of(y.v)nk"12\low'} niob r-jst-2"a name="jst" 99 x} {rows="m-l喑蘳="m-l ="lasllowtr" -lassd="i sizndefif"d('wl')}} {99ock nbwl nbw-fitm/blog.1 "bdwaer: erNickn ="v}{/lia>n} -- r-jst-2"> ni r a name="jst" s="n} ">
    0' > 3', > 1' > 4', > 2' > 5', > 3' > 6', > 4' > 7', > 5' > 9'}};} Db> v> rvickn = '01/21/2am8 18:55:46';} itorName)api = '0099179api>锥绦e==visito';} itorName)msg = '0099179api>锥绦e==visitomsg/mar';} itorName)mar = '0099179api>锥绦e==visitodiv> /mar';} itorName)vcd = '0099179api>锥绦e==visitowa /wa tcha.jpgx?p:2,ntId=80745891 <';} itorName)mrt = '0099179b.312.126.net/ p.vibliyle/mbox/';} itorName)lank= '0099179os>锥绦e==visito idmon/aviv> s=';} itorName)lan2= '0099179os>锥绦e==visito idmon/aviv> s=';} itorName)passportlank= '0099179os>锥绦e==visito idmon/aviv> passport<';} itorName)fpr = '0099179b.312.126.net/ idmon/portrait/c00&/p;nbsew/';} itorName)l60k= '0099179b.312.126.net/ idmon/c00&60.pow';} itorName)f://= '0099179b.312.126.net/ idmon/c00&://.pow';} itorName)f40k= itorName)f://;} itorName)adf://= '0099179b.312.126.net/ idmon/admi"bd00&://.pow';} itorName)ept = '0099179b.312.126.net/ idmon/&a;ty.pow';} itorName)guto.
    to/博客/.cossdo .博客"t=2am00np5st" id="m- } 99999,'ud>锥绦e==visitst" id="m- } 99999} 99999} 99999]} ,cj:[-3]} ,c m} ,cm:["",r锥绦/",rlocum/",rmusic/",r喑蘬et_2on/",rFollow'/",rprof hr/",rppr/hi/",r",re="oarchiv la]} ,cf:0} ,c pvhmcon:} 9999,ti:111431793} 9999,tgood} 9999,tc:0} 9999,tl:3} 9999,ut:0} 9999,ugood} 9999,umood} 9999,ui:0} 9999,ud:tru>}} ,cp:{nr:1} 9999,cr:1} 9999,vrrecom} 9999,fr:0${a.us,cs:0} ,ct:{'nav':['首页',

    d} 99,>${aoner:'ame="soud} 99,{x.visitorNickn64138208516450} 99,basp :'0099179div> >锥绦e==visit/d} 99,glow '他d} 99, <:'div>

    to d} 99,k">to d} 99,TOKEN_HTMLMODULEood} 99,isMultiU B短衕mcon:} 999,isWumiU :tru>} 99,sR/hirecom} };} " iptn} 9999">
    b1.312.126.net/ p.vibr/j/pc.js?v=15118550, 884on" iptn} 9999">
    b1.312.126.net/ p.vibr/j/m/iv /pm.js?v=15118550, 884on" iptn} 99"> ().bspickn();} " iptn} "> ();a=s.cts zeEv> (o)statum=s.bspEv> sBy200oner(o)[0];a.async=1;a.g" fg;m.p:2,ntN12e.in tBe e(a,m)} })(怯泻芏,docu ,' ipt', //er="alsw:h-abloytics" id/abloytics"js', ga');} } ga('cts ze', 'UA-692049di-1', ';nbs');} ga('slow', 'p.viview');} },300);} } } } " iptn } } } " ipt n =" {/javi ipton} 9怯泻芏.k:-icknout(funt_2on(){} e J.lm:1S ipt('0099179music.ph.126.net/ph.js?0 1');} e } e J. Db>aByDWR(itorName)mar,'MusicBeanNew',' et体内容描蔒usicSess2onToke 's );} },m000);} " iptn} } } " iptn} 怯泻芏.k:-icknout(funt_2on(){} r ipt = docu .cts zeEv> (' ipt');} 9999 ipt.asynck= 1;} 9999 ipt.g" k= '00991791.312.126.net/ regb bd/dcs/js/锥绦_aswlf_V3_1.js';} docu .body.applowChild( ipt);} 9999 },300);} } " iptn } 9">