整理资料的时候,发现电脑里保存了一些ASX文件。这些文件原来是玩MSN空间时用到的,主要用于在MSN空间上安装播放器。很久没玩MSN空间了,虽然现在也还在用MSN,但MSN空间的速度真的是慢得让我难以接受,所以还是不用MSN空间。顺便分析一下ASX文件的格式,以方便那些还在用MSN空间的朋友。
给你补充一下
点开连接打开一个播放器,就感觉太不专业了~不如直接点连接,在本页播放
把下面保存为html文件就可以了~
<object
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" id="wmp" width="0" height="0"
style="width:400px;height:300px;">
</object>
<a herf="#" onclick="wmp.URL='http://www.anyshine.com/yourfile.asx'">播放音乐</a>
//基本属性
wmp.URL:String; //指定媒体位置,本机或网络地址
wmp.uiMode:String; //播放器界面模式,可为Full, Mini, None, Invisible
wmp.playState:integer; //播放状态,1=停止,2=暂停,3=播放,6=正在缓冲,9=正在连接,10=准备就绪
wmp.enableContextMenu:Boolean; //启用/禁用右键菜单
wmp.fullScreen:boolean; //是否全屏显示
//播放器常用控制
wmp.controls.play; //播放
wmp.controls.pause; //暂停
wmp.controls.stop; //停止
wmp.controls.currentPosition:double; //当前进度
wmp.controls.currentPositionString:string; //当前进度,字符串格式。如“00:23”
wmp.controls.fastForward; //快进
wmp.controls.fastReverse; //快退
wmp.controls.next; //下一曲
wmp.controls.previous; //上一曲
//播放器常用设置
wmp.settings.volume:integer; //音量,0-100
wmp.settings.autoStart:Boolean; //是否自动播放
wmp.settings.mute:Boolean; //是否静音
wmp.settings.playCount:integer; //播放次数
wmp.settings.balance = -100; //(左声)
wmp.settings.balance=100; //(右声)
wmp.settings.balance=0; //(全声)
//常用当前媒体属性
wmp.currentMedia.duration:double; //媒体总长度
wmp.currentMedia.durationString:string; //媒体总长度,字符串格式。如“03:24”
wmp.currentMedia.getItemInfo(const string); //获取当前媒体信息
//"Title"=媒体标题 "Author"=艺术家 "Copyright"=版权信息
//"Description"=媒体内容描述 "Duration"=持续时间(秒)
//"FileSize"=文件大小 "FileType"=文件类型 "sourceURL"=原始地址
wmp.currentMedia.setItemInfo(const string); //通过属性名设置媒体信息
wmp.currentMedia.name:string; //同currentMedia.getItemInfo("Title")
wmp.network.bufferingProgress; //缓冲百分比
wmp.network.downloadProgress; //下载百分比
转载
http://www.anyshine.com/blog/v/anyshine/archives/2008/293.asp
文章评论
共有 位脚本之家网友发表了评论我来说两句