mnkdon / flash-videoio

Automatically exported from code.google.com/p/flash-videoio
0 stars 0 forks source link

Determine when connection is successful #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First reported by dima <dganenko@gmail.com> on Mar 5, 2011.

Summary task is to add another indication to the Javascript when connection is 
successfuly, e.g., using "connected" boolean property. Also make sure that 
"src" resets to null if connection fails.

--

Yes, exactly, I had not thought about this... :)
And another one question: how I can verify that my connection to
siprtmp and sip registration is succesful?

Thanks,
--
Hi,

When your NetConnection.connect to siprtmp is successful, it means
your SIP REGISTER was successful. If SIP REGISTER fails, then your
NetConnection.connect will also fail. If you use Flash-VideoIO, then
your "src" property will reset to null. Basically in your Javascript,
you should get onPropertyChange callback with "src" property changing
to null, if your NetConnection.connect fails. (I haven't tested this,
but just looking at the code this seems to be the case. Please let me
know if this doesn't work as expected, and I will try fixing it.

Regards,
Kundan
--
I'm not shure what I must check when src changing:

function onPropertyChange(event) {
 if (event...) ...

}
--
Hi

I checked it, and looks like it is a bug that it does not send
onPropertyChange for "src". I will fix this and let you know.

In any case, you would test it as follow:

function onPropertyChange(event) {
   if (event.property == "src" && event.newValue == null) {
       // this means the SIP register failed.
   }
}

I will fix the bug, and let you know. Also, on second thought, it
might be useful to expose another property named "connected" to
indicate whether NetConnection.connect has been successful or not.

Thanks for pointing this out!
--
Hello,

Does VideoPhone applcation (from rtmplite) support javascript api? I
see in source code ExternalInterface.addCallback("invite",
connector.invite) but when I try to call this function from javascript
nothing happens with error "getFlashMovie('phone').invite is not a
function"
Or may be possible to get source code for videoio only with SIP call
functionality? :)
--
I'm sorry, all working. Flash object id and name in my page was
different :)

Original issue reported on code.google.com by kundan10 on 10 Mar 2011 at 10:16

GoogleCodeExporter commented 9 years ago

Original comment by kundan10 on 25 May 2011 at 7:22