Maria_Medina | 2020-11-27 22:40:32 UTC | #1
please tell me how can I turn off WebRTC on pyqt5 through webview
martin | 2020-12-04 20:13:54 UTC | #2
Hi @Maria_Medina
The way these things are usually controlled is through web settings, e.g.
webview.page().settings().setAttribute(<setting>, <value>)
The only thing I can find related to WebRTC in Qt's browser is on this page
QWebEngineSettings.WebRTCPublicInterfacesOnly
...which " Limits WebRTC to public IP addresses only." That doesn't seem to be what you're looking for.
Create GUI Applications with Python & Qt6 by Martin Fitzpatrick — (PyQt6 Edition) The hands-on guide to making apps with Python — Over 15,000 copies sold!
The documentation here mentions web features, for example this list which would allow you to disable video/audio capture. Is that what you're looking for?
Purchasing Power Parity
Developers in [[ country ]] get [[ discount.discount_pc ]]% OFF on all books & courses with code [[ discount.coupon_code ]]In that case, it looks like you need to handle the .featurePermissionRequested
signal on the QWebEnginePage
-- if you do not accept it, it should not be enabled. I can't see how to disable this from the load however.
PyQt/PySide 1:1 Coaching with Martin Fitzpatrick — Save yourself time and frustration. Get one on one help with your Python GUI projects. Working together with you I'll identify issues and suggest fixes, from bugs and usability to architecture and maintainability.