0 Replies Latest reply on Apr 25, 2007 3:55 AM by deardaniel

    streaming Audio and Video

    deardaniel
      hi every one
      How do i streaming Audio and Video to fms from flex i have written this code but doesnt works when i run it the netstatus message is showed as publish start success but i cant play it .....

      actually i am doing audio and video chat...

      the code i hav written is...


      public function pushbut():void
      {
      pushbut_enabled = !pushbut_enabled;
      if(pushbut_enabled == true)
      {
      pub = new NetStream(conn);
      pub.addEventListener(NetStatusEvent.NET_STATUS,netStat);
      net = new NetStream(conn);
      net.addEventListener(NetStatusEvent.NET_STATUS,netStat);

      var Mic:Microphone = Microphone.getMicrophone(1);
      if(Mic)
      pub.attachAudio(Mic);

      var Cam:Camera = Camera.getCamera(client_username);
      if(Cam)
      {
      camimage.source = "";
      Cam.setQuality( 16384 / 4, 0 );
      Cam.setMode( 160, 120, 15, false );
      Cam.setLoopback( true );
      pub.attachCamera(Cam);
      }

      pub.publish(friendsname,"live");


      var vi:Video = new Video();
      vi.attachNetStream(net);
      friends_video.video = vi;
      net.play(friendsname);

      var vmy:Video = new Video();
      vmy.attachNetStream(net);
      net.play(client_username);

      my_video.video = vmy;
      phone.alpha = 1;
      }
      else
      {
      net.close();
      pub.close();
      phone.alpha = 0.50;
      }
      }

      actually this function is excuting when i click a button and pushbut_enabled is a flag variable which is initially false....