Open brian17han opened 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.
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?
This library is gonna be deprecated soon - Opentok JS now fully supports BBlur https://tokbox.com/developer/sdks/js/reference/Publisher.html#applyVideoFilter
Oh, that’s unfortunate. Will they support virtual background soon? Thanks.
@brian17han yes they will :)
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. CallingmediaStreamTrack.enabled = false
andmediaStreamTrack.stop()
won't turn the light OFF. I had to callbackgroundEffectProcessor.destroy()
to make the camera indicator light go OFF. Also, I had to usepublisher.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