header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
nicky
Points:0
Posts:0

9/30/2010 8:27:55 AM

Title: shared objects with net connection in red5


hi,
how to create multiple shared objects in the client side using flex with for streaming video ,audio and text msgs thru red5.
as my question was unanswered (video freezes in a minute).
if netconnetion is sucess can we call the below function
public function connectComponents():void
{
SharedObject.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
users_so = SharedObject.getRemote("room_"+sessid_Str, nc.uri, false);
users_so.addEventListener( SyncEvent.SYNC, usersSyncHandler );
users_so.client=this;
users_so.connect( nc );

msgs_so=SharedObject.getRemote("message",nc.uri,false);
msgs_so.addEventListener(SyncEvent.SYNC,msgSyncHandler);
msgs_so.client=this;
msgs_so.connect( nc );

}

is there any mistake in the above code as i m connecting 2 shared ojects with single netConnection?



1
bob_senior
Points: 1320
Posts:0
9/30/2010 9:03:56 AM



your code us fine. You only need to create a single connection with server and you can use that connection to create multiple netStream and shrared objects. There are configuration files on server where you can specify the limit of sharedobject and netstreams in connection. By default that limit is around 1500 for shared objects and 500 for netStreams as far as I remember in case of FMS. Other servers like RED5 and WOWZA must be having similar values. So that's not the problem.

why are you using Object Encoding as AMF0 any specific reason ? That can be the cause of problem.
SharedObject.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;

I will check your thread regarding video freeze

2
nicky
Points: 0
Posts:0
10/1/2010 1:22:55 AM



hi,
thanku for reply and chk out my link (http://askmeflash.com/qdetail/1190/red5-video-and-audio-streaming). for the actual problem i m facing.video freezes in 1 minute and 20secs always in the air application and in web application the video just appears and stop.like a snapshot. im gettting the netStream status like netstream.play.unpublishNotify and Badname...?
thanks in advance.

3
nicky
Points: 0
Posts:0
10/8/2010 5:59:06 AM



hi bob_senior,
we have deployed the webApplication to live server and its working fine. But in the air applicaiton the video just appears and freezes, are there any security permissions ?
need ur advice.


4
bob_senior
Points: 1320
Posts:0
10/8/2010 6:17:58 AM



live streaming applications using some media server does not have security restriction on playing the content, since content is already being delivered by server and not being accessed. Anybody connected to server is already a authenticated person if required. If its some kind of security restriction then content will not be accessible at all and wont appear at all.

I think you should try installing other AIR version (Adobe AIR 1.5 or 2.0) which ever you are not using, so as to verify if its a technical issue in the player. Also see if it works on MAC and Windows, both have different AIR players technically.

5
nicky
Points: 0
Posts:0
10/12/2010 12:06:35 AM



hi bob_senior,
in both of my appln.s i have the same code for connecting to red5(url),sharedobj creation and handling the syncEvent. here in the syncHandler function if a user (person1)connected to red5 , tht userName will enter into the function and it starts publishing the video. if i run other application ,the other user(person2) connected then person1 and person2 will again enter into the function and its giving netstream.publish.Badname error. i think this is the main problem. due to tht error it is not able to publish the video. how to restrict the 1st user as he already entered and started publishing video.due to this error its giving the status as unpublishNotify and it stops playing the video. i haven't seen this kind of issue. any help is appreciated.


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 5+1 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions