I am trying to read the current playback time of a youtube video. But whatever I try, I can’t get it to work.
What is my best approach?
- getting the element of the YoutubeVideo
- if null, set a variable to -1
- if not null, set a variable to the value retrieved from the video element’s property .currentTime
But Whatever I try, I can’t read the variable.