I want to create a flet button using python that allows me to go 1 frame backwards/fordwards. I used the official documentation page to build it [https://flet.dev/docs/controls/video] (as there is not a specific flet function to do it).
I wrote down this code. And while it works for the first time, once I pressed it twice it restarts the video completely. Do not know if it is a flet issue. Any suggestions? (thank you deeply)
def adv_frame(e):
video_player.pause()
current_ms = video_player.get_current_position()
#this has to be changed to adjust to the specifit fps of the video
current_ms+= 8.33 #which is 120 fps
print(f"Advancing to {current_ms} ms")
video_player.seek(current_ms)