publisher.replaceTrack() setting publishVideo to true automatically?

Hi there, working on a webinar app and everything is going great for the most part. But I’ve hit another small snag today.

I want the user to be able to toggle between screen share and webcam. On top of that I have a video on/off button which just sets publisher.publishVideo(true/false).

That works great until I start switching between webcam/screenshare with publisher.replaceTrack(). It seems like replaceTrack is automatically setting publisher.publishVideo(true)?

Even when I try setting publisher.publishVideo(false) in the promise of replaceTrack(), the video (camera or webcam) gets published.

Anything I am missing here?

See commit openvidu-browser: fix echo when calling Publisher#replaceTrack · OpenVidu/openvidu@17ff910 · GitHub