Bug 1728749 - Pre-select OS dialog when using Pipewire for screen sharing, r=emilio

Right now when using the OS/portal provided sharing dialog, the
selection in Firefox:
 - does not serve any purpose as the sharing dialog is the only option
 - unnecessarily add two more clicks and potentially confusion

Thus lets pre-select the OS sharing dialog in this case.

Differential Revision: https://phabricator.services.mozilla.com/D124332
This commit is contained in:
Robert Mader 2021-09-02 12:51:14 +00:00
Родитель c12fb2d47d
Коммит e86a6b4f98
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -870,6 +870,11 @@ function prompt(aActor, aBrowser, aRequest) {
);
item.deviceId = device.id;
item.mediaSource = type;
// In this case the OS sharing dialog will be the only option and
// can be safely pre-selected.
menupopup.parentNode.selectedItem = item;
menupopup.parentNode.disabled = true;
break;
}
if (type == "application") {