EasyRTC Safari support

598 views
Skip to first unread message

archas

unread,
Jun 7, 2017, 4:47:33 AM6/7/17
to EasyRTC
Hi!

Recently, Apple announced that the next version of Safari (v11 - now in beta AFAIK) will have support for WebRTC.


Will EasyRTC have support for it?

Benjamin Schroeder

unread,
Jun 8, 2017, 7:57:39 PM6/8/17
to EasyRTC

Eric Davies

unread,
Jun 9, 2017, 8:05:49 PM6/9/17
to EasyRTC
the way it works is that we pull in a 3rd-party file called adapter.js that provides a shim for different browsers (gives them the same api).
it looks like the most recent version of adapter.js has safari support of some sort, so I'll try it this weekend sometime.
the last time I tried it for the edge browser, something broke in creating peer connections.

Benjamin Schroeder

unread,
Jun 11, 2017, 8:01:38 PM6/11/17
to EasyRTC


Hi Eric.
If you have had time to mess with adapter.js this weekend and did any updates to the core would any changes be in the zombieland or beta branch sometime this week?

Eric Davies

unread,
Jun 12, 2017, 2:35:40 PM6/12/17
to EasyRTC

archas

unread,
Sep 3, 2017, 1:37:00 PM9/3/17
to EasyRTC
Eric, I'm getting some errors.

Using latest zombieland branch, it unfortunately fails on latest Safari 11.0 (tested on Mac).

easyrtc.initMediaSource() is OK, but when I call:
easyrtc.call(peerId, successCB, failureCB, acceptedCB, easyrtc.getLocalMediaIds());

I'm getting:
SYSTEM_ERR Error creating RTCPeerConnection
buildPeerConnection failed, call not completed


When using Safari Technology Preview Release 38 (Safari 11.1), on easyrtc.initMediaSource() the error callback is called with:
MEDIA_ERR Your browser doesn’t appear to support WebRTC.


Eric Davies

unread,
Sep 8, 2017, 5:53:09 PM9/8/17
to EasyRTC
It looks like Safari preview doesn't believe in supporting the legacy apis.
So, I've just added support for using RTCPeerConnection.addTrack when addStream doesn't exist, and updated RTCPeerConnection.createOffer/createAnswer calls to use promises.
With this, and using an ssl server, I was able to get the simple audio video demo running.
One observation - it looks like only one webapp can use the camera at a time with Safari.

The updates have been pushed to the beta branch (which should now include all the zombie land updates).


archas

unread,
Sep 9, 2017, 3:59:42 PM9/9/17
to EasyRTC
Thanks. 

Seems that it works on Safari 11.0.

btw. my friend noticed this error on Safari 11:
Unhandled Promise Rejection: TypeError: Argument 1 ('selector') to RTCPeerConnection.getStats must be an instance of MediaStreamTrack
getPeerStatistics / getChromePeerStatistics

And I noticed that on Safari 10 there is a strange error message (I think it should be 'Your browser doesn't support WebRTC' or something like that), I'll paste it here tomorrow.

archas

unread,
Sep 11, 2017, 7:42:05 AM9/11/17
to EasyRTC
On Safari 10 there's:
TypeError: undefined is not an object (evaluating 'navigator.mediaDevices.enumerateDevices') 
(getSourceList function)

I think that there should be something like 'Your browser doesn't support WebRTC' error (with a fixed ERROR_CODE that will allow me to handle this error).

archas

unread,
Sep 20, 2017, 4:11:03 PM9/20/17
to EasyRTC
Eric, any idea?
Reply all
Reply to author
Forward
0 new messages