Temasys / AdapterJS

AdapterJS Javascript Polyfill and Tools for WebRTC - Skylink WebRTC
http://skylink.io/web
Other
432 stars 100 forks source link

JSAPI-Auto Javascript Object format for event.candidate? #254

Closed anildigital closed 7 years ago

anildigital commented 7 years ago

I am not getting proper event.candidate on Safari with AdapterJS

Format I am receiving for AdapterJS event candidate is of JSAPI-Auto Javascript Object

I have to currently construct event.candidate object as

{candidate: event.candidate.candidate, sdpMLineIndex: event.candidate.sdpMLineIndex, sdp: event.candidate.sdp, sdpMid: event.candidate.sdpMid}

Is there any simpler way to construct ice candidate object? Thanks.

johache commented 7 years ago

Unfortunately no. This is a limitation to the NPAPI/ActiveX API. The IceCandidate is a plugin object and this appear as JSAPI-Auto Javascript Object in the console. It is however the same object, and as you noticed, you can access its attributes as for any other object.

Regards, J-O