This code to generate a capture of a random second of the video and generate an image of it does not work on ios devices, on android and windows if it works.