3 ms·
Can you link to a WebRTC Data Channel URL that works on iOS Safari? Here's a simple WebRTC DataChannel demo that doesn't work on iOS 12.0 Safari https://webrt
by writepub 8y ago
Can you link to a WebRTC Data Channel URL that works on iOS Safari?
Here's a simple WebRTC DataChannel demo that doesn't work on iOS 12.0 Safari
https://webrtc.github.io/samples/src/content/datachannel/basic/ https://webrtc.github.io/samples/src/content/datachannel/bas...
- matthewmacleod 8y agoI'm afraid not – none of the available demos seem to work, but I don't know why that would be the case. All I can say is that I worked with the technology pretty extensively, and was absolutely able to use a data channel between Chrome and Safari 11 on both desktop and mobile without any issues.
- writepub 8y agoIt doesn't work because iOS Safari hasn't implemented WebRTC Data Channels.
- matthewmacleod 8y agoI'm sorry, this is not correct. Like I said, I used data channels in Safari on iOS only a few weeks ago, and I'm not making that up! Since you're not convinced, I looked into it a bit more, and the reason most of the available demos don't work is down to a difference in behaviour between Safari and other browsers, probably to do with address selection for the connection. WebRTC can leak private network configuration in some cases, so Safari seems to be pretty strict in that it requires `getUserMedia` to be called before allowing a data-channel-only to be established. I made this into a small demo (https://codepen.io/anon/pen/GYrqGL https://codepen.io/anon/pen/GYrqGL) and you can see after a couple of clicks of 'connect' that a data channel connection is established and works as expected. This is a bit of a privacy/usability tradeoff. But data channels are very much implemented in Safari.
- writepub 8y agoThanks for the clarification. Your time is much appreciated! Cheers