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

[REG] recentlyAudible does not implement 2s cooldown anymore

    XMLWordPrintable

    Details

    • Commits:
      4a06aad046a8599b5957d8de72ea7694ace78100 (qt/qtwebengine/6.2) b6099cd9d1efab2af4a38476b3f543796f26f065 (qt/qtwebengine/dev) 5e30e3a7cb (qt/qtwebengine/5.15)

      Description

      According to the docs:

      if the audio is paused, [the {{recentlyAudibleChanged}}] signal is emitted with an approximate two-second delay, from the moment the audio is paused.

      I remember this being the case around QtWebEngine 5.11 or so (which I can't test right now), but it seems that behavior was lost at some point. Either it should be restored, or the documentation should be adjusted (it's easy enough to implement a custom cooldown via QTimer).

      Reproducer:

      import sys
      import argparse
      
      from PySide6.QtCore import QUrl
      from PySide6.QtWidgets import QApplication
      from PySide6.QtWebEngineWidgets import QWebEngineView
      
      app = QApplication([])
      wv = QWebEngineView()
      wv.page().recentlyAudibleChanged.connect(lambda audible: print(f"Audible: {audible}"))
      wv.load(QUrl("https://www.youtube.com/watch?v=FITMn1imWsQ"))
      wv.show()
      app.exec()
      

      As soon as audible: True is printed, e.g. skip in the video, and note how audible: False and audible: True gets printed immediately. With an UI displaying an "audible" indicator, this results in an erratic/flickering indicator when people are e.g. speaking in a video and pause talking.

        Attachments

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

          Activity

            People

            Assignee:
            allan.jensen Allan Sandfeld Jensen
            Reporter:
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes