Expand my Community achievements bar.

WebcamPublisher null error at line 1066

Avatar

Level 1

Hello.

I don't know if this was reported or not but is a very weird situation.

I have two buttons to start an AudioPublisher and an WebcamPublisher.

<rtc:WebcamPublisher id="wcPublisher" />

<rtc:AudioPublisher id="audioPublisher"/>

<mx:Button
      toggle="true" id="camButt" click="handleClickVideo()"/>
<mx:Button

      toggle="true" id="btnMic" click="handleClickMic()"/>

In those methods if the button is selected i publish or stop. On first time everything works properly, I can start microphone alone, start camera alone, stop both. After I stop the camera and try to start the microphone again I receive two null errors from WebcamPublisher, not from AudioPublisher. This is weird, there are any connections between webcamPublisher and audioPublisher for the same session? As I check the sources at line 1066 is the onNetStatus method and at 1075 is making the same call _stream.send(), both giving null. Maybe because I stop the webcamPublisher is making the _stream null.

I'm using the Flex SDK for FP10. Can you please tell me if is something that I miss?

Thank you,

andrei.

5 Replies

Avatar

Former Community Member

Hi

I tried to reproduce your example but it doesn't happen on my side. I am attaching the example file as you mentioned.

I started camera, started audio, stopped audio, stopped camera and then again started audio. I did this many times but I can't reproduce the null you mentioned. i am using Flash Builder 2 and SDK 10. Can you try my example and see if you can reproduce or modify my example and send it back to me in case it still happens

Thanks

Regards

Hronmay Basu

Avatar

Level 1

Hello.

Thank you for your response. I'll modify the code you send it to get closer to my case. I'm usign Flex 3.4 SDK and Flash Player 10.

Have a nice day,

andrei.

Avatar

Level 1

Hello.

I've modified your code and add the changes that I've done on my code. I couldn't replicate the error.

After I made some tests in my project and still getting the error I went in your code and instead of integrating the afcs.swc library I've copied the source files for player10. Then I could replicate the error also in your project(the project with your code). I've set a if on line 1066 and 1075 to check if the stream is null and it fixed (the sound was working without microphone).

I think is ok if I'll use the source files instead of afcs.swc library.

If you find a connection why the AudioPublisher can get bound with WebcamPublisher may give me an ideea why this is happening. I forgot to say that in my session I also have an AudioSubscriber and WebcamSubscriber to listen the publisher.

Thank you,

andrei.

Avatar

Former Community Member

Hi,

That’s interesting. Do the afcs.swc and source are not syncd from same version? I will verify it on my side. Which file you made the source changes ?

Thanks

Hironmay Basu

Avatar

Level 1

Hello.

I've modified the WebcamPublisher.as at line 1066 and 1075. A simple if(_stream != null).

I don't know if copying the sources and removing the library was the problem. Another thing that I remember now and maybe has something with this was that in the same browser I may left open some tabs with my project. But still I don't think if is relevant.

Thanks,

andrei.