I use
chrome.tabCapture.capture to capture the contents of chrome tab:
const constraints = {
audio: false,
video: true,
videoConstraints: {
mandatory: {
chromeMediaSource: "tab",
minFrameRate: 4,
maxFrameRate: 30,
maxWidth: 3840,
maxHeight: 2160
}
}
};
chrome.tabCapture.capture(constraints, stream => {
});
Depending on the client screen resolution, the video has black bars on top and bottom (letterboxed).
I was wondering if there is a way to reliably calculate the height of those bars.
For example, for 2560x1234 window size (window.innerWidth, window.innerHeight), I get 182px bands on top and bottom in the resulting video and was wondering how is this height obtained.