쓸만한 글

미디어 플레이어 제어하기

봄돌73 2006. 6. 23. 11:41
출처 : http://blog.naver.com/ceox?Redirect=Log&logNo=140021315882




미디어 플레이어의 버퍼링http://myhome.naver.com/v2i/answer/media/mediaplayer2.htm

 

미디어 플레이어 구간 제어http://myhome.naver.com/v2i/answer/media/mediaplayer1.htm

 

<html>
<head>
<title> 미디어 플레이어 제어 </title>

</head>

<body>
<OBJECT ID="Player"
  CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
  <PARAM name="autoStart" value="True">
  <PARAM name="URL" value="mms://mmc.daumcast.net/mmc/1/500/0902600000101h.wmv ">
</OBJECT>

<SCRIPT FOR="Player" EVENT="buffering(Start)">
var idTimer;
if(Start == true)
{
 idTimer = setInterval("setStatus()", 1000); 
}
else
{
 clearInterval(idTimer);
}
</SCRIPT>
<SCRIPT FOR="Player" EVENT="StatusChange()">
window.status = Player.status;

</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!--
function setStatus()
{
 var bf = parseInt(Player.network.bufferingProgress);
 if(bf < 100)
 {
  window.status = "버퍼링 중 : " + bf + " %";
 }
 else
 {
  window.status = "버퍼링 완료";
 }
}

//-->
</SCRIPT>
</body>
</html>







<html>
<head>
<title> 미디어 플레이어 제어 </title>
</head>

<body>
<OBJECT ID="Player"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
<PARAM name="autoStart" value="True">
<PARAM name="URL" value="mms://mmc.daumcast.net/mmc/1/500/0902600000101h.wmv">
</OBJECT>
uiMode<select onchange="setUI(this.options[this.selectedIndex].value)">
<option value="invisible">invisible
<option value="none">none
<option value="mini">mini
<option value="full">full
</select>
<input type="button" value="volume +10" onclick="setVol('+')">
<input type="button" value="volume -10" onclick="setVol('-')">
mute <input type="checkbox" onclick="mute(this.checked)">
<input type="button" onclick="setPos(-10)" value="10초 전">
<input type="button" onclick="setPos(10)" value="10초 뒤">
<input type="button" onclick="Player.controls.play();" value="재생">
<input type="button" onclick="Player.controls.stop();" value="정지">
<input type="button" onclick="Player.controls.pause();" value="일시정지">

<SCRIPT LANGUAGE="JavaScript">
<!--
function setUI(str)
{
Player.uiMode = str;
}
function setPos(v)
{
Player.controls.currentPosition += v;
}
function setVol(flag)
{
if(flag == '+')
Player.settings.volume += 10;
else
Player.settings.volume -= 10;
}

function mute(stat)
{
if(stat)
Player.settings.mute = true;
else
Player.settings.mute = false;
}
//-->
</SCRIPT>
</body>
</html>
<script language=javascript>
<!--
document.write("<iframe src='http://lcs.naver.com/u{"+document.URL+"}' width=0 height=0 frameborder=0></iframe>");
//-->
</script>