nexmo-se / video-api-effects

MIT License
4 stars 8 forks source link

Camera indicator light is ON unless BackgroundEffectProcessor#destroy is called #17

Open brian17han opened 2 years ago

brian17han commented 2 years ago

I created a new BackgroundEffectProcessor and it uses my camera's MediaStreamTrack as the input stream. When I call publisher.publishVideo(false) the camera indicator light is still ON. Calling mediaStreamTrack.enabled = false and mediaStreamTrack.stop() won't turn the light OFF. I had to call backgroundEffectProcessor.destroy() to make the camera indicator light go OFF. Also, I had to use publisher.destroy() to make the browser tab right dot (screen recording) go away. Thank you for your help.

Brower: Chrome 102.0.5005.61 OS: Mac OS 12.4 SDK: OpenTok.js 2.22.5 + video-api-effects 1.0.0-rc3

enricop89 commented 2 years ago

Hi @brian17han, we are aware of this limitation. Unfortunately the issue is not with the library itself but with Opentok JS SDK because if you specify a videoSource:MediaTrack, the publishVideo(false) function will not close the stream.

As for now, the only solution is to destroy the processor.

brian17han commented 2 years ago

Thanks, Enrico. So every time I enable the camera, I will have to create a new processor? Did anyone file a ticket for this issue to OpenTok?

enricop89 commented 2 years ago

This library is gonna be deprecated soon - Opentok JS now fully supports BBlur https://tokbox.com/developer/sdks/js/reference/Publisher.html#applyVideoFilter

brian17han commented 2 years ago

Oh, that’s unfortunate. Will they support virtual background soon? Thanks.

enricop89 commented 2 years ago

@brian17han yes they will :)