Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-124316

MediaPlayer when looping does not reset Position value after looping.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 6.6.2
    • Multimedia
    • None
    • Linux/Wayland

      Sorry but I am not a C++ developer so cannot provide a sample 

      the following code provides a tick timer when the video or audio are playing.

              self.media_player.positionChanged.connect(self.pos_callback)

          def pos_callback(self, position) -> None:
              print(position)
              self.controller.media_play_item.timer = position

       This works fine until :        self.media_player.setLoops(QMediaPlayer.Loops.Infinite)

      is used,

      For the first time around it is fine but when the video loops the position value returns, the duration value, then a zero, then the duration, and then stops returning anything.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            lars.sutterud Lars Sutterud
            trb143a Tim Bentley
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes