History

Globally disallow use of the camera or microphone by hosted web content

Brad Davis committed 7 years ago

Commit 58abfb41 parent 8ff47651 file · +9 −1Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+9−1
@@ -2882,11 +2882,19 @@ void Application::initializeGL() { · 2881 unmodified lines
28822882 }
28832883
28842884 #if !defined(DISABLE_QML)
2885+ QStringList chromiumFlags;
2886+ // Bug 21993: disable microphone and camera input
2887+ chromiumFlags << "--use-fake-device-for-media-stream";
28852888 // Disable signed distance field font rendering on ATI/AMD GPUs, due to
28862889 // https://highfidelity.manuscript.com/f/cases/13677/Text-showing-up-white-on-Marketplace-app
28872890 std::string vendor{ (const char*)glGetString(GL_VENDOR) };
28882891 if ((vendor.find("AMD") != std::string::npos) || (vendor.find("ATI") != std::string::npos)) {
2889− qputenv("QTWEBENGINE_CHROMIUM_FLAGS", QByteArray("--disable-distance-field-text"));
2892+ chromiumFlags << "--disable-distance-field-text";
2893+ }
2894+
2895+ // Ensure all Qt webengine processes launched from us have the appropriate command line flags
2896+ if (!chromiumFlags.empty()) {
2897+ qputenv("QTWEBENGINE_CHROMIUM_FLAGS", chromiumFlags.join(' ').toLocal8Bit());
28902898 }
28912899 #endif
28922900

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t