[PyQt] audio tags in QWebview

Phil Thompson phil at riverbankcomputing.com
Thu Feb 16 18:44:25 GMT 2012


On Thu, 16 Feb 2012 19:33:42 +0100, Peter Bienstman
<Peter.Bienstman at ugent.be> wrote:
> Hi,
> 
> Upon upgrading to PyQt 4.9.1 Python 2.7 Win 32 bit from PyQt 4.8.6-1,
> audio 
> tags in QWebview no longer work:
> 
> import sys
> from PyQt4 import QtWebKit, QtGui
>  
> a = QtGui.QApplication(sys.argv)
> w = QtWebKit.QWebView()
> w.setHtml("audio test<audio src='file:///C:/test.mp3' controls
autoplay>")
> w.show()
> a.exec_()
> 
> The control is not displayed, and there is no sound to be heard...
> 
> This is probably related:
> 
> https://bugreports.qt-project.org/browse/QTBUG-22883
> 
> Since PyQt seems to bundle its own version of Qt, I was wondering if
it's 
> somehow possible for PyQt to fix this without waiting for a new Qt
release?
> 
> Thanks for looking into this!

It's not clear from the bug report what the fix is. If it just needs extra
libraries added to the installer then it could be fixed. If it needs
changes to the Qt source code then it won't.

Phil


More information about the PyQt mailing list