When using a webcamPublisher and listening to the change event I only get an event fired when the camera starts publishing, but not when it stops.
change | event |
flash.events.Event
Dispatched when the camera is accessed for publishing or is stopped.
If I use the isCameraPublishing event instead, then I will get an event fired when I stop or start the camera.
isCameraPublishing | event |
The only difficult part, and maybe this can be changed in the docs (or maybe I should just know better) is that this isCameraPublishing event needs to be setup like this: webPub.addEventListener("isCameraPublishing", webPubChange); because in your code it is dispatched like this: dispatchEvent(new flash.events.Event("isCameraPublishing")); Maybe I'm just lazy but I'm so used to using the class to define the event name that I expected to be able to do this at first webPub.addEventListener(flash.events.Event.isCameraPublishing, webPubChange);
Just reporting what looked like odd behavior to me.
-Eric
Views
Replies
Total Likes
Hi,
For stopping, you need to listen to STREAM_DELETE event. You can look at player 9 source for reference. isCameraPublishing is only fired when camera starts.
Thanks
Hironmay Basu
Views
Replies
Total Likes
isCameraPublishing fires when I do this webPub.stop(); is that not supposed
to happen?
Views
Replies
Total Likes
Yes,
You can use that event to check webcamPub.isPublishing whether its publishing or not. That code is same for 9 and 10.
Thanks
Hironmay Basu
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies