WebRTC video constraints - Did you just go with the safest?

I see in the demo you are using the below video resolution constraints and it looks like you always go with ‘hd’.

  qvga: { width: { ideal: 320 }, height: { ideal: 240 } },
  vga: { width: { ideal: 640 }, height: { ideal: 480 } },
  hd: { width: { ideal: 1280 }, height: { ideal: 720 } },

While working with the WebRTC API and the video constraints it looks like there is different behavior between devices and browsers so I’ve seen code like this and this.
These guys also doing a lot about some devices/platforms requiring ‘exact’ device ID.

Raises various questions in my head:

  • Do I need to figure all these out?
  • Should I stick to the default behavior you guys have in demo?
  • Is there any library to handle this for me?

Looks like Safari and iOS can become a pain.
I understand this is not mediasoup-demo specific but WebRTC API, feel free to move it if appropriate.