aboutsummaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/resource/track.ts4
-rw-r--r--client-web/source/user/remote.ts3
2 files changed, 3 insertions, 4 deletions
diff --git a/client-web/source/resource/track.ts b/client-web/source/resource/track.ts
index d0c56c7..9c337c1 100644
--- a/client-web/source/resource/track.ts
+++ b/client-web/source/resource/track.ts
@@ -74,10 +74,8 @@ export function new_local_track(info: ProvideInfo, track: TrackHandle, ...extra_
function create_track_display(target: HTMLElement, track: TrackHandle): HTMLElement {
const is_video = track.kind == "video"
const is_audio = track.kind == "audio"
-
+
const stream = new MediaStream([track.track])
-
-
const media_el = is_video
? document.createElement("video")
: document.createElement("audio")
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts
index b651964..f6b64ea 100644
--- a/client-web/source/user/remote.ts
+++ b/client-web/source/user/remote.ts
@@ -158,7 +158,8 @@ export class RemoteUser extends User {
async on_answer(answer: string) {
log("webrtc", `got answer: ${this.display_name}`, { answer })
const answer_description = new RTCSessionDescription({ sdp: answer, type: "answer" })
- await this.pc.setRemoteDescription(answer_description)
+ if (this.pc.signalingState == "have-local-offer") // TODO why is this even necessary?
+ await this.pc.setRemoteDescription(answer_description)
this.negotiation_busy = false
}