You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish I can make the seekBar of video_player smoother.
Tested on iOS:
Upload.from.GitHub.for.iOS.MOV
I used .addListener() of the video player to update the state of the video player controller. I simply declared a variable that stores VideoPlayerValue, then I made a seekBar widget (the long bar that users can seek around the video) using the position value provided in there. I was expecting the widget to be rebuilt as the videoPlayerValue changes, and it did! However, there was one problem, that the movement of the seekBar seemed to be laggy, especially when the video was short.
<what i tried (failed)>
It seemed like the listener func was getting a constant-changing position value with a lag in purpose, for the performance it smth. So, I tried to make a stream that gets the position value every 1000/60ms. However, the position value was still not being updated smoothly; instead, it was updated approximately every 500ms no matter the what duration I choose to update the state.
Btw, i wrote this in my phone, so tell me if I've made any mistakes.
I couldn't find any similar solution in Stack Overflow.
I wish I can make the seekBar of video_player smoother.
Tested on iOS:
Upload.from.GitHub.for.iOS.MOV
I used .addListener() of the video player to update the state of the video player controller. I simply declared a variable that stores VideoPlayerValue, then I made a seekBar widget (the long bar that users can seek around the video) using the position value provided in there. I was expecting the widget to be rebuilt as the videoPlayerValue changes, and it did! However, there was one problem, that the movement of the seekBar seemed to be laggy, especially when the video was short.
<what i tried (failed)>
It seemed like the listener func was getting a constant-changing position value with a lag in purpose, for the performance it smth. So, I tried to make a stream that gets the position value every 1000/60ms. However, the position value was still not being updated smoothly; instead, it was updated approximately every 500ms no matter the what duration I choose to update the state.
Btw, i wrote this in my phone, so tell me if I've made any mistakes.
I couldn't find any similar solution in Stack Overflow.
Use case
Proposal