Closed 6260coder closed 1 year ago
Hi, I try to fix the way to get player position, and pushed to github only currently.
Please try it :
dependencies:
video_player: ^2.5.1
video_player_win:
git:
url: https://github.com/jakky1/video_player_win.git
ref: master
If it works, please let me know, and I will push to pub.dev
Hi jakky1, I tried your fix just now. It seems to be working perfectly. It now acts consistenly with video_player as far as my code is concerned. Many thanks for your quick response and support! Cheers!
I want my video player to be able to automatically pause at the end of a subtitle. So in my code I check the player's current position at regular intervals to see whether it has reached the point it should pause at.
But it seems that in video_player_win, VideoPlayerController's position property is only updated about once a second. This doesn't make the pause accurate enough.
What can I do to solve this problem? Is there something I can change to make position updated at a higher frequency? Or am I approaching this entirely the wrong way? I also tried addListener(), but the callback function seemed to be invoked every one second as well. Some help is much appreciated.
I tested the same code with video_player on Android. I was able to obtain about the right values of position at intervals of 100 milliseconds.
Thank you very much!