-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to connect to a peer in Safari on macOS #478
Comments
Sorry, I'm not updated about Safari, I don't even have access to it. But there are some people here that uses PeerJS with Safari, let's wait them. |
The error seems to come from the way Reliable is exported. source -> Changing the compiled code to the following works... and then [Error] Unhandled Promise Rejection: ReferenceError: Can't find variable: Reliable EDIT: An alternative for fixing this any not relying on this lib is to remove |
Wow, I haven't access to that repo. @tombertrand what do you recommend? the fix to the import or just remove If it's better to have it, I'll clone the repo and do the update. |
Tried tweeting and mailing to @michelle if she can merge this PR. Just hope she'll respond. |
I've experimented with Safari, fixing JS errors caused by import Peer from 'peerjs';
import Util from 'peerjs/lib/util';
// Host
const peer = new Peer(HOST_PEER_ID, { secure: true, debug: 3 });
// Guests
const guestPeer = new Peer(null, { secure: true, debug: 3 });
const guestConnection = guestPeer.connect(HOST_PEER_ID, {
reliable: Util.supports.reliable, // true / false depending if the browser supports reliable connection
}); |
I've reached @michelle and she merged the PR in the reliable repo. Also a good workaround @tombertrand. But it's still sad to see reliable connections not working on Safari :( |
It should just work then, because the package.json uses the latest master version from the repo. |
The problem turned out to be exactly as the error implies. I was passing in the array of url instead of urls and the array of actual strings containing the urls for stun servers. My mistake after all. |
Is this related to #574 in any way? I tried using safari. If Safari is the host, it fail silently. If I try to connect another browser (ex, Chrome) to Safari, I get the error
It seems to be a problem with |
Whenever I am trying to connect to a peer in Safari with specifying an option of { reliable: true } I get an error:
TypeError: Object is not a constructor (evaluating 'new Reliable(this._dc, util.debug)')
Is there a way I can still use reliable data channel in Safari?
The text was updated successfully, but these errors were encountered: