Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtWebView - WebRTC - macOS support back to 10.14
Forum Updated to NodeBB v4.3 + New Features

QtWebView - WebRTC - macOS support back to 10.14

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 366 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.
  • D Offline
    D Offline
    danryu
    wrote on last edited by danryu
    #1

    I develop a cross-platform audio-video app that targets macOS, Windows, Linux, iOS and Android.
    I use QtWebView in Qt 6.4.2 to load a WebRTC client that needs access to the camera device.

    This works fine across the 5 target platforms above (using QtWebEngineView for Windows and Linux), but on macOS there are some subtle variations.
    Note: Qt6 is officially supported on macOS back to version 10.14 (see docs). macOS users are particularly prone to sticking on old OS versions (like macOS 10.14 Mojave), especially if they are creator/producer types who rely on old OS versions to run their current setup of audio software. (It's incredibly frustrating for us developers, yes, but that's the reality of things.)

    Does any Qt/Mac guru out there know what causes the following problem? And how it can be resolved or worked around?
    (Note: QtWebEngineView does work where QtWebView fails in this case - but adding webengine to the app deployment increases the installer size from 40mb to 200mb, which users will not appreciate...)

    PROBLEM
    QtWebView on macOS 10.14 does NOT successfully request the Camera permission that allows WebRTC functionality (eg video chat using webcam)

    REPRODUCTION
    I created a minimal test project to demonstrate this:
    https://github.com/danryu/webview_camera_test
    It simply loads a QML WebView with a WebRTC demo url.
    Please try running the project on macOS 10.14 versus 11+.
    (NOTE: you may need to add QT_WEBVIEW_PLUGIN=native to the Run environment in order to let the WebView plugin be picked up.)

    Test Summary:

    • macOS 11 and later: WebView requests Camera permission, WebRTC demo successful
      Screen Shot 2023-01-22 at 10.55.45.png
    • macOS 10.14: WebView does NOT ask for Camera permission, WebRTC demo FAILS
      Screen Shot 2023-01-22 at 10.50.17 AM.png
    1 Reply Last reply
    0

    • Login

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