Detect active Camera

Hello everyone!

I’m new to Zapworks and I’ve been struggling to work with the camera. I’ve been trying to achieve a very specific result: Change the content on screen based on the camera. Using front camera, will show something, using back camera will show other content.

I’ve seen ways to flip the camera, although that’s not what I need. I was wondering if is there any way to detect the active camera…

If not, is there any other solution you guys could suggest?

Thanks in advance,
Anderson.

1 Like

This post from Mark should help.
https://forum.zap.works/t/screenshot-or-animation-of-zapper-experience-and-social-sharing/928/6?u=stevesanerd

If you need more help let us know.

Steve

2 Likes

That’s exactly what I was looking for!

Thank you very much!

2 Likes

Your welcome.
Just let us know if you need anything else. :smile:

Steve

1 Like

Just one more thing… Is there a way to get a bool out of it? I need a condition inside a method: When TrackingImage.on(“notseen”), I’d like to check if the which camera is activated and threat it differently…

symbol.nodes.TrackingImage.on("notseen", () => {
    if(frontCamere is enable)
        //Do something
    else
        //Do something else
});
1 Like