Add screen picker completion menu for screen sharing #8214
Labels
component: completion
Issues related to the commandline completion or history.
component: QtWebEngine
Issues related to the QtWebEngine backend, based on Chromium.
priority: 3 - wishlist
Issues which are not important and/or where it's unclear whether they're feasible.
qt: 6.7
Issues related to Qt 6.7
Since Qt version 6.7 WebEngine has had a
QWebEnginePage.desktopMediaRequested
signal that is called when you go to share a screen to let applications pick a screen or window to share. The default behaviour shares the primary screen or the whole desktop depending on which platform you are on.The request object is documented here: https://doc.qt.io/qt-6/qwebenginedesktopmediarequest.html
That holds two
QAbstractListModel
s, one for screens and one for windows. The current API only makes available titles for screens and windows, no thumbnails or previews (although it looks like chrome's DesktopCapturer that is used underneath has them). On one hand that limits what we can implement in a screen picker, on the other hand it aligns well with the single generic list based UI widget we have, the completion widget.You'll need to create a completion model from the request (not sure if you can use the same list models on the request in the completion widget, I doubt it) and figure out how to show the completion widget - I'm not sure how to show that not from a command registration, possibly via the CompletionView on MainWindow.
You can test with: https://www.webrtc-experiment.com/screen-sharing/
Starter patch that just connects to the new signal and prints the rows.
The text was updated successfully, but these errors were encountered: