Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.10, 5.15.2
-
None
-
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.