xingyzt / mercator

Mercator Studio is a script that applies basic camera effects for Google Meet. (no longer actively developed)
https://x-ing.space/mercator
MIT License
58 stars 9 forks source link

Using with Visual Effects for Google Meet and then disabling/uninstalling Visual Effects for Google Meet disables recognition of camera #6

Open d-g-omel opened 3 years ago

d-g-omel commented 3 years ago

Installed Visual Effects for Google Meet and then installed Mercator Studio (Chrome). Disabling Visual Effects disabled Mercator Studio's recognition of camera. Re-enabling Visual Effects re-enabled camera recognition for Mercator Studio. Uninstalling Visual Effects had same result. Problem persists with uninstall and reinstall of Mercator Studio. If Visual Effects for Google Meet is installed, Mercator Effects will only recognize camera with Visual Effects enabled.

xingyzt commented 3 years ago

So the two extensions are clashing?

xingyzt commented 3 years ago

I don't have access to the source code of Visual Effects for Google Meet. I'll reach out to its developer and see what we can do to make them interoperable.

d-g-omel commented 3 years ago

Yes, I cannot uninstall/disable visual effects without it disabling Mercator's camera recognition. I get the orange and yellow colored bars in the preview panes. I have not tried to replicate the problem using another machine or account. Reinstalling or re-enabling the Visual Effects extension re-enables Mercator's recognition of the camera. I also did not provide you with the version of Chrome I am using: Version 84.0.4147.125 (Official Build) (64-bit)

xingyzt commented 3 years ago

Mercator stops the video when it detects something stopped using the stream. I think the problem now is differentiating who is triggering the inactive event, Visual Effects or Google Meet.

            new_stream.addEventListener('inactive',() => {
                old_stream.getTracks().forEach(track => {
                    track.stop()
                })
                context.clearRect(0,0,w,h)
                video.srcObject = null
            })