Ahoi!
(Somewhat related to #10)
I've been trying to do something which sounds simple like selecting the audio / video device I want to use before calling getUserMedia. I didn't know I was in for that much nonsense.
AFAIS there are at least a couple of ways browsers do it, navigator.mediaDevices.enumerateDevices being the new and shinny preferred way.
rtcninja provides getMediaDevices, which is a wrapper around, MediaStreamTrack.getSources, alas this doesn't work on Firefox nor on Chrome >= 47 (current Canary).
The problem is that depending on how the devices are enumerated the constraints need to be specified differently, so rtcninja would also need to accommodate for that.
This is something I can probably work on and provide a patch, but there are a couple of things that need clarifying first:
- do we want to shim
navigator.mediaDevices, or just provide a custom getMediaDevices API function?
- since we are here, should it return a Promise? (I see promises are supported after FF 38 (latest ESR release) and Chrome 32, so we're fine)
Maybe this is a good start to implement the promise based API?
Ahoi!
(Somewhat related to #10)
I've been trying to do something which sounds simple like selecting the audio / video device I want to use before calling
getUserMedia. I didn't know I was in for that much nonsense.AFAIS there are at least a couple of ways browsers do it,
navigator.mediaDevices.enumerateDevicesbeing the new and shinny preferred way.rtcninja provides
getMediaDevices, which is a wrapper around,MediaStreamTrack.getSources, alas this doesn't work on Firefox nor on Chrome >= 47 (current Canary).The problem is that depending on how the devices are enumerated the constraints need to be specified differently, so rtcninja would also need to accommodate for that.
This is something I can probably work on and provide a patch, but there are a couple of things that need clarifying first:
navigator.mediaDevices, or just provide a customgetMediaDevicesAPI function?Maybe this is a good start to implement the promise based API?