Skip to content

Commit 0e53ec8

Browse files
committed
ws comments
1 parent 3b6f9a6 commit 0e53ec8

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/client/controllers/webrtcPeerController.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,33 @@ const webrtcPeerController = {
3131
],
3232
};
3333
let peerConnection = new RTCPeerConnection(servers);
34+
// ? if you want to attempt to build a websocket with a live connection through ngrok,
35+
// ? give it a shot - we attempted below, this may be helpful, probably isn't (-Isaac M)
36+
37+
// let wsIp = newRequestWebRTC.webRTCWebsocketServer;
38+
// const socket = io('http://localhost:3000');
39+
40+
// socket.on('connect', async () => {
41+
// // try {
42+
// // const url = await ngrok.connect({
43+
// // proto: 'http',
44+
// // addr: 3000,
45+
// // });
46+
// // console.log(`ngrok tunnel opened at: ${url}`);
47+
// // // client.emit('ngrokUrl', url);
48+
// // } catch (err) {
49+
// // console.error('Failed to create ngrok tunnel:', err);
50+
// // }
51+
// console.log('Connected to server');
52+
// });
53+
54+
// socket.on('disconnect', () => {
55+
// console.log('Disconnected from server');
56+
// });
57+
58+
// socket.on('message', (message: string) => {
59+
// console.log('Message:', message);
60+
// });
3461

3562
if (newRequestWebRTC.webRTCDataChannel === 'Video') {
3663
let localStream = await navigator.mediaDevices.getUserMedia({

0 commit comments

Comments
 (0)