aboutsummaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/menu.ts2
-rw-r--r--client-web/source/user/remote.ts11
2 files changed, 11 insertions, 2 deletions
diff --git a/client-web/source/menu.ts b/client-web/source/menu.ts
index dd9e4d4..93deef1 100644
--- a/client-web/source/menu.ts
+++ b/client-web/source/menu.ts
@@ -38,7 +38,7 @@ export function info_br() {
export let chat_control: (s?: boolean) => void;
export function control_bar(state: AppState, side_ui_container: HTMLElement): HTMLElement {
- const leave = e("button", { icon: "leave", class: "abort", onclick() { window.location.href = "/" } },PO.leave)
+ const leave = e("button", { icon: "leave", class: "abort", onclick() { globalThis.location.href = "/" } }, PO.leave)
const chat = side_ui(side_ui_container, state.chat.element, "chat", PO.chat, state.chat)
const prefs = side_ui(side_ui_container, ui_preferences(), "settings", PO.settings)
const rwatches = side_ui(side_ui_container, ui_room_watches(state.conn), "room", PO.known_rooms)
diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts
index 4cb31a2..aa5b1b4 100644
--- a/client-web/source/user/remote.ts
+++ b/client-web/source/user/remote.ts
@@ -157,6 +157,7 @@ export class RemoteUser extends User {
async offer() {
this.negotiation_busy = true
const offer_description = await this.pc.createOffer()
+ // if (offer_description.sdp) offer_description.sdp = filter_sdp(offer_description.sdp)
await this.pc.setLocalDescription(offer_description)
log("webrtc", `sent offer: ${this.display_name}`, { offer: offer_description.sdp })
this.send_to({ offer: offer_description.sdp })
@@ -170,6 +171,7 @@ export class RemoteUser extends User {
}
async answer() {
const answer_description = await this.pc.createAnswer()
+ // if (answer_description.sdp) answer_description.sdp = filter_sdp(answer_description.sdp)
await this.pc.setLocalDescription(answer_description)
log("webrtc", `sent answer: ${this.display_name}`, { answer: answer_description.sdp })
this.send_to({ answer: answer_description.sdp })
@@ -219,4 +221,11 @@ export class RemoteUser extends User {
console.warn(e);
}
}
-} \ No newline at end of file
+}
+
+// function filter_sdp(s: string): string {
+// return s.split("\n")
+// .filter(l => l.search("VP8") == -1)
+// .filter(l => l.search("VP9") == -1)
+// .join("\n")
+// }