что такое логическая поверхность дисплея в API захвата экрана браузера? - PullRequest
1 голос
/ 08 мая 2020

Мне интересно, что на самом деле такое Logical Display Surface?

В документах MDN:
A logical display surface is one which is in part or completely obscured, either by being overlapped by another object to some extent, or by being entirely hidden or offscreen. How these are handled by the Screen Capture API varies. Generally, the browser will provide an image which obscures the hidden portion of the logical display surface in some way, such as by blurring or replacing with a color or pattern. This is done for security reasons, as the content that cannot be seen by the user may contain data which they do not want to share.

Но когда я добавляю logicalSurface: true в константу видео, ничего не меняется. Когда я выставляю logicalSurface: false, тоже ничего не меняется. Кто может дать мне реальный пример?

const constraints = {
    video: {
                logicalSurface: true // True and False are same :'(
    },
    audio: true
}
const stream = await navigator.mediaDevices.getDisplayMedia(constraints);
localVideo.srcObject = stream;

Спасибо.

...