1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter - video_player listener being called very slowly

Discussão em 'Mobile' iniciado por Stack, Outubro 1, 2024 às 08:02.

  1. Stack

    Stack Membro Participativo

    I want to get the current position of the video being played in real-time. I was thinking of using a listener, but if I do:

    _controller.addListener(() => print(_controller.value.position.inMilliseconds))


    It only prints the value every 500 milliseconds. This is too slow, the video is updating every 33ms or even more often. Anyone knows why is this happening and what's the proper way of achieving what I want?

    P.S. I was able to achieve what I wanted by starting an AnimationController when the video starts, but this seems like a hack.

    Continue reading...

Compartilhe esta Página