aboutsummaryrefslogtreecommitdiff
path: root/source/packets.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@yandex.com>2022-01-23 14:06:14 +0100
committermetamuffin <metamuffin@yandex.com>2022-01-23 14:06:14 +0100
commita383c334a2e4ccb246a4a1092b1d053ccad19bd7 (patch)
treec747e39e25b94944da077df0a3ea20a2465540a8 /source/packets.ts
parent16fa95ac191287fe7f82b9f37c31342fe3b4b65a (diff)
downloadkeks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar
keks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar.bz2
keks-meet-a383c334a2e4ccb246a4a1092b1d053ccad19bd7.tar.zst
ported everything to deno! yay
Diffstat (limited to 'source/packets.ts')
-rw-r--r--source/packets.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/packets.ts b/source/packets.ts
new file mode 100644
index 0000000..ef65ce7
--- /dev/null
+++ b/source/packets.ts
@@ -0,0 +1,31 @@
+
+
+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;
+}
+
+
+export interface SCPacket {
+ sender: string,
+ data?: CSPacket,
+ join?: boolean, // user just joined
+ leave?: boolean, // user left
+ stable?: boolean // user "joined" because you joined aka. user was already there
+}
+export interface CSPacket {
+ receiver?: string
+ ice_candiate?: F_RTCIceCandidateInit
+ offer?: F_RTCSessionDescriptionInit
+ answer?: F_RTCSessionDescriptionInit
+}
+
+