I need to create a flet button utilizing python that permits me to go 1 body backwards/fordwards. I used the official documentation web page to construct it [https://flet.dev/docs/controls/video] (as there’s not a selected flet operate to do it).
I wrote down this code. And whereas it really works for the primary time, as soon as I pressed it twice it restarts the video fully. Have no idea if it’s a flet subject. Any solutions? (thanks deeply)
def adv_frame(e):
video_player.pause()
current_ms = video_player.get_current_position()
#this needs to be modified to regulate to the specifit fps of the video
current_ms+= 8.33 #which is 120 fps
print(f"Advancing to {current_ms} ms")
video_player.search(current_ms)