For my project I would like to update the OSD more offen than once a second and also i am showing a map that is synchronized with the current frame in the video.
In all platforms but Web i can just get the VideoPlayerState.currentTime to get the exact milliseconds in the video stream. But in Web it is only updated once a second (or maybe a little bit more offen)
I did a little bit of experimenting and the HTMLVideoElement.currentTime does return the exact position.
So the current implementation could be changed so that the VideoPlayerState.currentTime getter could forward the request directly to the html element. Which is currently not possible because the reference is not saved in the state.
I could provide a PR but not sure how to change the code to keep the current architecture.
Btw. great work with this project. It really enables multimedia apps in Compose Multiplatform. Before it was not possible to create a video player. The last update also really improved the Wasm target. ❤️
For my project I would like to update the OSD more offen than once a second and also i am showing a map that is synchronized with the current frame in the video.
In all platforms but Web i can just get the VideoPlayerState.currentTime to get the exact milliseconds in the video stream. But in Web it is only updated once a second (or maybe a little bit more offen)
I did a little bit of experimenting and the HTMLVideoElement.currentTime does return the exact position.
So the current implementation could be changed so that the VideoPlayerState.currentTime getter could forward the request directly to the html element. Which is currently not possible because the reference is not saved in the state.
I could provide a PR but not sure how to change the code to keep the current architecture.
Btw. great work with this project. It really enables multimedia apps in Compose Multiplatform. Before it was not possible to create a video player. The last update also really improved the Wasm target. ❤️