summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client-web/public/assets/style/logger.css18
-rw-r--r--client-web/source/logger.ts8
-rw-r--r--client-web/source/protocol/crypto.ts2
-rw-r--r--readme.md25
4 files changed, 25 insertions, 28 deletions
diff --git a/client-web/public/assets/style/logger.css b/client-web/public/assets/style/logger.css
index 3d5c6e3..6cc70f3 100644
--- a/client-web/public/assets/style/logger.css
+++ b/client-web/public/assets/style/logger.css
@@ -10,6 +10,15 @@
padding: 0.2em;
}
+.logger-error {
+ font-size: 1.5em !important;
+ color: red;
+}
+.logger-warn {
+ font-size: 1.5em !important;
+ color: yellow;
+}
+
.logger-line {
font-size: 1em;
height: 1.2em;
@@ -26,15 +35,6 @@
animation-fill-mode: forwards;
}
-.logger-error {
- font-size: 2em;
- color: red;
-}
-.logger-warn {
- font-size: 2em;
- color: yellow;
-}
-
@keyframes appear {
from {
margin-top: -1.2em;
diff --git a/client-web/source/logger.ts b/client-web/source/logger.ts
index f8fa0b3..23f2cf6 100644
--- a/client-web/source/logger.ts
+++ b/client-web/source/logger.ts
@@ -30,17 +30,17 @@ export function log(k: LogScope | LogDesc, message: string, ...data: unknown[])
if (logger_container) {
const e = document.createElement("p")
e.classList.add("logger-line")
- if (d.error) e.classList.add(".logger-error")
- if (d.warn) e.classList.add(".logger-warn")
+ if (d.error) e.classList.add("logger-error")
+ else if (d.warn) e.classList.add("logger-warn")
+ else e.style.color = log_scope_color[d.scope]
e.textContent = `[${d.scope}] ${message}`
- if (!d.error && !d.warn) e.style.color = log_scope_color[d.scope]
logger_container.append(e)
setTimeout(() => {
e.classList.add("logger-line-disappear")
setTimeout(() => {
e.remove()
}, 1000 + 500)
- }, (d.error || d.warn) ? 60000 : 3000)
+ }, (d.error || d.warn) ? 20000 : 3000)
}
}
diff --git a/client-web/source/protocol/crypto.ts b/client-web/source/protocol/crypto.ts
index fb34e8d..742f22c 100644
--- a/client-web/source/protocol/crypto.ts
+++ b/client-web/source/protocol/crypto.ts
@@ -3,8 +3,6 @@ import { log } from "../logger.ts";
//! I am not a crypto expert at all! Please read carefully and report any issues to me.
export async function crypto_seeded_key(seed: string): Promise<CryptoKey> {
- if (seed.length < 8) log({ scope: "crypto", warn: true }, "Room name is very short. e2ee is insecure!")
-
log("crypto", "importing seed…")
const seed_key = await window.crypto.subtle.importKey(
"raw",
diff --git a/readme.md b/readme.md
index 10c11b3..941fd03 100644
--- a/readme.md
+++ b/readme.md
@@ -20,6 +20,7 @@ a web conferencing application
- Native client
- Prevent server from changing message sender
- Have a security professional look at the code
+- Test some options like `camera_facing_mode`
## Usage
@@ -36,22 +37,20 @@ cargo run --release
## Parameters
-For configuration options must be added either
-
-1. in options in the query parameters (e.g. `/myroom?username=alice`)
-2. in options in section of URL (e.g. `/myroom#rnnoise=no`).
-
+Configuration parameters are added like query params but **after** the section. (e.g `/room#mymeeting?username=alice`)
The page will not automatically reload if the section changes.
Booleans can be either `1`, `true`, `yes` or their opposites.
-| Option name | Type | Default | Description |
-| ----------------- | ------- | ------- | ---------------------------------------- |
-| `?username` | string | "guest" | Sets the username |
-| `#rnnoise` | boolean | true | Enables noise suppression with rnnoise |
-| `#mic_enabled` | boolean | false | Adds audio track on startup |
-| `#camera_enabled` | boolean | false | Adds camera track on startup |
-| `#screen_enabled` | boolean | false | Adds screen track on startup (wont work) |
-| `#mic_gain` | number | 1 | Amplifies the microphone volume |
+| Option name | Default | Description |
+| -------------------------- | --------- | -------------------------------------------------------------- |
+| `rnnoise` | `true` | Use RNNoise for noise suppression |
+| `native_noise_suppression` | `false` | Suggest the browser to do noise suppression |
+| `username` | `guest-…` | "Username |
+| `microphone_gain` | `1` | Amplify microphone volume |
+| `microphone_enabled` | `false` | Add one microphone track on startup |
+| `camera_enabled` | `false` | Add one camera track on startup |
+| `screencast_enabled` | `false` | Add one screencast track on startup |
+| `camera_facing_mode` | undefined | Prefer user-facing or env-facing camera (`environment`/`user`) |
## Protocol