Open huhsame opened 5 years ago
@huhsame why does the Chrome one say websocket connection failed? Default GUN runs on 8765 I assume you've changed it to 3000?
Interesting that Safari has a different format, could you share the format that worked for you?
I have no clue Safari :/ I know it is often lagging behind, I'd need to find old minimum-viable-WebRTC-datachannel-only examples on the web and re-run/rest them, where have to copy&paste the signaling info, see if it works or if it still fails in Safari. There are a lot of "WebRTC" libraries that "work" but then you discovery they fallback to WebSockets or something else.
@amark
The reason why WebSocket connection failed is that I shut down my server to test it without server, so that's not a problem and you might not need to mind it.
And I didn't use any different format from yours. the messages in the console are that I temporarily wrote in your webrtc.js code. I just made it print what event happens such as 'create', 'open', 'onDataChannel', 'onopen(= hi)', and 'onmessage'.
Anyway, I need to figure it out and make it work, so as you mentioned what you're gonna do, I'd also test other WebRTC libraries. I have no idea about WebRTC in detail X(
Safari : Version 13.0.2 (15608.2.30.1.1)
Thank you.
@huhsame the error you got Member RTCIceServer.urls is required and must be an instance of (DOMString or sequence)
...
You see, in Chrome/Other browsers, this is how it is formatted: https://github.com/amark/gun/blob/master/lib/webrtc.js#L23-L29
Maybe Safari requires it as RTCIceServer.urls = ['url', 'url', 'url']
? (I have no clue) but Safari shouldn't be complaining about the format if it is following same spec as Chrome/Firefox, etc.
I'm guessing your testing against iOS devices? And this is the need (since only Safari available on them), versus desktop?
mee too cannot work on ios,but desktop system is ok
noooooooooooooooo
does Safari just outright not support these RTC settings, or is it just some weird configuration bug? Can someone help figure out the magic Safari touch? (Apple and "web standards" hrrmmmmmmmm)
@amark After research, it has been found that mobile devices require forwarding based on relay servers, and webrtc P2P cannot nat. Even if you see the IP: port of P2P, it is still not possible to successfully establish a P2P network Welcome to https://chat.51pwn.com:2083
@amark desktop safari There's no problem, I can work well with webrtc here
noooooooooooooooo
does Safari just outright not support these RTC settings, or is it just some weird configuration bug? Can someone help figure out the magic Safari touch? (Apple and "web standards" hrrmmmmmmmm)
@hktalent just iOS or both? So should we close, or what is the course of action?
close, now I work ok on (iOS + macOS) + safari @amark you can see https://chat.51pwn.com:2083
I tested using lib/webrct.js It successfully works between Chrome and Chrome. But on Safari, WebRTC cannot createDataChannel.
1. Chrome - Chrome
it create data channel, and then it can send and recieve data even without server (websocket connection)
2. Safari
First of all, I got an error about iceServers on Safari.
So I changed
url
tourls
. After then, the error disappeared, but it still cannot connect with other peers. it creates WebRTC, and try to open. but that's all.Please take a look.