stephenlb / webrtc-sdk

WebRTC Simple Calling API + Mobile SDK - A simplified approach to RTCPeerConnection for mobile and web video calling apps.
https://stephenlb.github.io/webrtc-sdk/
MIT License
853 stars 278 forks source link

Mac - Safari. TypeError: talk.pc.addStream is not a function. #56

Closed crookedbard closed 5 years ago

crookedbard commented 5 years ago

On iOS Safari everything works fine, but on Mac Safari I get this error: TypeError: talk.pc.addStream is not a function. (In 'talk.pc.addStream(mystream)', 'talk.pc.addStream' is undefined) (anonymous function) — webrtc.js:196 get_conversation — webrtc.js:204 dial — webrtc.js:251 dial — webrtc-sdk:200 (anonymous function) — webrtc-sdk:220 onready — webrtc.js:401 connect — webrtc.js:392 (anonymous function) — pubnub.js:1129 (anonymous function) — pubnub.js:568 each — pubnub.js:297 each_channel — pubnub.js:562 success — pubnub.js:1126 finished — pubnub.js:2996 Selected Element <div id="pubnub-chat-output">…</div>

stephenlb commented 5 years ago

Tested Safari. Seems to work! What version are you using?

screen shot 2018-10-09 at 11 19 30 am

crookedbard commented 5 years ago

navigator.getUserMedia got deprecated, you need to use navigator.mediaDevices.getUserMedia and there may be some RTCPeerConnection changes

stephenlb commented 5 years ago

ahhh! okay this makes sense haha ;-)

stephenlb commented 5 years ago

patched and pushed. https://github.com/stephenlb/webrtc-sdk/commit/5935d883deec12193fd1a5a06dd1d19cf9a10715