getUserMedia: User Media support is disabled
-
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
-
It does work if to re-build the qtwebengine with WebRTC support: to add PACKAGECONFIG += "webrtc"
to the qtwebengine.bbappend file.