Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webrtc/adapter breaks deviceId constraint #282

Closed
m59peacemaker opened this issue May 25, 2017 · 6 comments
Closed

webrtc/adapter breaks deviceId constraint #282

m59peacemaker opened this issue May 25, 2017 · 6 comments
Assignees
Labels
Milestone

Comments

@m59peacemaker
Copy link

m59peacemaker commented May 25, 2017

The latest docs suggest loading adapter, but it breaks deviceId.

My code is:

  if (window.device.platform === 'iOS') {
    cordova.plugins.iosrtc.registerGlobals()
  }
  require('webrtc-adapter')

Only the front facing camera will load. I tried adapter 2.1.0, 3.2.0, 3.4.1, 3.4.3 and the following video constraint formats:

  { deviceId: deviceId } // from enumerateDevices (I ensured it is the proper string/value)
  { facingMode: 'environment' }
  { facingMode: { ideal: 'environment' } }

In all cases, the resulting constraints from adapter passed to getUserMedia are:

{ optional: [ { sourceId: deviceId } ] }

I'm think either adapter and iosrtc actually don't work well together, or the docs are unclear about what to expect.

@ibc
Copy link
Collaborator

ibc commented May 25, 2017

Indeed adapter.js is changing stuff.

@ibc ibc closed this as completed in 80120e0 May 25, 2017
@ibc ibc reopened this May 25, 2017
@ibc
Copy link
Collaborator

ibc commented May 25, 2017

May you try again with master? I'v done this.

m59peacemaker pushed a commit to m59peacemaker/cordova-plugin-iosrtc that referenced this issue May 25, 2017
@m59peacemaker
Copy link
Author

adapter nests sourceId in an object in an array. #283 is working for me.

@hthetiot
Copy link
Contributor

hthetiot commented Aug 11, 2019

Using getUserMedia constraints.(video|audio).deviceId and getting values from cordova.plugins.iosrtc.getMediaDevices to get the deviceId and using webrtc-adapter v7.2.1+ works for me.

@hthetiot hthetiot added webrtc-adapter webrtc-adapter related getUserMedia labels Aug 14, 2019
@hthetiot hthetiot added this to the 5.0.2 milestone Sep 10, 2019
@hthetiot hthetiot self-assigned this Sep 10, 2019
@hthetiot hthetiot modified the milestones: 5.0.2, 5.0.x Sep 12, 2019
@hthetiot
Copy link
Contributor

see WIP #384

@hthetiot hthetiot modified the milestones: 5.0.x, 5.0.3 Sep 15, 2019
@hthetiot
Copy link
Contributor

hthetiot commented Oct 5, 2019

"{ optional: [ { sourceId: deviceId } ] }"
This not not in the spec:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants