aboutsummaryrefslogtreecommitdiff
path: root/source/packets.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@yandex.com>2022-01-26 17:08:51 +0100
committermetamuffin <metamuffin@yandex.com>2022-01-26 17:08:51 +0100
commit4fdb01ab1935a18070efbd92879655360118a1ca (patch)
tree6edc8c00b2ca3a590d5745e14c2b7b46a7804c97 /source/packets.ts
parent8cc5a50b91a3d80b28b03191b246974d3aca9bf8 (diff)
downloadkeks-meet-4fdb01ab1935a18070efbd92879655360118a1ca.tar
keks-meet-4fdb01ab1935a18070efbd92879655360118a1ca.tar.bz2
keks-meet-4fdb01ab1935a18070efbd92879655360118a1ca.tar.zst
stuff
Diffstat (limited to 'source/packets.ts')
-rw-r--r--source/packets.ts22
1 files changed, 6 insertions, 16 deletions
diff --git a/source/packets.ts b/source/packets.ts
index ef65ce7..f42d99b 100644
--- a/source/packets.ts
+++ b/source/packets.ts
@@ -1,27 +1,17 @@
-
+// copy pasted from dom.lib.d.ts because it can not be referenced in the server.
type F_RTCSdpType = "answer" | "offer" | "pranswer" | "rollback";
-interface F_RTCSessionDescriptionInit {
- sdp?: string;
- type: F_RTCSdpType;
-}
-
-interface F_RTCIceCandidateInit {
- candidate?: string;
- sdpMLineIndex?: number | null;
- sdpMid?: string | null;
- usernameFragment?: string | null;
-}
-
+interface F_RTCSessionDescriptionInit { sdp?: string; type: F_RTCSdpType; }
+interface F_RTCIceCandidateInit { candidate?: string; sdpMLineIndex?: number | null; sdpMid?: string | null; usernameFragment?: string | null; }
-export interface SCPacket {
+export interface PacketC {
sender: string,
- data?: CSPacket,
+ data?: PacketS,
join?: boolean, // user just joined
leave?: boolean, // user left
stable?: boolean // user "joined" because you joined aka. user was already there
}
-export interface CSPacket {
+export interface PacketS {
receiver?: string
ice_candiate?: F_RTCIceCandidateInit
offer?: F_RTCSessionDescriptionInit