webrtcHacks / adapter

Shim to insulate apps from spec changes and prefix differences. Latest adapter.js release:
https://webrtcHacks.github.io/adapter/adapter-latest.js
BSD 3-Clause "New" or "Revised" License
3.62k stars 846 forks source link

Edge: Legacy mandatory/optional constraints not supported. #437

Closed zdila closed 7 years ago

zdila commented 7 years ago

Browsers and versions affected AdapterJS 0.14.0

Edge 38 on Windows 10

Description

Exteption with message "Legacy mandatory/optional constraints not supported." when calling createOffer

fippo commented 7 years ago

Those constraints are chrome-specific. What constraints are you trying to pass?

zdila commented 7 years ago

Thank you. You were right. After fixing that problem we are getting SCRIPT5022: InvalidAccessError at line marked with XXX:

  } else if (navigator.mediaDevices && navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) {
    // Attach a media stream to an element.
    attachMediaStream = function(element, stream) {
      element.srcObject = stream; // XXX
      return element;
    };

So far we are trying to do audio-only call.

fippo commented 7 years ago

that looks like a very, very old version of adapter...

zdila commented 7 years ago

It is 0.14.0, latest in the npm repository.

https://github.com/Temasys/AdapterJS/blob/master/publish/adapter.debug.js

fippo commented 7 years ago

this npm package for this adapter is https://www.npmjs.com/package/webrtc-adapter

zdila commented 7 years ago

Thanks. But does that one support MSIE and Safari? Because this one "provides support for WebRTC in Internet Explorer and Safari on Mac and Windows through the available Temasys Browser Plugins.".

zdila commented 7 years ago

Oh sorry. I reported this issue to wrong project then :-O

AndriiDronDiachuk commented 6 years ago

zdila, how exactly did you fix "Legacy mandatory/optional constraints not supported"?

fippo commented 6 years ago

@AndriiDronDiachuk replace any createOffer({mandatory: {OfferToReceiveAudio: true}}) or similar with createOffer({offerToReceiveAudio: true}). Firefox should complain a lot about this already.