Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

webcamPublisher.isPublishing unreliable

Avatar

Level 2

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
1 Reply

Avatar

Level 2

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