Start a new topic

Number of currently tracked image targets in ImageTracker JS API

Is there any property in JS SDK ImageTracker that says how many image targets are currently tracked, and if not is there any possibility to implement it?


It would be useful for scenarios where we want content to play onEnter event if there is only 1 image target recognised, and if there are multiple image targets recognised, then we want for content (video, sound, ...) to play onClick event.


Hi,


there is no such property in the JavaScript SDK. You can easily implement on your own if you add a counter and increment it in the onImageRecognized callback and decrement it in the onImageLost call back.

We will add the feature request to our backlog, as we agree that such a property would be a good addition.

Hope that helps!

Cheers
Phil 

Thank you for clarification. Already did that and it works good.


For our scenario mentioned above, I've also added a new Promise callback that waits around 1 second to decide if content should play immediately or not, because initially there will always be 1 target recognised and in waiting time maybe there will be another one... 

Login or Signup to post a comment