Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Change html in all frames in QWebEngineView

    General and Desktop
    qwebengineview qwebengine qwebengine netw
    1
    1
    812
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      andbiller last edited by

      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?

      [1] https://wiki.qt.io/QtWebEnginePortingFromQtWebKit

      1 Reply Last reply Reply Quote 0
      • First post
        Last post