Highlighted

webcamPublisher.isPublishing unreliable

Avatar

Avatar

baduncaduncan

Avatar

baduncaduncan

baduncaduncan

05-12-2011

Another bug report, unless I'm understanding this property wrong.

Code:

                              protected function cameraToggleBtn_clickHandler(event:MouseEvent):void

                              {

                                        if (!webCamPub.isPublishing){

                                                  webCamPub.connectSession = cSession;

                                                  webCamPub.publish();

                                        }

                                        else{

                                                  webCamPub.stop();

                                        }

                              }

Here's the scenario:

  1. Click a button (to turn on the webcam)
  2. Call WebcamPublisher.publish() from the event handler
  3. Webcam turns on (I see a green light on my laptop) and I see myself on stream
  4. Click the button again with a breakpoint at webcamPublisher.isPublishing
  5. Still returning false, unable to get to the stop(); portion of the else block

Replies

Highlighted

Avatar

Avatar

baduncaduncan

Avatar

baduncaduncan

baduncaduncan

05-12-2011

Forgot to add, I'm using the spark_lccs swc (in case it matters)