From 58abfb44c4936664a18299a9d34eb65a76409f55 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sun, 31 Mar 2019 10:35:03 -0700 Subject: [PATCH 1/2] Globally disallow use of the camera or microphone by hosted web content --- interface/src/Application.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 635932ea1c..676534f6db 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2882,11 +2882,19 @@ void Application::initializeGL() { } #if !defined(DISABLE_QML) + QStringList chromiumFlags; + // Bug 21993: disable microphone and camera input + chromiumFlags << "--use-fake-device-for-media-stream"; // Disable signed distance field font rendering on ATI/AMD GPUs, due to // https://highfidelity.manuscript.com/f/cases/13677/Text-showing-up-white-on-Marketplace-app std::string vendor{ (const char*)glGetString(GL_VENDOR) }; if ((vendor.find("AMD") != std::string::npos) || (vendor.find("ATI") != std::string::npos)) { - qputenv("QTWEBENGINE_CHROMIUM_FLAGS", QByteArray("--disable-distance-field-text")); + chromiumFlags << "--disable-distance-field-text"; + } + + // Ensure all Qt webengine processes launched from us have the appropriate command line flags + if (!chromiumFlags.empty()) { + qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromiumFlags.join(' ').toLocal8Bit()); } #endif From 7d4e59bfe3a6227ce6405698e4ab5c8fbbe7621d Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Sun, 31 Mar 2019 12:53:24 -0700 Subject: [PATCH 2/2] Force packet version change --- libraries/networking/src/udt/PacketHeaders.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/networking/src/udt/PacketHeaders.h b/libraries/networking/src/udt/PacketHeaders.h index 413ff14b17..8c76a3ebd0 100644 --- a/libraries/networking/src/udt/PacketHeaders.h +++ b/libraries/networking/src/udt/PacketHeaders.h @@ -266,6 +266,7 @@ enum class EntityVersion : PacketVersion { ModelScale, ReOrderParentIDProperties, CertificateTypeProperty, + DisableWebMedia, // Add new versions above here NUM_PACKET_TYPE,