RedBox not shared all videos

Post your questions and bug-reports about the audio/video streaming add-on based on Red5 Media Server.

Moderators: Lapo, Bax

rafaelcosta
Posts: 2
Joined: 25 Aug 2010, 23:42

RedBox not shared all videos

Postby rafaelcosta » 30 Oct 2010, 21:52

Hi,

I'm trying use RedBox in my applications but I'm having many errors. The main of than it's my VideoContainer it's not loading videos from the others users.
Each user has 1 video (it's 8 on total). They can see the others webcans, but when called attachNetStream in my Video() reference, it's doesn't appears nothing.
Someone can help me ?

Im my flash tracer, all instances it's ok. And not dispatch error :( only not show video

Ohhh, one detail....In MY Computer, ALL works. Only in my...

The main code is:

Code: Select all

private function _join():void
{
   for each(var liveCast:LiveCast in _avCastControl.getAvailableCasts())
   {
      _addLiveCast(liveCast);
   }
   
   var myStream:NetStream = _avCastControl.publishLiveCast();
   
   if (myStream != null)
   {
      _video.attachCamera(Camera.getCamera(_doMacFix()));
   }
}

private function _addLiveCast(liveCast:LiveCast):void
{
   var stream:NetStream = _avCastControl.subscribeLiveCast(liveCast.id);
   
   if (stream != null)
   {
      var player:PlayerGame = getPlayerById(liveCast.userId);
      player.attachStream(stream);
   }
}



// In Player.as:

public function attachStream(stream:NetStream):void
{
   _video.attachNetStream(stream);
}



Very thanks!
rafaelcosta
Posts: 2
Joined: 25 Aug 2010, 23:42

bug removed!!!

Postby rafaelcosta » 30 Oct 2010, 22:24

The publishLiveCast() method in AVCastManager Class, myLiveCast call attachCamera(getCamera()), but it not work in many computers. (probally is flash bug)
I created a method to be called by parameter on getCamera(), this is it:

Code: Select all

// Attach cam and mic to the stream
if (enableCamera)
   myLiveCast.attachCamera(Camera.getCamera(_doMacFix()))

private function _doMacFix():String
{
   if (Capabilities.os.indexOf("Mac OS") > -1)
   {
      var i:int;
      var length:Number = Camera.names.length;
      while(i < length)
      {
         if (Camera.names[i] == "USB Video Class Video")
         {
            return i.toString();
         }
         i++;
      }
   }
   return int(0).toString();
}
[/code]

Return to “RedBox”

Who is online

Users browsing this forum: No registered users and 18 guests