summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-12 20:50:29 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-08-12 20:50:29 +0200
commitb1f3c9bc6aa26262995266e3eaacec9820e09e96 (patch)
tree22d118be5d851a293195ac18f7b09dc1a2491dbf /src
parentMerge branch 'webrtc' (diff)
downloadserver-b1f3c9bc6aa26262995266e3eaacec9820e09e96.tar.xz
:sparkles: webrtc
Diffstat (limited to 'src')
-rw-r--r--src/Server.ts43
-rw-r--r--src/index.ts0
-rw-r--r--src/start.ts3
-rw-r--r--src/test.ts8
4 files changed, 0 insertions, 54 deletions
diff --git a/src/Server.ts b/src/Server.ts
deleted file mode 100644
index bb82e659..00000000
--- a/src/Server.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { Server as WebSocketServer } from "ws";
-import { Config, db } from "@fosscord/server-util";
-import mediasoup from "mediasoup"
-
-var port = Number(process.env.PORT);
-if (isNaN(port)) port = 3004;
-
-export class Server {
-	public ws: WebSocketServer;
-	public turn: any;
-
-	constructor() {
-		this.ws = new WebSocketServer({
-			port,
-			maxPayload: 4096,
-		});
-		this.ws.on("connection", (socket) => {
-			socket.on("message", (message) => {
-				socket.emit(
-					JSON.stringify({
-						op: 2,
-						d: {
-							ssrc: 1,
-							ip: "127.0.0.1",
-							port: 3004,
-							modes: ["xsalsa20_poly1305", "xsalsa20_poly1305_suffix", "xsalsa20_poly1305_lite"],
-							heartbeat_interval: 1,
-						},
-					})
-				);
-			});
-		});
-
-	}
-
-	async listen(): Promise<void> {
-		// @ts-ignore
-		await (db as Promise<Connection>);
-		await Config.init();
-		console.log("[DB] connected");
-		console.log(`[WebRTC] online on 0.0.0.0:${port}`);
-	}
-}
diff --git a/src/index.ts b/src/index.ts
deleted file mode 100644
index e69de29b..00000000
--- a/src/index.ts
+++ /dev/null
diff --git a/src/start.ts b/src/start.ts
deleted file mode 100644
index 68867a2c..00000000
--- a/src/start.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Server } from "./Server";
-
-const server = new Server();
diff --git a/src/test.ts b/src/test.ts
deleted file mode 100644
index df407b56..00000000
--- a/src/test.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { getSupportedRtpCapabilities } from "mediasoup";
-
-async function test() {
-	console.log(getSupportedRtpCapabilities());
-}
-setTimeout(() => {}, 1000000);
-
-test();