summaryrefslogtreecommitdiff
path: root/client-web/source/user/remote.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-10-03 15:18:11 +0200
committermetamuffin <metamuffin@disroot.org>2022-10-03 15:18:11 +0200
commit5cae202a17fd0b5afbfaeb7549b5619909cc03c1 (patch)
treeae17631337a00cebd1acb227a917c426c6166413 /client-web/source/user/remote.ts
parent333a828b418344dad0f219026562c41727fbc628 (diff)
downloadkeks-meet-5cae202a17fd0b5afbfaeb7549b5619909cc03c1.tar
keks-meet-5cae202a17fd0b5afbfaeb7549b5619909cc03c1.tar.bz2
keks-meet-5cae202a17fd0b5afbfaeb7549b5619909cc03c1.tar.zst
file transfer works, sort-of
Diffstat (limited to 'client-web/source/user/remote.ts')
-rw-r--r--client-web/source/user/remote.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts
index 2c3fd58..5517dbe 100644
--- a/client-web/source/user/remote.ts
+++ b/client-web/source/user/remote.ts
@@ -61,7 +61,7 @@ export class RemoteUser extends User {
}
this.pc.onnegotiationneeded = () => {
log("webrtc", `negotiation needed: ${this.display_name}`)
- if (this.negotiation_busy && this.pc.signalingState == "stable") return
+ // if (this.pc.signalingState != "stable") return
this.offer()
this.update_stats()
}
@@ -119,8 +119,9 @@ export class RemoteUser extends User {
}
if (message.request_stop) {
const sender = this.senders.get(message.request_stop.id)
- if (!sender) return log({ scope: "*", warn: true }, "somebody requested us to stop transmitting an unknown resource")
- this.pc.removeTrack(sender)
+ if (sender) this.pc.removeTrack(sender)
+ const dc = this.data_channels.get(message.request_stop.id)
+ if (dc) dc.close()
}
}
send_to(message: RelayMessage) {
@@ -168,14 +169,14 @@ export class RemoteUser extends User {
let stuff = "";
stuff += `ice-conn=${this.pc.iceConnectionState}; ice-gathering=${this.pc.iceGatheringState}; ice-trickle=${this.pc.canTrickleIceCandidates}; signaling=${this.pc.signalingState};\n`
stats.forEach(s => {
- console.log("stat", s);
+ // console.log("stat", s);
if (s.type == "candidate-pair" && s.selected) {
//@ts-ignore trust me, this works
if (!stats.get) return console.warn("no RTCStatsReport.get");
//@ts-ignore trust me, this works
const cpstat = stats.get(s.localCandidateId)
if (!cpstat) return console.warn("no stats");
- console.log("cp", cpstat);
+ // console.log("cp", cpstat);
stuff += `via ${cpstat.candidateType}:${cpstat.protocol}:${cpstat.address}\n`
} else if (s.type == "codec") {
stuff += `using ${s.codecType ?? "dec/enc"}:${s.mimeType}(${s.sdpFmtpLine})\n`
@@ -186,5 +187,4 @@ export class RemoteUser extends User {
console.warn(e);
}
}
-
} \ No newline at end of file