1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
| <table>
<tr>
<td>
<form action="" name="formular1"><font size="-1">
clip title:
<input type="text" name="clipTitel" size="30" readonly> <br>
author:
<input type="text" name="clipAuthor" size="30" readonly><br>
copyright:
<input type="text" name="clipCopyright" size="30" readonly>
</font></form>
</td>
<td width="280" align="center">
<OBJECT ID="MediaPlayer" width=320 height=240
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/
en/nsmp2inf.cab#Version=6,4,5,715"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM NAME="FileName" VALUE="mms://www.streaming-media.info/media/wm_demo.wmv">
<PARAM NAME="ShowControls" VALUE="False">
<PARAM NAME="ShowStatusBar" VALUE="False">
<EMBED type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
SRC="mms://www.streaming-media.info/media/wm_demo.wmv"
name="MediaPlayer"
width=320
height=240
autostart=1
showcontrols=0>
</EMBED>
</OBJECT>
<br>
<a href="#" onclick="document.MediaPlayer.Play()">Play</a>
<a href="#" onclick="document.MediaPlayer.Pause()">Pause</a>
<a href="#" onclick="document.MediaPlayer.Stop()">Stop</a><br>
<br></td>
<td>
<form action="" name="formular2"><font size="-1">
position:<br>
<input type="text" name="clipPosition" size="10" readonly> <br>
clip length:<br>
<input type="text" name="clipLength" size="10" readonly><br>
percent played:<br>
<input type="text" name="percPos" size="3" readonly><br>
play status:<br>
<input type="text" name="playerStatus" size="3" readonly>
</font></form>
</td></tr>
</table>
<script language="JavaScript">
function startCheckPlayer() {
window.setTimeout("checkPlayer()",1000);
window.setInterval("checkPlayerStatus()",1000);
}
function checkPlayerStatus() {
document.formular2.clipPosition.value = parseInt(document.MediaPlayer.currentPosition);
document.formular2.playerStatus.value = document.MediaPlayer.PlayState;
document.formular2.percPos.value = parseInt(document.MediaPlayer.currentPosition / document.MediaPlayer.duration*100);
}
function checkPlayer () {
document.formular1.clipTitel.value = document.MediaPlayer.GetMediaInfoString(8);
document.formular1.clipAuthor.value = document.MediaPlayer.GetMediaInfoString(9);
document.formular1.clipCopyright.value = document.MediaPlayer.GetMediaInfoString(10);
document.formular2.clipLength.value = parseInt(document.MediaPlayer.duration);
}
</script>
<script language="JavaScript">
window.setTimeout("startCheckPlayer()",2500);
</script> |
Partager