Closed jonasborggren closed 3 years ago
This is completely normal. What do you mean? ~250 ms is normal. I have used C++/WinRT MediaPlayer, HTML5 video timeupdate
event... All send position updates in similar intervals.
If you feel, VLC is more capable & you know some CLI flag, we have already given a way to do it.
Please explain further. If this functionality is available I'd love to use it. I'm not super familiar with CLI flags 🤔 What I mean by "a bit slow" is that ~250ms is in my case too slow! I'm looking for a smooth update of the UI element showing the progress. Thanks
If we play music or videos for a long time, 250 millisecond delays can be accepted, but I need to play a 2-second audio message, I hope there is a shorter delay.
@alexmercerind
Sometimes PositionState.position is 0, is this relationship with delay?
@YeungKC
If we play music or videos for a long time, 250 millisecond delays can be accepted, but I need to play a 2-second audio message, I hope there is a shorter delay.
The bar will move accordingly. Tell me an app or any other Flutter plugin which makes callback every millisecond or so. Its very expensive to make callbacks to DartVM.
Think it like this, a chunk of file is read from internet or filesystem, it is then decoded into PCM audio & raw frame, then it is sent to be played. And, in the middle of this the position callback is made by libVLC. And, its completely normal, even ExoPlayer does the same.
The bar will move accordingly. Tell me an app or any other Flutter plugin which makes callback every millisecond or so. Its very expensive to make callbacks to DartVM.
Ive tried many other recommended audio flutter libraries and they all call their listeners with less than 25ms between. This one is alone doing it this way.
Let the developer decide what is best for them, please.
The bar will move accordingly
No it won’t. play any audio files less than 0.5s and the listener barely gets called once.
The
positionStream
is updated a bit slow. It would be great if the frequency could be changed! Listening to thepositionStream
shows it updates maybe every ~250ms!Starting a timer separately to get the current position has the same result. Example:
Printing
DateTime.now()
every update gives this result: