Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

190
Visualizações
WebRTC not getting resolution of both desktop displays for stream

This is a remote desktop application via Chrome where the user shares their screen. The problem I am having is when the user has 2 or more screens, WebRTC only gets the first display's resolution. I can see this by logginglocalStream.getVideoTracks()[0].getSettings():

aspectRatio: 1.7777777777777777
deviceId: "screen:-1:0"
frameRate: 30
height: 1080
resizeMode: "crop-and-scale"
width: 1920

Both screens end up streaming in one connection (getVideoTrracks()[1] does not exist), but it only shows as one screen. The width should be 1920 * 2 screens at 3840.

My constraints and getting media are set as:

let mediaConstraints = {
  audio: false,
  resizeMode: "none",
  video: {
    mandatory: {
      chromeMediaSource: "desktop",
    },
  },
};

localStream = await navigator.mediaDevices.getUserMedia(mediaConstraints);

I noticed crop-and-scale was set instead of none, and thought that might be causing a problem but I can't seem to get it to set for this kind of constraint. aspectRatio did nothing as well. Setting resizeMode within mandatory throws an error. Where am I going wrong here?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda