As shown in this article, calling navigator.mediaDevices.getUserMedia()
as follows should grant zoom permissions:
const stream = await navigator.mediaDevices.getUserMedia({
video: { zoom: true }
});
Also, as stated in the same article:
MediaStreamTrack.getCapabilities()
returns a dictionary with the supported capabilities and the ranges or allowed values. Correspondingly,MediaStreamTrack.getSettings()
returns the current settings.
With the information above I've done some testing in an Android device in both Chrome and in the Android WebView. The tests were made using this demo found in the same article.
Here are the results:
Chrome:
WebView:
As you can see in the "Capabilities detected" and "Settings detected" images, in the WebView the zoom capability is not shown while it is shown in Chrome.
Have I done something wrong or is there a bug on the Android WebView?
Seems it's a chromium issue and I don't think anyone is working on it
https://bugs.chromium.org/p/chromium/issues/detail?id=1249435 https://bugs.chromium.org/p/chromium/issues/detail?id=1137869