Skip to content

Commit

Permalink
Remove Peerjs config
Browse files Browse the repository at this point in the history
  • Loading branch information
kern committed Dec 29, 2024
1 parent 8b963b0 commit f2cdd19
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
14 changes: 0 additions & 14 deletions src/components/Downloader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,6 @@ export function ConnectingToUploader({
</span>
</li>
</ul>

<p className="text-sm text-stone-500 dark:text-stone-400 italic">
Note: FilePizza is designed for direct transfers between known
parties and doesn't use{' '}
<a
href="https://en.wikipedia.org/wiki/Traversal_Using_Relays_around_NAT"
target="_blank"
rel="noopener noreferrer"
className="underline"
>
TURN
</a>{' '}
relay servers. This means it may not work on all networks.
</p>
</div>
</div>
<ReturnHome />
Expand Down
13 changes: 1 addition & 12 deletions src/components/WebRTCProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ import React, {
import Loading from './Loading'
import Peer from 'peerjs'

const ICE_SERVERS: RTCConfiguration = {
iceServers: [
{
urls:
process.env.NEXT_PUBLIC_STUN_SERVER ?? 'stun:stun.l.google.com:19302',
},
],
}

export type WebRTCPeerValue = {
peer: Peer
stop: () => void
Expand All @@ -39,9 +30,7 @@ let globalPeer: Peer | null = null

async function getOrCreateGlobalPeer(): Promise<Peer> {
if (!globalPeer) {
globalPeer = new Peer({
config: ICE_SERVERS,
})
globalPeer = new Peer()
}

if (globalPeer.id) {
Expand Down

0 comments on commit f2cdd19

Please sign in to comment.