publiclab/infragram

Integrate latest camera selection API from getUserMedia

Aberta

#39 aberto em 3 de jan. de 2019

 (34 comentários) (0 reação) (0 responsável)HTML (163 forks)auto 404
enhancementgsochelp wanted

Métricas do repositório

Stars
 (50 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Potentially using a new getUserMedia shim library?

https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#Parameters

Maybe using https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/enumerateDevices

Code for this is here:

https://github.com/publiclab/infragram/blob/f6f7919493b5ab9e7cc8fc873f8bddf3ff5f4599/src/io/camera.js#L30-L41

We can apparently also specify different resolutions!

{
  audio: true,
  video: {
    width: { min: 1024, ideal: 1280, max: 1920 },
    height: { min: 776, ideal: 720, max: 1080 }
  }
}

Let's do both!

Guia do colaborador