28,390
社区成员
发帖
与我相关
我的任务
分享
<OBJECT ID="mymhcbPlay" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject"
width="0" height="0"
style="position:relative;left:0px; top:0px;width:0px;height:0px;">
<param name="autoStart" value="true" />
<param name="balance" value="0" />
<param name="baseURL" value="" />
<param name="enableErrorDialogs" value="false" />
<param name="enableContextMenu" value="false" />
<param name="currentPosition" value="0" />
<param name="currentMarker" value="0" />
<param name="fullScreen" value="false" />
<param name="invokeURLs" value="false" />
<param name="mute" value="false" />
<param name="playCount" value="0" />
<param name="rate" value="1" />
<param name="volume" value="100" />
<param name="URL" value="陈 瑞 - 最后一个情人.wma" />
<param name="uiMode" value="none" />
</OBJECT>
<span id="id3"></span>
<script for="mymhcbPlay" event="PlayStateChange(newState)">
if (newState==3) {
setTimeout(function() {
document.getElementById("id3").innerHTML = getID3().join("<br/>");
}, 500)
}
</script>
<script>
function getID3() {
var id3 = [];
var media = document.getElementById("mymhcbPlay").currentMedia;
var str = media.getItemInfo("Album");
if (str!="") id3.push("专辑: " + str);
str = media.getItemInfo("title");
if (str!="") id3.push("标题: " + str);
str = media.getItemInfo("FileType");
if (str!="") id3.push("文件类型: " + str);
str = media.getItemInfo("Copyright");
if (str!="") id3.push("版权: " + str);
str = media.getItemInfo("Author");
if (str!="") id3.push("艺术家: " + str);
str = media.getItemInfo("Description");
if (str != "") id3.push("注释: " + str);
str = media.getItemInfo("FileSize")/1024/10.24;
str = Math.round(str) / 100;
id3.push("文件大小: " + str + " MB");
str = media.duration;
str = Math.round(str);
var min = str % 60;
var sec = (str - min) / 60;
id3.push("持续时间: " + min + "分" + sec + "秒");
return id3;
}
</script>
// 在音乐开始播放后,在延迟一点时间(比如一秒后) 调用下面的函数
function getID3() {
var id3 = [];
var media = document.getElementById("mymhcbPlay").currentMedia;
var str = media.getItemInfo("Album");
if (str!="") id3.push("专辑: " + str);
str = media.getItemInfo("title");
if (str!="") id3.push("标题: " + str);
str = media.getItemInfo("FileType");
if (str!="") id3.push("文件类型: " + str);
str = media.getItemInfo("Copyright");
if (str!="") id3.push("版权: " + str);
str = media.getItemInfo("Author");
if (str!="") id3.push("艺术家: " + str);
str = media.getItemInfo("Description");
if (str != "") id3.push("注释: " + str);
str = media.getItemInfo("FileSize")/1024/10.24;
str = Math.round(sz) / 100;
id3.push("文件大小: " + str + " MB");
str = media.duration;
str = Math.round(str);
var min = str % 60;
var sec = (str - min) / 60;
id3.push("持续时间: " + min + "分" + sec + "秒");
return id3;
}