Skip to content

Commit

Permalink
Add a temp fix for audio issues with Qt 6.8.1
Browse files Browse the repository at this point in the history
See https://bugreports.qt.io/browse/QTBUG-130273 for a discussion and
the suggested "dirty workaround", which is applied here.
  • Loading branch information
yfyf committed Jan 29, 2025
1 parent ac92ef7 commit afeaaa0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions kiosk/kiosk_browser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import sys
import os
import logging
import signal
from PyQt6.QtCore import Qt, QUrl
Expand All @@ -7,10 +8,22 @@

from kiosk_browser import main_widget

# Workaround for https://bugreports.qt.io/browse/QTBUG-130273 in Qt 6.8.1
# Should be fixed with QT 6.8.2
# Note: doing this via env variables rather than passing `--webEngineArgs`,
# because the env variable overrides the args (and so is easy to break in tests,
# etc)
def tempFixAudioIssues():
curFlags = os.environ.get('QTWEBENGINE_CHROMIUM_FLAGS', "")
os.environ['QTWEBENGINE_CHROMIUM_FLAGS'] = curFlags + " --disable-features=FFmpegAllowLists"


def start(kiosk_url, settings_url, toggle_settings_key, fullscreen = True):

logging.basicConfig(level=logging.INFO)

tempFixAudioIssues()

app = QApplication(sys.argv)
app.setApplicationName("kiosk-browser")

Expand Down

0 comments on commit afeaaa0

Please sign in to comment.