skip to main |skip to sidebar

2007-07-29

Flash-Ajax Video Component

最近,在Adobe Labs公开了一个 Flash-Ajax Video Component

什么是Flash-Ajax Video Component?

Flash-Ajax Video Component(FAVideo) 是一个轻量级的,开源的用 Ajax+Flash 来播放flv的组件。它可以运用在 Ajax 的程序里。它可以使在 Javascript 里控制 Video 像在 Flash 那样容易。

Hello World 程序

<html>
 <head>
  <title>Various ways to work with FAVideo</title>
  <script src="AC_RunActiveContent.js" type="text/javascript"></script>
  <script src="FAVideo.js" type="text/javascript"></script>
 </head>
 <body onLoad="">
  <div id="divOne"></div>
  <script type="text/javascript">
   playerOne = new FAVideo(
    "divOne", "demo_video.flv",0,0,{ autoLoad:true, autoPlay:true });
  </script>
  <script>
   playerOne.addEventListener("playheadUpdate",this,myHandler);
   playerOne.removeEventListener("playheadUpdate",this,myHandler);
   function myHandler() {
    //alert("eh");
   }
  </script>
 </body>
</html>

运行截图:

FAVideo Demo

没有评论: