JavaScript์˜ navigator ๊ฐ์ฒด๋Š” plugins ๊ฐ์ฒด๋ฅผ ์ž์‹์œผ๋กœ ๊ฐ–๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ด ๊ฐ์ฒด๋Š” ๋ฐฐ์—ด์˜ ๊ตฌ์กฐ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š”๋ฐ ๋ธŒ๋ผ์šฐ์ €์— ์„ค์น˜๋˜์–ด์žˆ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ๋งˆ๋‹ค ๊ฐ๊ฐ ํ•˜๋‚˜์˜ ์—”ํŠธ๋ฆฌ ํฌ์ธํŠธ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. navigator.plugins ๊ฐ์ฒด๋Š” Netscape, Firefox ๊ทธ๋ฆฌ๊ณ  Mozilla ์—์„œ๋งŒ ์ง€์›ํ•ฉ๋‹ˆ๋‹ค.

์•„๋ž˜ ์˜ˆ์ œ๋Š” ๋ธŒ๋ผ์šฐ์ €์— ์„ค์น˜๋˜์–ด์žˆ๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ๋“ค์˜ ๋ชฉ๋ก์„ ๋ชจ๋‘ ์ถœ๋ ฅํ•˜๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.  

<html>
<head>
<title>List of Plug-Ins</title>
</head>
<body>
<table border="1">
<tr>
    <th>Plug-in Name</th>
    <th>Filename</th>
    <th>Description</th>
</tr>
<script language="JavaScript" type="text/javascript">
for (i=0; i<navigator.plugins.length; i++) {
   document.write("<tr><td>");
   document.write(navigator.plugins[i].name);
   document.write("</td><td>");
   document.write(navigator.plugins[i].filename);
   document.write("</td><td>");
   document.write(navigator.plugins[i].description);
   document.write("</td></tr>");
}
</script>
</table>
</body>
</html>

 


ํ”Œ๋Ÿฌ๊ทธ์ธ ๊ฒ€์‚ฌ

๊ฐ ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ๋ฐฐ์—ด์— ํ•˜๋‚˜์˜ ์—”ํŠธ๋ฆฌ๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ฐ ์—”ํŠธ๋ฆฌ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์†์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

  • name - is the name of the plug-in.

  • filename - is the executable file that was loaded to install the plug-in.

  • description - is a description of the plug-in, supplied by the developer.

  • mimeTypes - is an array with one entry for each MIME type supported by the plug-in.

์•„๋ž˜ ์˜ˆ์ œ๋ฅผ ํ•œ๋ฒˆ ๋ณด์‹ค๊นŒ์š”? 

<html>
<head>
<title>Using Plug-Ins</title>
</head>
<body>
<script language="JavaScript" type="text/javascript">
media = navigator.mimeTypes["video/quicktime"];
if (media){
  document.write("<embed src='quick.mov' height=100 width=100>");
}
else{
  document.write("<img src='quick.gif' height=100 width=100>");
}
</script>
</body>
</html>

video/quiktime ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์„ค์น˜๋˜์–ด์žˆ๋Š”์ง€๋ฅผ ๊ฒ€์‚ฌํ•œ ๋’ค, ์„ค์น˜๊ฐ€ ๋˜์–ด์žˆ์œผ๋ฉด quick.mov๋ฅผ embedํ•˜์—ฌ ํ”Œ๋ ˆ์ด ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋„๋ก ํ•˜์˜€๊ณ  ์„ค์น˜๊ฐ€ ๋˜์–ด์žˆ์ง€ ์•Š์œผ๋ฉด quick.gif๋ผ๋Š” ์ด๋ฏธ์ง€ ํŒŒ์ผ์„ ๋ณด์—ฌ์ฃผ๋„๋ก ํ•˜๋Š” ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค. 

 


๋ฉ€ํ‹ฐ๋ฏธ๋””์–ด ๋‹ค๋ฃจ๊ธฐ

๋Œ€๋ถ€๋ถ„์˜ ๋ธŒ๋ผ์šฐ์ €์—์„œ ๋™์ž‘ํ•˜๋Š” ์˜ˆ์ œ๋ฅผ ํ•œ๋ฒˆ ๋ณด๋„๋ก ํ•  ๊นŒ์š”???

<html>
<head>
<title>Using Embeded Object</title>
<script type="text/javascript">
<!--
function play()
{
  if (!document.demo.IsPlaying()){
    document.demo.Play();
  }
}
function stop()
{
  if (document.demo.IsPlaying()){
    document.demo.StopPlay();
  }
}
function rewind()
{
  if (document.demo.IsPlaying()){
    document.demo.StopPlay();
  }
  document.demo.Rewind();
}
//-->
</script>
</head>
<body>
<embed id="demo" name="demo"
    src="http://www.amrood.com/games/kumite.swf"
    width="318" height="300" play="false" loop="false"
    pluginspage="http://www.macromedia.com/go/getflashplayer"
    swliveconnect="true">
</embed>
<form name="form" id="form" action="#" method="get">
<input type="button" value="Start" onclick="play();" />
<input type="button" value="Stop" onclick="stop();" />
<input type="button" value="Rewind" onclick="rewind();" />
</form>
</body>
</html>

์œ„ ์˜ˆ์ œ๋Š”  

http://www.amrood.com/games/kumite.swf ํŒŒ์ผ์„ ๋กœ๋”ฉํ•ด์„œ ํ™”๋ฉด์— ๋ณด์—ฌ์ฃผ๋Š”๋ฐ,
Start๋ฒ„ํŠผ์„ ๋ˆ„๋ฅด๋ฉด kumite.swfํŒŒ์ผ์ด ์‹คํ–‰์ด ๋˜๋ฉด์„œ ํ”Œ๋ž˜์‰ฌ๊ฒŒ์ž„์ด ์ง„ํ–‰์ด ๋˜์•ผ ํ•˜๋Š”๋ฐ,
์ œ ๋ธŒ๋ผ์šฐ์ €์—์„œ๋Š” ๋™์ž‘์„ ์•ˆํ•˜๋„ค์š”? ใ…‹ใ…‹ ์™œ ์•ˆ๋˜๋Š”์ง€ ์ด์œ ๋ฅผ ๋ฐํ˜€์„œ ์˜ฌ๋ฆฌ๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค. ใ…‹ใ…‹
(embedํƒœ๊ทธ์˜ play์˜ต์…˜์„ true๋กœ ์ฃผ๋ฉด ์‹คํ–‰์ด ๋˜๋Š”๋ฐ ์•„๋งˆ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ์—์„œ ์‹คํ–‰ํ•˜๋Š” ๋ฐฉ๋ฒ•์ด
์˜ˆ์ œ์— ๋‚˜์™€์žˆ๋Š” ๊ฒƒ๊ณผ ๋‹ฌ๋ผ์ง„๊ฒƒ์ด ์•„๋‹Œ๊ฐ€ ์‹ถ๋„ค์š”.)

 --------------------------

swfํŒŒ์ผ ์‹คํ–‰์‹œํ‚ค๋Š” ๊ฑฐ ํ•œ์ฐธ ์ฐพ์•„๋ดค๋Š”๋ฐ๋„ ์ž˜ ๋ชจ๋ฅด๊ฒ ๋„ค์š”. UI์ชฝ์€ ์—ญ์‹œ ํž˜๋“ค๊ตฐ์š”...์•„ํ‘....

์•„์‹œ๋Š” ๋ถ„ ๊ณ„์‹œ๋ฉด ๋Œ“๊ธ€์ข€ ๋‚จ๊ฒจ์ฃผ์„ธ์š” ใ… ใ…  

 

 

Reference : http://www.tutorialspoint.com/javascript/javascript_multimedia.htm