deskreen icon indicating copy to clipboard operation
deskreen copied to clipboard

Polyfill WebRTC?

Open klarkc opened this issue 3 years ago • 9 comments

I was trying to run the secondary screen on my Xbox One browser, (Microsoft Edge 18). ~un~Surprisingly it did not worked, so I tested in my computer with the same version, the console reports that WebRTC is not supported.

I found that WebRTC is only fully compatible with Edge 79+ (the Chromium based). But there is an implementation called Object RTC that matches the edge version. I was wondering if it's not possible to somehow adds a polyfill to allow the client to runs on old browsers. I found this lib that adds a common layer that enables the protocol on a large range of browsers.

klarkc avatar Jan 31 '21 20:01 klarkc

@klarkc Hi! Thank you for sharing it here. Definitely worth trying! I was thinking there is no hope for old browsers. This lib may change a lot. But definitely something I'm going to do long after I do things that needed to be done first in app..

Any code contributions from your side or from someone who happen to come across this post are highly appreciated and welcome!

Let's continue this discussion here in case any news and ideas about this solution.

Cheers, Paul

pavlobu avatar Jan 31 '21 20:01 pavlobu

release 1.0.4 now supports polyfills for fixing blank browser page issue. Issues with WebRTC may still occur on old browsers.

pavlobu avatar Feb 04 '21 17:02 pavlobu

More findings, the library being currently used as wrapper to webRTC does not support Object RTC, and it is out of plans.

klarkc avatar Feb 04 '21 22:02 klarkc

Alright. it will take some time to remove simple-peer as a dependency. But seems we definitely need to move that way to support old browsers

pavlobu avatar Feb 04 '21 22:02 pavlobu

AdapterJS is opensource (Apache license), but its browser extensions (that are only required for screensharing) are commercial products.

Even with AdapterJS, in Edge, there is no support for RTCDataChannel, that is the same reason why simple-peer does not support MS Edge

klarkc avatar Feb 04 '21 22:02 klarkc

For RTCDataChannel there is this polyfill lib that implements it over websocket protocol

klarkc avatar Feb 04 '21 23:02 klarkc

@klarkc Simple peer supports wrtc option in constructor. here is what in docs :

wrtc - custom webrtc implementation, mainly useful in node to specify in the wrtc package. Contains an object with the properties:

RTCPeerConnection
RTCSessionDescription
RTCIceCandidate

we can get rid from sending video quality through RTCDataChannel as I did that to learn how it works. It can be sent throught regular websocket message as other messages are sent now.

pavlobu avatar Feb 22 '21 12:02 pavlobu

Will chrome 61 and safari9.5 on ipad2 be supported on the schedule?

williamdeve avatar Mar 20 '21 08:03 williamdeve

My old ipad4 is also not supported - I tried Chrome, Safari and Firefox. Is this the same kind of problem described here?

ibobak avatar Nov 13 '23 07:11 ibobak