Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. getUserMedia: User Media support is disabled

getUserMedia: User Media support is disabled

Scheduled Pinned Locked Moved Solved QtWebEngine
2 Posts 1 Posters 1.2k Views
  • 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.
  • K Offline
    K Offline
    kuzulis
    Qt Champions 2020
    wrote on last edited by kuzulis
    #1

    Hi all.

    I have the Yocto BSP Linux image, based on boot2qt for the apalis-imx6 board. That image contains Qt 5.11.3 with EGLFS support (without of X11). Also I have the USB WEB-camera attached (it does work, as I checked it in gstreamer).

    I have created a simple QML webengineview example (without of QtWidgets):

    import QtQuick 2.0
    import QtQuick.Window 2.0
    import QtWebEngine 1.7
    
    Window {
        width: 1024
        height: 750
        visible: true
    
        WebEngineView {
            id: view
            anchors.fill: parent
            url: "https://webrtc.github.io/samples/"
    
            onFeaturePermissionRequested: {
                console.log("onFeaturePermissionRequested");
                view.grantFeaturePermission(securityOrigin, feature, true);
            }
    
            onNewViewRequested: {
                console.log("onNewViewRequested");
                request.openIn(view)
            }
        }
    }
    

    But, when I do button click on the following url's: "Choose camera resolution"-> "HD" , it return an error:

    getUserMedia: User Media support is disabled

    which is displayed on a WebEngineView item.

    I run my simple application from the root rights with this command line:

    ./myapp --no-sandbox

    I looked the documentation API on the getUserMedia() that says:

    SecurityError
    User media support is disabled on the Document on which getUserMedia() was called. The mechanism by which user media support is enabled and disabled is left up to the individual user agent.

    Also, I see that the onFeaturePermissionRequested() callback did not called (Also I have created a bug).

    So, I don't understand, why this happens, because same example does work on Desktop Linux with same Qt 5.11.3 version

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      It does work if to re-build the qtwebengine with WebRTC support: to add PACKAGECONFIG += "webrtc"
      to the qtwebengine.bbappend file.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved