Temasys / SkylinkJS

SkylinkJS Javascript WebRTC SDK
http://skylink.io/web
Other
275 stars 57 forks source link

Handle safari not supporting createOffer with offerToReceiveAudio/Video #297

Closed miniruwan closed 7 years ago

miniruwan commented 7 years ago

Safari doesn't support createOffer with (offerToReceiveAudio: 1, offerToReceiveVideo: 1) which is a barrier for Safari to connect with MCU because Safari won't do ICE gathering when createOffer is done above way. Until this is fixed in AdapterJS (https://github.com/webrtc/adapter/issues/661), patching SkylinkJS.

oooookk7 commented 7 years ago

Seems like the patch is not going be easy by just adding the transceivers as it could potentially create other issues where disabling the m= lines is not working or P2P simple audio/video call with re-negotiation resulting in multiple m= lines. There is also the shim of addStream() API which the webrtc/adapter guys have done internally too by doing addTrack() which adds a RTCRtpSender/RTCRtpTransceiver, and since then I would suggest not patching it in SkylinkJS and updating with the fixes they have already made. (See webrtc-adapter PR#676 and webrtc-adapter PR#688 for reference)

The ideal approach to this is:

1) AdapterJS upgrades to the latest webrtc/adapter. 2) SkylinkJS upgrades to the latest AdapterJS.

miniruwan commented 7 years ago

@letchoo's approach is better. So, closing the PR since this is not needed.