videoTextureProvider Limitations
Hi Team,
I have (once again) found a limitation with the videoTextureProvider API, I explain the situation:
Starting from Marker with Snapcode, I am tracking a marker, on lens start I play a video which on finished should trigger a hint to swap the camera to the selfie mode.
This is done via "setOnFinish" function, the problem encountered is, if I stop tracking the video mid-play, the callback function gets triggered.
The video is not set to autoplay and I handle all the play, pause, resume calls, checking the status every time (quite rigid architecture) and the video should not ever replay after it has finished. In the described situation, if you track the marker again the video will start from the beginning, if you let it finish everything will work seamlessly.
Is there a way to control the played time (like with animatedTextureFileProvider)?
It feels like the animations have the controls that the video should have and a much more robust implementation.
Thanks and keep up the good work!
Aitor.
Hi, Aitor!
Thank you for your feedback! I do agree that VideoTextureProvider API is not convenient enough. We will discuss it with our engineers.
In case if it blocks your development I would suggest using DelayedCallbackEvent for this purpose, reseting this event when marker is found to fire after [video duration] seconds, and disabling event when marker is lost and video has not been finished.
Best
Olha