Important: Please read the Qt Code of Conduct -

Change html in all frames in QWebEngineView

  • Hi! I have a simple browser based on Qt5 QWebEngineView on which user can load different urls. I need to implement "disable sound on videos" feature. One way is to execute JS and set .muted=true for all video elements, but according to [1] runJavaScript can run only in mainFrame, so if page will contain iframe with video tag sound will still play. Another way is to replace html code that comes into QWebEngineView, e.g.

    "<video>"->"<video muted>"
    But is it possible to implement this way? Is there any other ways?