A request for populating a dialog with available sources for screen capturing. More...
| Import Statement: | import QtWebEngine |
| Since: | Qt 6.7 |
| In C++: | QWebEngineDesktopMediaRequest |
To allow web applications to capture contents of a display, applications must connect to WebEngineView::desktopMediaRequested, which takes a WebEngineDesktopMediaRequest instance as an argument.
If a web application requests access to the contents of a display, WebEngineView::desktopMediaRequested will be emitted with a WebEngineDesktopMediaRequest instance as an argument which holds references to ListModels for available windows and screens that can be captured.
The data model's DisplayRole specifies the name of the source which is the title of a window or the number of the display. The model is dynamically updated if the available list of sources has changed; e.g when a window is opened/closed.
The signal handler needs to then either call selectScreen() or selectWindow() to accept the request and start screensharing.
See also WebEngineView::desktopMediaRequested.
|
screensModel : ListModel |
A ListModel containing a list of available screens.
See also windowsModel.
|
windowsModel : ListModel |
A ListModel containing a list of available windows.
See also screensModel.
|
void cancel() |
Rejects a request. Screen capturing will be aborted.
|
void selectScreen(QModelIndex index) |
Selects the screen at the index to be captured.
See also WebEngineDesktopMediaRequest::selectWindow().
|
void selectWindow(QModelIndex index) |
Selects the window at the index to be captured.
See also WebEngineDesktopMediaRequest::selectScreen().
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: