Compare commits
260 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d3d21fa86c | ||
|
|
47a4c5aa88 | ||
|
|
efc25fd4ec | ||
|
|
8f8dd5f803 | ||
|
|
2a6981c58d | ||
|
|
eff8847586 | ||
|
|
166b9fede5 | ||
|
|
5dd7c3ad8d | ||
|
|
cc2402e61c | ||
|
|
66a582dd5f | ||
|
|
f0a6f5919e | ||
|
|
5ef0486eff | ||
|
|
b1a5417b63 | ||
|
|
e129e90dd8 | ||
|
|
5af7c9e7c7 | ||
|
|
9f924aef64 | ||
|
|
a0da11ea78 | ||
|
|
48cf604bd1 | ||
|
|
00c44fb38a | ||
|
|
062802b3e9 | ||
|
|
ce3d315d50 | ||
|
|
0e50679db5 | ||
|
|
3db081440e | ||
|
|
a9b2ca01a7 | ||
|
|
af4f27cbbf | ||
|
|
3f8848981d | ||
|
|
aa519f3c67 | ||
|
|
99f06b0322 | ||
|
|
e67290550c | ||
|
|
3c118f0cf7 | ||
|
|
9c2f4be17c | ||
|
|
dc8d0fd81b | ||
|
|
ae40dea7ec | ||
|
|
85380c8142 | ||
|
|
6560d9eb1a | ||
|
|
69099772e0 | ||
|
|
cf1a7f2e21 | ||
|
|
eeb1f4baaf | ||
|
|
568c989ff7 | ||
|
|
8451296f3a | ||
|
|
606358c51b | ||
|
|
fd0956bbc5 | ||
|
|
c01e363639 | ||
|
|
0114db7d2d | ||
|
|
e93dfb54d2 | ||
|
|
f1ee3604de | ||
|
|
d3111758b7 | ||
|
|
abdb85226f | ||
|
|
a56ef52eb0 | ||
|
|
01f20bf6c0 | ||
|
|
aae86ed830 | ||
|
|
172ff266a6 | ||
|
|
d7ecbff9ed | ||
|
|
f0f2ffe972 | ||
|
|
491b0991cb | ||
|
|
a961647e86 | ||
|
|
207554f067 | ||
|
|
b0ba366a2c | ||
|
|
047fc822d6 | ||
|
|
7d454645d0 | ||
|
|
fcb923f6db | ||
|
|
e3c34a7145 | ||
|
|
1c9b2a24d9 | ||
|
|
7ab94cb003 | ||
|
|
239095321a | ||
|
|
caf90d851e | ||
|
|
a74733f6bc | ||
|
|
440c617738 | ||
|
|
0f7ee3b860 | ||
|
|
dc15fbc8c9 | ||
|
|
d7e6c8c913 | ||
|
|
7c5c4d1870 | ||
|
|
2df8488c20 | ||
|
|
d270756443 | ||
|
|
8dd58d7e5c | ||
|
|
d148a81f91 | ||
|
|
9587dd7352 | ||
|
|
099dcd28c7 | ||
|
|
e925e7e060 | ||
|
|
e3d5c84b17 | ||
|
|
6f4ab0d3ab | ||
|
|
283b5d4504 | ||
|
|
6dc26392d7 | ||
|
|
4572e35339 | ||
|
|
6cad89b20c | ||
|
|
4c1168aaf7 | ||
|
|
57e79862a5 | ||
|
|
93a47e7009 | ||
|
|
d4f0300c82 | ||
|
|
4181780040 | ||
|
|
b19150bbba | ||
|
|
f11e1fac6b | ||
|
|
0269753f59 | ||
|
|
f6c95461e4 | ||
|
|
bfe65adb51 | ||
|
|
e031340ccb | ||
|
|
c70536996e | ||
|
|
a71a1c5c93 | ||
|
|
f7fc03cdc9 | ||
|
|
52dccff229 | ||
|
|
9c8692d99e | ||
|
|
69826b4de0 | ||
|
|
f2a7de2d8e | ||
|
|
2318f2c4a0 | ||
|
|
515e00b763 | ||
|
|
836c3b5614 | ||
|
|
403ee79d61 | ||
|
|
ecf5f9916c | ||
|
|
4e8146bc9c | ||
|
|
323dba620d | ||
|
|
8d56a8e8fc | ||
|
|
e3a3859739 | ||
|
|
15350b6989 | ||
|
|
4c33a29aef | ||
|
|
ecc3693c47 | ||
|
|
7153ead8cb | ||
|
|
4ddf9ce29c | ||
|
|
32476571fb | ||
|
|
0df028888e | ||
|
|
8ab7ee9298 | ||
|
|
3c7cb3cb96 | ||
|
|
c59c9053c9 | ||
|
|
f1ad2e2f8a | ||
|
|
f30dc9593f | ||
|
|
a0bed20576 | ||
|
|
742482d0a8 | ||
|
|
ac17ae6557 | ||
|
|
1c0dedc27f | ||
|
|
4224916b81 | ||
|
|
12633f8e12 | ||
|
|
6b14e622dd | ||
|
|
060a50d27a | ||
|
|
a9e63ddbcc | ||
|
|
4459eaeb9d | ||
|
|
f5e2161a9e | ||
|
|
8437e263af | ||
|
|
4719a92ffc | ||
|
|
9b398590b9 | ||
|
|
cfcd7e6b22 | ||
|
|
d96643d003 | ||
|
|
d1aa34b2e0 | ||
|
|
1792ef7e38 | ||
|
|
1dd70ea22d | ||
|
|
28368da60a | ||
|
|
4114622d44 | ||
|
|
6f2b32ead5 | ||
|
|
6f13989819 | ||
|
|
1184b71396 | ||
|
|
56bd54a645 | ||
|
|
18fa1371d3 | ||
|
|
f6f0fce2b2 | ||
|
|
a1b6e91354 | ||
|
|
6ad4663508 | ||
|
|
30a224e20e | ||
|
|
3c7f01a510 | ||
|
|
2b5de6db03 | ||
|
|
8eafb1ae4a | ||
|
|
3da4b4eeef | ||
|
|
c31185ffef | ||
|
|
0de1aa74ee | ||
|
|
838137c83b | ||
|
|
f627835646 | ||
|
|
9442b314b2 | ||
|
|
7221b7c3a2 | ||
|
|
370a6579fb | ||
|
|
5bec960112 | ||
|
|
da7760d7ab | ||
|
|
a17ffcc327 | ||
|
|
d211d27817 | ||
|
|
0637804d61 | ||
|
|
a2b3e098b6 | ||
|
|
4bcddad316 | ||
|
|
e2293665f9 | ||
|
|
95eca18207 | ||
|
|
2f33902ea9 | ||
|
|
6999765f39 | ||
|
|
480e46c5b2 | ||
|
|
bb5c382fd0 | ||
|
|
2b71a6c4f4 | ||
|
|
dd1485a277 | ||
|
|
caea22fa89 | ||
|
|
858c68baf1 | ||
|
|
de3bad3810 | ||
|
|
88f3b30040 | ||
|
|
928f1c1d6f | ||
|
|
711cdf9a60 | ||
|
|
b2317dac84 | ||
|
|
fec299ab20 | ||
|
|
5e4aa53997 | ||
|
|
0dcaa90650 | ||
|
|
7b88c4330e | ||
|
|
b061cbfb2f | ||
|
|
2435846f66 | ||
|
|
23ddd73f4f | ||
|
|
390442a4c3 | ||
|
|
c824ea6f9a | ||
|
|
28196a2e9d | ||
|
|
5b70def4d2 | ||
|
|
2cd549cdc8 | ||
|
|
e0089a0aee | ||
|
|
61a0534984 | ||
|
|
29223b62ad | ||
|
|
a52251befa | ||
|
|
30f75c6cd2 | ||
|
|
8fa23b7da9 | ||
|
|
277081ee2a | ||
|
|
3a7983d2de | ||
|
|
3b06258e40 | ||
|
|
c53dbfde27 | ||
|
|
889a31489b | ||
|
|
cb0ba6d827 | ||
|
|
e18c69ec89 | ||
|
|
47e0ca2eda | ||
|
|
e870188be3 | ||
|
|
dd67a45671 | ||
|
|
707272bf19 | ||
|
|
dc725f90a9 | ||
|
|
a1aca7bdf2 | ||
|
|
773f2e009d | ||
|
|
5e6c33b3b5 | ||
|
|
72403d1aea | ||
|
|
74b218af8c | ||
|
|
c2b78d59c6 | ||
|
|
21458c8840 | ||
|
|
f96ce8985d | ||
|
|
848e28ef92 | ||
|
|
4bf1fbfd8e | ||
|
|
34a72679a1 | ||
|
|
77c6357b08 | ||
|
|
66c3d05ae9 | ||
|
|
c4f029ae4f | ||
|
|
8978f94fe4 | ||
|
|
40f5c53c05 | ||
|
|
5f41f9476b | ||
|
|
d1ba5dff38 | ||
|
|
313ebe258e | ||
|
|
48493a96e1 | ||
|
|
ec88907981 | ||
|
|
9c0adfd32e | ||
|
|
f6fb65be49 | ||
|
|
3d6ae3fbc3 | ||
|
|
359e055314 | ||
|
|
6696af9b3f | ||
|
|
9b02d17224 | ||
|
|
6b36604c84 | ||
|
|
ef9934ce6b | ||
|
|
e7a7cf3eb8 | ||
|
|
63ede0b51a | ||
|
|
2d91b43a7d | ||
|
|
f8f5d2011d | ||
|
|
521b0a857a | ||
|
|
31450219c8 | ||
|
|
22d2404370 | ||
|
|
c519e13885 | ||
|
|
1e2cd97764 | ||
|
|
0cca5ae174 | ||
|
|
971eca59ff | ||
|
|
4c59638d00 | ||
|
|
33dd2758d7 | ||
|
|
d40e467b7d |
3
.github/workflows/build.yaml
vendored
3
.github/workflows/build.yaml
vendored
@@ -23,9 +23,6 @@ jobs:
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
# This appears to be necessary to stop Vite from OOMing
|
||||
# https://github.com/vitejs/vite/issues/2433
|
||||
NODE_OPTIONS: "--max-old-space-size=16384"
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
||||
3
.github/workflows/publish.yaml
vendored
3
.github/workflows/publish.yaml
vendored
@@ -40,9 +40,6 @@ jobs:
|
||||
SENTRY_URL: ${{ secrets.SENTRY_URL }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
VITE_APP_VERSION: ${{ github.event.release.tag_name }}
|
||||
# This appears to be necessary to stop Vite from OOMing
|
||||
# https://github.com/vitejs/vite/issues/2433
|
||||
NODE_OPTIONS: "--max-old-space-size=16384"
|
||||
|
||||
- name: Create Tarball
|
||||
env:
|
||||
|
||||
18
config/otel_dev/README.md
Normal file
18
config/otel_dev/README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# OpenTelemetry Collector for development
|
||||
|
||||
This directory contains a docker compose file that starts a jaeger all-in-one instance
|
||||
with an in-memory database, along with a standalone OpenTelemetry collector that forwards
|
||||
traces into the jaeger. Jaeger has a built-in OpenTelemetry collector, but it can't be
|
||||
configured to send CORS headers so can't be used from a browser. This sets the config on
|
||||
the collector to send CORS headers.
|
||||
|
||||
This also adds an nginx to add CORS headers to the jaeger query endpoint, such that it can
|
||||
be used from webapps like stalk (https://deniz.co/stalk/). The CORS enabled endpoint is
|
||||
exposed on port 16687. To use stalk, you should simply be able to navigate to it and add
|
||||
http://127.0.0.1:16687/api as a data source.
|
||||
|
||||
(Yes, we could enable the OTLP collector in jaeger all-in-one and passed this through
|
||||
the nginx to enable CORS too, rather than running a separate collector. There's no reason
|
||||
it's done this way other than that I'd already set up the separate collector.)
|
||||
|
||||
Running `docker compose up` in this directory should be all you need.
|
||||
41
config/otel_dev/collector-gateway.yaml
Normal file
41
config/otel_dev/collector-gateway.yaml
Normal file
@@ -0,0 +1,41 @@
|
||||
receivers:
|
||||
otlp:
|
||||
protocols:
|
||||
http:
|
||||
endpoint: 0.0.0.0:4318
|
||||
cors:
|
||||
allowed_origins:
|
||||
# This can't be '*' because opentelemetry-js uses sendBeacon which always operates
|
||||
# in 'withCredentials' mode, which browsers don't allow with an allow-origin of '*'
|
||||
#- "https://pr976--element-call.netlify.app"
|
||||
- "http://*"
|
||||
allowed_headers:
|
||||
- "*"
|
||||
processors:
|
||||
batch:
|
||||
timeout: 1s
|
||||
resource:
|
||||
attributes:
|
||||
- key: test.key
|
||||
value: "test-value"
|
||||
action: insert
|
||||
exporters:
|
||||
logging:
|
||||
loglevel: info
|
||||
jaeger:
|
||||
endpoint: jaeger-all-in-one:14250
|
||||
tls:
|
||||
insecure: true
|
||||
extensions:
|
||||
health_check:
|
||||
pprof:
|
||||
endpoint: :1888
|
||||
zpages:
|
||||
endpoint: :55679
|
||||
service:
|
||||
extensions: [pprof, zpages, health_check]
|
||||
pipelines:
|
||||
traces:
|
||||
receivers: [otlp]
|
||||
processors: [batch, resource]
|
||||
exporters: [logging, jaeger]
|
||||
29
config/otel_dev/docker-compose.yaml
Normal file
29
config/otel_dev/docker-compose.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
version: "2"
|
||||
services:
|
||||
# Jaeger
|
||||
jaeger-all-in-one:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
ports:
|
||||
- "16686:16686"
|
||||
- "14268"
|
||||
- "14250"
|
||||
# Collector
|
||||
collector-gateway:
|
||||
image: otel/opentelemetry-collector:latest
|
||||
volumes:
|
||||
- ./collector-gateway.yaml:/etc/collector-gateway.yaml
|
||||
command: ["--config=/etc/collector-gateway.yaml"]
|
||||
ports:
|
||||
- "1888:1888" # pprof extension
|
||||
- "13133:13133" # health_check extension
|
||||
- "4317:4317" # OTLP gRPC receiver
|
||||
- "4318:4318" # OTLP HTTP receiver
|
||||
- "55670:55679" # zpages extension
|
||||
depends_on:
|
||||
- jaeger-all-in-one
|
||||
nginx:
|
||||
image: nginxinc/nginx-unprivileged:latest
|
||||
volumes:
|
||||
- ./nginx_otel.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
ports:
|
||||
- "16687:8080"
|
||||
16
config/otel_dev/nginx_otel.conf
Normal file
16
config/otel_dev/nginx_otel.conf
Normal file
@@ -0,0 +1,16 @@
|
||||
server {
|
||||
listen 8080;
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
proxy_pass http://jaeger-all-in-one:16686/;
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
|
||||
if ($request_method = OPTIONS) {
|
||||
add_header Access-Control-Allow-Origin *;
|
||||
add_header Content-Type text/plain;
|
||||
add_header Content-Length 0;
|
||||
return 204;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
package.json
11
package.json
@@ -3,7 +3,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"build": "NODE_OPTIONS=--max-old-space-size=16384 vite build",
|
||||
"serve": "vite preview",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"build-storybook": "build-storybook",
|
||||
@@ -19,6 +19,13 @@
|
||||
"dependencies": {
|
||||
"@juggle/resize-observer": "^3.3.1",
|
||||
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
|
||||
"@opentelemetry/api": "^1.4.0",
|
||||
"@opentelemetry/context-zone": "^1.9.1",
|
||||
"@opentelemetry/exporter-jaeger": "^1.9.1",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.35.1",
|
||||
"@opentelemetry/instrumentation-document-load": "^0.31.1",
|
||||
"@opentelemetry/instrumentation-user-interaction": "^0.32.1",
|
||||
"@opentelemetry/sdk-trace-web": "^1.9.1",
|
||||
"@react-aria/button": "^3.3.4",
|
||||
"@react-aria/dialog": "^3.1.4",
|
||||
"@react-aria/focus": "^3.5.0",
|
||||
@@ -46,7 +53,7 @@
|
||||
"i18next-browser-languagedetector": "^6.1.8",
|
||||
"i18next-http-backend": "^1.4.4",
|
||||
"lodash": "^4.17.21",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#da03c3b529576a8fcde6f2c9a171fa6cca012830",
|
||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#3cfad3cdeb7b19b8e0e7015784efd803cb9542f1",
|
||||
"matrix-widget-api": "^1.3.1",
|
||||
"mermaid": "^8.13.8",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"Create account": "Създай акаунт",
|
||||
"Debug log": "Debug логове",
|
||||
"Debug log request": "Заявка за debug логове",
|
||||
"Description (optional)": "Описание (незадължително)",
|
||||
"Details": "Детайли",
|
||||
"Developer": "Разработчик",
|
||||
"Display name": "Име/псевдоним",
|
||||
@@ -34,7 +33,6 @@
|
||||
"Full screen": "Цял екран",
|
||||
"Go": "Напред",
|
||||
"Grid layout menu": "Меню \"решетков изглед\"",
|
||||
"Having trouble? Help us fix it.": "Имате проблем? Помогнете да го поправим.",
|
||||
"Home": "Начало",
|
||||
"Include debug logs": "Включи debug логове",
|
||||
"Incompatible versions": "Несъвместими версии",
|
||||
@@ -46,7 +44,6 @@
|
||||
"Join call now": "Влез в разговора сега",
|
||||
"Join existing call?": "Присъединяване към съществуващ разговор?",
|
||||
"Leave": "Напусни",
|
||||
"Loading room…": "Напускане на стаята…",
|
||||
"Loading…": "Зареждане…",
|
||||
"Local volume": "Локална сила на звука",
|
||||
"Logging in…": "Влизане…",
|
||||
@@ -56,7 +53,6 @@
|
||||
"Microphone permissions needed to join the call.": "Необходими са разрешения за микрофона за да можете да се присъедините в разговора.",
|
||||
"Microphone {{n}}": "Микрофон {{n}}",
|
||||
"More": "Още",
|
||||
"More menu": "Мено \"още\"",
|
||||
"Mute microphone": "Заглуши микрофона",
|
||||
"No": "Не",
|
||||
"Not now, return to home screen": "Не сега, върни се на началния екран",
|
||||
@@ -77,8 +73,6 @@
|
||||
"Release to stop": "Отпуснете за да спрете",
|
||||
"Remove": "Премахни",
|
||||
"Return to home screen": "Връщане на началния екран",
|
||||
"Save": "Запази",
|
||||
"Saving…": "Запазване…",
|
||||
"Select an option": "Изберете опция",
|
||||
"Send debug logs": "Изпратете debug логове",
|
||||
"Sending…": "Изпращане…",
|
||||
@@ -93,7 +87,6 @@
|
||||
"Spotlight": "Прожектор",
|
||||
"Stop sharing screen": "Спри споделянето на екрана",
|
||||
"Submit feedback": "Изпрати обратна връзка",
|
||||
"Submitting feedback…": "Изпращане на обратна връзка…",
|
||||
"Take me Home": "Отиди в Начало",
|
||||
"Talk over speaker": "Говорете заедно с говорителя",
|
||||
"Talking…": "Говорене…",
|
||||
@@ -104,7 +97,6 @@
|
||||
"Turn off camera": "Изключи камерата",
|
||||
"Turn on camera": "Включи камерата",
|
||||
"Unmute microphone": "Включи микрофона",
|
||||
"User ID": "Потребителски идентификатор",
|
||||
"User menu": "Потребителско меню",
|
||||
"Username": "Потребителско име",
|
||||
"Version: {{version}}": "Версия: {{version}}",
|
||||
|
||||
@@ -26,14 +26,12 @@
|
||||
"Version: {{version}}": "Verze: {{version}}",
|
||||
"Username": "Uživatelské jméno",
|
||||
"User menu": "Uživatelské menu",
|
||||
"User ID": "ID uživatele",
|
||||
"Unmute microphone": "Zapnout mikrofon",
|
||||
"Turn on camera": "Zapnout kameru",
|
||||
"Turn off camera": "Vypnout kameru",
|
||||
"This call already exists, would you like to join?": "Tento hovor již existuje, chcete se připojit?",
|
||||
"Thanks! We'll get right on it.": "Děkujeme! Hned se na to vrhneme.",
|
||||
"Take me Home": "Domovská obrazovka",
|
||||
"Submitting feedback…": "Odesílání zpětné vazby…",
|
||||
"Submit feedback": "Dát feedback",
|
||||
"Stop sharing screen": "Zastavit sdílení obrazovek",
|
||||
"Speaker {{n}}": "Reproduktor {{n}}",
|
||||
@@ -48,8 +46,6 @@
|
||||
"Sending debug logs…": "Posílání ladícího záznamu…",
|
||||
"Send debug logs": "Poslat ladící záznam",
|
||||
"Select an option": "Vyberte možnost",
|
||||
"Saving…": "Ukládání…",
|
||||
"Save": "Uložit",
|
||||
"Return to home screen": "Vrátit se na domácí obrazovku",
|
||||
"Remove": "Odstranit",
|
||||
"Registering…": "Registrování…",
|
||||
@@ -71,7 +67,6 @@
|
||||
"Logging in…": "Přihlašování se…",
|
||||
"Local volume": "Lokální hlasitost",
|
||||
"Loading…": "Načítání…",
|
||||
"Loading room…": "Načítání místnosti…",
|
||||
"Leave": "Opustit hovor",
|
||||
"Join call now": "Připojit se k hovoru",
|
||||
"Join call": "Připojit se k hovoru",
|
||||
@@ -91,12 +86,10 @@
|
||||
"Walkie-talkie call name": "Jméno vysílačkového hovoru",
|
||||
"Walkie-talkie call": "Vysílačkový hovor",
|
||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Vysílačkový hovor",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Zapnout jedno-klávesové zkratky, např. 'm' pro vypnutí/zapnutí mikrofonu.",
|
||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||
"Talking…": "Mluvení…",
|
||||
"Talk over speaker": "Mluvit přes mluvčího",
|
||||
"Spotlight": "Soustředěný mód",
|
||||
"Single-key keyboard shortcuts": "Jedno-klávesová klávesnice",
|
||||
"Release to stop": "Pusťte pro ukončení",
|
||||
"Release spacebar key to stop": "Pusťte mezerník pro ukončení",
|
||||
"Recaptcha not loaded": "Recaptcha se nenačetla",
|
||||
@@ -105,11 +98,9 @@
|
||||
"Press and hold spacebar to talk over {{name}}": "Zmáčkněte a držte mezerník, abyste mluvili přes {{name}}",
|
||||
"Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}</1>": "Ostatní uživatelé se pokoušejí připojit k tomuto hovoru s nekompatibilních verzí. Tito uživatelé by se měli ujistit, že stránku načetli znovu:<1>{userLis}</1>",
|
||||
"Not registered yet? <2>Create an account</2>": "Nejste registrovaní? <2>Vytvořit účet</2>",
|
||||
"More menu": "Další možnosti",
|
||||
"Join existing call?": "Připojit se k existujícimu hovoru?",
|
||||
"Include debug logs": "Zahrnout ladící záznamy",
|
||||
"Home": "Domov",
|
||||
"Having trouble? Help us fix it.": "Máte problémy? Pomozte nám je spravit.",
|
||||
"Grid layout menu": "Menu rozložení",
|
||||
"Go": "Pokračovat",
|
||||
"Full screen": "Zvětšit na celou obrazovku",
|
||||
@@ -121,7 +112,6 @@
|
||||
"Display name": "Zobrazované jméno",
|
||||
"Developer": "Vývojář",
|
||||
"Details": "Detaily",
|
||||
"Description (optional)": "Popis (nepovinný)",
|
||||
"Debug log request": "Žádost o protokoly ladění",
|
||||
"Debug log": "Protokoly ladění",
|
||||
"Create account": "Vytvořit účet",
|
||||
@@ -136,5 +126,8 @@
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Čekání na video...)",
|
||||
"This feature is only supported on Firefox.": "Tato funkce je podporována jen ve Firefoxu.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Odeslání ladících záznamů nám pomůže diagnostikovat problém.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Oops, něco se pokazilo.</0>"
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Oops, něco se pokazilo.</0>",
|
||||
"Use the upcoming grid system": "Používat nový systém pro zobrazení videí",
|
||||
"Expose developer settings in the settings window.": "Zobrazit vývojářské nastavení.",
|
||||
"Developer Settings": "Vývojářské nastavení"
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"Create account": "Konto erstellen",
|
||||
"Debug log": "Debug-Protokoll",
|
||||
"Debug log request": "Debug-Log Anfrage",
|
||||
"Description (optional)": "Beschreibung (optional)",
|
||||
"Details": "Details",
|
||||
"Developer": "Entwickler",
|
||||
"Display name": "Anzeigename",
|
||||
@@ -33,7 +32,6 @@
|
||||
"Full screen": "Vollbild",
|
||||
"Go": "Los geht’s",
|
||||
"Grid layout menu": "Grid-Layout-Menü",
|
||||
"Having trouble? Help us fix it.": "Du hast ein Problem? Hilf uns, es zu beheben.",
|
||||
"Home": "Startseite",
|
||||
"Include debug logs": "Debug-Protokolle einschließen",
|
||||
"Incompatible versions": "Inkompatible Versionen",
|
||||
@@ -45,7 +43,6 @@
|
||||
"Join call now": "Anruf beitreten",
|
||||
"Join existing call?": "An bestehendem Anruf teilnehmen?",
|
||||
"Leave": "Verlassen",
|
||||
"Loading room…": "Lade Raum …",
|
||||
"Loading…": "Lade …",
|
||||
"Local volume": "Lokale Lautstärke",
|
||||
"Logging in…": "Anmelden …",
|
||||
@@ -55,7 +52,6 @@
|
||||
"Microphone permissions needed to join the call.": "Mikrofon-Berechtigung ist erforderlich, um dem Anruf beizutreten.",
|
||||
"Microphone {{n}}": "Mikrofon {{n}}",
|
||||
"More": "Mehr",
|
||||
"More menu": "Weiteres Menü",
|
||||
"Mute microphone": "Mikrofon stummschalten",
|
||||
"No": "Nein",
|
||||
"Not now, return to home screen": "Nicht jetzt, zurück zum Startbildschirm",
|
||||
@@ -76,8 +72,6 @@
|
||||
"Release to stop": "Loslassen zum Stoppen",
|
||||
"Remove": "Entfernen",
|
||||
"Return to home screen": "Zurück zum Startbildschirm",
|
||||
"Save": "Speichern",
|
||||
"Saving…": "Speichere …",
|
||||
"Select an option": "Wähle eine Option",
|
||||
"Send debug logs": "Debug-Logs senden",
|
||||
"Sending…": "Senden …",
|
||||
@@ -92,7 +86,6 @@
|
||||
"Spotlight": "Rampenlicht",
|
||||
"Stop sharing screen": "Beenden der Bildschirmfreigabe",
|
||||
"Submit feedback": "Rückmeldung geben",
|
||||
"Submitting feedback…": "Sende Rückmeldung …",
|
||||
"Take me Home": "Zurück zur Startseite",
|
||||
"Talk over speaker": "Aktiven Sprecher verdrängen und sprechen",
|
||||
"Talking…": "Sprechen …",
|
||||
@@ -103,7 +96,6 @@
|
||||
"Turn off camera": "Kamera ausschalten",
|
||||
"Turn on camera": "Kamera einschalten",
|
||||
"Unmute microphone": "Mikrofon aktivieren",
|
||||
"User ID": "Benutzer-ID",
|
||||
"User menu": "Benutzermenü",
|
||||
"Username": "Benutzername",
|
||||
"Version: {{version}}": "Version: {{version}}",
|
||||
@@ -131,15 +123,19 @@
|
||||
"{{name}} (Connecting...)": "{{name}} (verbindet sich …)",
|
||||
"Copy": "Kopieren",
|
||||
"Element Call Home": "Element Call-Startseite",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Ob Tastenkürzel mit nur einer Taste aktiviert sein sollen, z. B. „m“ um das Mikrofon stumm/aktiv zu schalten.",
|
||||
"Single-key keyboard shortcuts": "Ein-Tasten-Tastenkürzel",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Warte auf Video …)",
|
||||
"This feature is only supported on Firefox.": "Diese Funktion wird nur in Firefox unterstützt.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Übermittelte Problemberichte helfen uns, Fehler zu beheben.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Hoppla, etwas ist schiefgelaufen.</0>",
|
||||
"Use the upcoming grid system": "Nutze das kommende Rastersystem",
|
||||
"Privacy Policy": "Datenschutzerklärung",
|
||||
"Expose developer settings in the settings window.": "Zeige die Entwicklereinstellungen im Einstellungsfenster.",
|
||||
"Developer Settings": "Entwicklereinstellungen",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Mit dem Anwählen dieses Feldes akzeptierst du die Sammlung anonymer Daten, die wir zur Verbesserung deiner Erfahrung verwenden. Weitere Informationen dazu, welche Daten wir sammeln, findest du in unserer "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Mit der Teilnahme an der Beta akzeptierst du die Sammlung von anonymen Daten, die wir zur Verbesserung des Produkts verwenden. Weitere Informationen zu den von uns erhobenen Daten findest du in unserer <2>Datenschutzerklärung</2> und unseren <5>Cookie-Richtlinien</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Du kannst deine Zustimmung durch Abwählen dieses Kästchens zurückziehen. Falls du dich aktuell in einem Anruf befindest, wird diese Einstellung nach dem Ende des Anrufs wirksam.",
|
||||
"Feedback": "Rückmeldung",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Falls du auf Probleme stößt oder einfach nur eine Rückmeldung geben möchtest, sende uns bitte eine kurze Beschreibung.",
|
||||
"Your feedback": "Deine Rückmeldung",
|
||||
"Thanks, we received your feedback!": "Danke, wir haben deine Rückmeldung erhalten!",
|
||||
"Submitting…": "Sende …",
|
||||
"Submit": "Absenden"
|
||||
}
|
||||
|
||||
96
public/locales/el/app.json
Normal file
96
public/locales/el/app.json
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
"You can't talk at the same time": "Δεν μπορείς να μιλάς ταυτόχρονα",
|
||||
"Version: {{version}}": "Έκδοση: {{version}}",
|
||||
"User menu": "Μενού χρήστη",
|
||||
"Submit feedback": "Υποβάλετε σχόλια",
|
||||
"Stop sharing screen": "Διακοπή κοινής χρήσης οθόνης",
|
||||
"Sign in": "Σύνδεση",
|
||||
"Show call inspector": "Εμφάνιση του επιθεωρητή κλήσης",
|
||||
"Share screen": "Κοινή χρήση οθόνης",
|
||||
"Sending…": "Αποστολή…",
|
||||
"Select an option": "Επιλέξτε μια επιλογή",
|
||||
"Remove": "Αφαίρεση",
|
||||
"Registering…": "Εγγραφή…",
|
||||
"Press and hold to talk": "Πατήστε παρατεταμένα για να μιλήσετε",
|
||||
"Not registered yet? <2>Create an account</2>": "Δεν έχετε εγγραφεί ακόμα; <2>Δημιουργήστε λογαριασμό</2>",
|
||||
"Login to your account": "Συνδεθείτε στο λογαριασμό σας",
|
||||
"Logging in…": "Σύνδεση…",
|
||||
"Invite people": "Προσκαλέστε άτομα",
|
||||
"Invite": "Πρόσκληση",
|
||||
"Inspector": "Επιθεωρητής",
|
||||
"Incompatible versions!": "Μη συμβατές εκδόσεις!",
|
||||
"Incompatible versions": "Μη συμβατές εκδόσεις",
|
||||
"Display name": "Εμφανιζόμενο όνομα",
|
||||
"Developer Settings": "Ρυθμίσεις προγραμματιστή",
|
||||
"Debug log request": "Αίτημα αρχείου καταγραφής",
|
||||
"Call link copied": "Ο σύνδεσμος κλήσης αντιγράφηκε",
|
||||
"Avatar": "Avatar",
|
||||
"Accept microphone permissions to join the call.": "Αποδεχτείτε τα δικαιώματα μικροφώνου για να συμμετάσχετε στην κλήση.",
|
||||
"Accept camera/microphone permissions to join the call.": "Αποδεχτείτε τα δικαιώματα κάμερας/μικροφώνου για να συμμετάσχετε στην κλήση.",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Ωχ, κάτι πήγε στραβά.</0>",
|
||||
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Δημιουργήστε λογαριασμό</0> Ή <2>Συμμετέχετε ως επισκέπτης</2>",
|
||||
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Έχετε ήδη λογαριασμό;</0><1><0>Συνδεθείτε</0> Ή <2>Συμμετέχετε ως επισκέπτης</2></1>",
|
||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Κλήση walkie-talkie",
|
||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||
"Your recent calls": "Οι πρόσφατες κλήσεις σας",
|
||||
"Yes, join call": "Ναι, συμμετοχή στην κλήση",
|
||||
"WebRTC is not supported or is being blocked in this browser.": "Το WebRTC δεν υποστηρίζεται ή έχει αποκλειστεί σε αυτό το πρόγραμμα περιήγησης.",
|
||||
"Walkie-talkie call name": "Όνομα κλήσης walkie-talkie",
|
||||
"Walkie-talkie call": "Κλήση walkie-talkie",
|
||||
"Waiting for other participants…": "Αναμονή για άλλους συμμετέχοντες…",
|
||||
"Waiting for network": "Αναμονή για δίκτυο",
|
||||
"Video call name": "Όνομα βίντεο κλήσης",
|
||||
"Video call": "Βίντεο κλήση",
|
||||
"Video": "Βίντεο",
|
||||
"Username": "Όνομα χρήστη",
|
||||
"Turn on camera": "Ενεργοποιήστε την κάμερα",
|
||||
"Turn off camera": "Απενεργοποιήστε την κάμερα",
|
||||
"This feature is only supported on Firefox.": "Αυτή η δυνατότητα υποστηρίζεται μόνο στον Firefox.",
|
||||
"This call already exists, would you like to join?": "Αυτή η κλήση υπάρχει ήδη, θα θέλατε να συμμετάσχετε;",
|
||||
"Speaker": "Ηχείο",
|
||||
"Spatial audio": "Χωρικός ήχος",
|
||||
"Sign out": "Αποσύνδεση",
|
||||
"Settings": "Ρυθμίσεις",
|
||||
"Return to home screen": "Επιστροφή στην αρχική οθόνη",
|
||||
"Register": "Εγγραφή",
|
||||
"Profile": "Προφίλ",
|
||||
"Press and hold spacebar to talk": "Για να μιλήσετε κρατήστε πατημένο το πλήκτρο διαστήματος",
|
||||
"Passwords must match": "Οι κωδικοί πρέπει να ταιριάζουν",
|
||||
"Password": "Κωδικός",
|
||||
"Not now, return to home screen": "Όχι τώρα, επιστροφή στην αρχική οθόνη",
|
||||
"No": "Όχι",
|
||||
"Mute microphone": "Σίγαση μικροφώνου",
|
||||
"More": "Περισσότερα",
|
||||
"Microphone permissions needed to join the call.": "Απαιτούνται δικαιώματα μικροφώνου για συμμετοχή στην κλήση.",
|
||||
"Microphone {{n}}": "Μικρόφωνο {{n}}",
|
||||
"Microphone": "Μικρόφωνο",
|
||||
"Login": "Σύνδεση",
|
||||
"Loading…": "Φόρτωση…",
|
||||
"Leave": "Αποχώρηση",
|
||||
"Join existing call?": "Συμμετοχή στην υπάρχουσα κλήση;",
|
||||
"Join call now": "Συμμετοχή στην κλήση τώρα",
|
||||
"Join call": "Συμμετοχή στην κλήση",
|
||||
"Go": "Μετάβαση",
|
||||
"Full screen": "Πλήρη οθόνη",
|
||||
"Exit full screen": "Έξοδος από πλήρη οθόνη",
|
||||
"Details": "Λεπτομέρειες",
|
||||
"Create account": "Δημιουργία λογαριασμού",
|
||||
"Copy and share this call link": "Αντιγράψτε και μοιραστείτε αυτόν τον σύνδεσμο κλήσης",
|
||||
"Copy": "Αντιγραφή",
|
||||
"Copied!": "Αντιγράφηκε!",
|
||||
"Connection lost": "Η σύνδεση χάθηκε",
|
||||
"Confirm password": "Επιβεβαίωση κωδικού",
|
||||
"Close": "Κλείσιμο",
|
||||
"Change layout": "Αλλαγή διάταξης",
|
||||
"Camera/microphone permissions needed to join the call.": "Απαιτούνται δικαιώματα κάμερας/μικροφώνου για να συμμετάσχετε στην κλήση.",
|
||||
"Camera {{n}}": "Κάμερα {{n}}",
|
||||
"Camera": "Κάμερα",
|
||||
"Audio": "Ήχος",
|
||||
"{{name}} is talking…": "{{name}} ομιλεί…",
|
||||
"{{name}} is presenting": "{{name}} παρουσιάζει",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Αναμονή για βίντεο...)",
|
||||
"{{name}} (Connecting...)": "{{name}} (Συνδέεται...)",
|
||||
"{{displayName}}, your call is now ended": "{{displayName}}, η κλήση σας τερματίστηκε",
|
||||
"{{count}} people connected|other": "{{count}} άτομα συνδεδεμένα",
|
||||
"{{count}} people connected|one": "{{count}} άτομο συνδεδεμένο"
|
||||
}
|
||||
@@ -1,18 +1,23 @@
|
||||
{
|
||||
"{{count}} people connected|one": "{{count}} person connected",
|
||||
"{{count}} people connected|other": "{{count}} people connected",
|
||||
"{{displayName}}, your call is now ended": "{{displayName}}, your call is now ended",
|
||||
"{{count}} stars|one": "{{count}} star",
|
||||
"{{count}} stars|other": "{{count}} stars",
|
||||
"{{displayName}}, your call has ended.": "{{displayName}}, your call has ended.",
|
||||
"{{name}} (Connecting...)": "{{name}} (Connecting...)",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Waiting for video...)",
|
||||
"{{name}} is presenting": "{{name}} is presenting",
|
||||
"{{name}} is talking…": "{{name}} is talking…",
|
||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Walkie-talkie call",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.",
|
||||
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>",
|
||||
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Create an account</0> Or <2>Access as a guest</2>",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Oops, something's gone wrong.</0>",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Submitting debug logs will help us track down the problem.</0>",
|
||||
"<0>Thanks for your feedback!</0>": "<0>Thanks for your feedback!</0>",
|
||||
"<0>We'd love to hear your feedback so we can improve your experience.</0>": "<0>We'd love to hear your feedback so we can improve your experience.</0>",
|
||||
"<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>": "<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>",
|
||||
"Accept camera/microphone permissions to join the call.": "Accept camera/microphone permissions to join the call.",
|
||||
"Accept microphone permissions to join the call.": "Accept microphone permissions to join the call.",
|
||||
@@ -21,7 +26,7 @@
|
||||
"Avatar": "Avatar",
|
||||
"By clicking \"Go\", you agree to our <2>Terms and conditions</2>": "By clicking \"Go\", you agree to our <2>Terms and conditions</2>",
|
||||
"By clicking \"Join call now\", you agree to our <2>Terms and conditions</2>": "By clicking \"Join call now\", you agree to our <2>Terms and conditions</2>",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ",
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.",
|
||||
"Call link copied": "Call link copied",
|
||||
"Call type menu": "Call type menu",
|
||||
"Camera": "Camera",
|
||||
@@ -37,7 +42,6 @@
|
||||
"Create account": "Create account",
|
||||
"Debug log": "Debug log",
|
||||
"Debug log request": "Debug log request",
|
||||
"Description (optional)": "Description (optional)",
|
||||
"Details": "Details",
|
||||
"Developer": "Developer",
|
||||
"Developer Settings": "Developer Settings",
|
||||
@@ -46,13 +50,15 @@
|
||||
"Element Call Home": "Element Call Home",
|
||||
"Exit full screen": "Exit full screen",
|
||||
"Expose developer settings in the settings window.": "Expose developer settings in the settings window.",
|
||||
"Feedback": "Feedback",
|
||||
"Fetching group call timed out.": "Fetching group call timed out.",
|
||||
"Freedom": "Freedom",
|
||||
"Full screen": "Full screen",
|
||||
"Go": "Go",
|
||||
"Grid layout menu": "Grid layout menu",
|
||||
"Having trouble? Help us fix it.": "Having trouble? Help us fix it.",
|
||||
"Home": "Home",
|
||||
"How did it go?": "How did it go?",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.",
|
||||
"Include debug logs": "Include debug logs",
|
||||
"Incompatible versions": "Incompatible versions",
|
||||
"Incompatible versions!": "Incompatible versions!",
|
||||
@@ -63,7 +69,6 @@
|
||||
"Join call now": "Join call now",
|
||||
"Join existing call?": "Join existing call?",
|
||||
"Leave": "Leave",
|
||||
"Loading room…": "Loading room…",
|
||||
"Loading…": "Loading…",
|
||||
"Local volume": "Local volume",
|
||||
"Logging in…": "Logging in…",
|
||||
@@ -73,7 +78,6 @@
|
||||
"Microphone {{n}}": "Microphone {{n}}",
|
||||
"Microphone permissions needed to join the call.": "Microphone permissions needed to join the call.",
|
||||
"More": "More",
|
||||
"More menu": "More menu",
|
||||
"Mute microphone": "Mute microphone",
|
||||
"No": "No",
|
||||
"Not now, return to home screen": "Not now, return to home screen",
|
||||
@@ -85,7 +89,6 @@
|
||||
"Press and hold spacebar to talk over {{name}}": "Press and hold spacebar to talk over {{name}}",
|
||||
"Press and hold to talk": "Press and hold to talk",
|
||||
"Press and hold to talk over {{name}}": "Press and hold to talk over {{name}}",
|
||||
"Privacy Policy": "Privacy Policy",
|
||||
"Profile": "Profile",
|
||||
"Recaptcha dismissed": "Recaptcha dismissed",
|
||||
"Recaptcha not loaded": "Recaptcha not loaded",
|
||||
@@ -95,8 +98,6 @@
|
||||
"Release to stop": "Release to stop",
|
||||
"Remove": "Remove",
|
||||
"Return to home screen": "Return to home screen",
|
||||
"Save": "Save",
|
||||
"Saving…": "Saving…",
|
||||
"Select an option": "Select an option",
|
||||
"Send debug logs": "Send debug logs",
|
||||
"Sending debug logs…": "Sending debug logs…",
|
||||
@@ -106,17 +107,18 @@
|
||||
"Show call inspector": "Show call inspector",
|
||||
"Sign in": "Sign in",
|
||||
"Sign out": "Sign out",
|
||||
"Single-key keyboard shortcuts": "Single-key keyboard shortcuts",
|
||||
"Spatial audio": "Spatial audio",
|
||||
"Speaker": "Speaker",
|
||||
"Speaker {{n}}": "Speaker {{n}}",
|
||||
"Spotlight": "Spotlight",
|
||||
"Stop sharing screen": "Stop sharing screen",
|
||||
"Submit": "Submit",
|
||||
"Submit feedback": "Submit feedback",
|
||||
"Submitting feedback…": "Submitting feedback…",
|
||||
"Submitting…": "Submitting…",
|
||||
"Take me Home": "Take me Home",
|
||||
"Talk over speaker": "Talk over speaker",
|
||||
"Talking…": "Talking…",
|
||||
"Thanks, we received your feedback!": "Thanks, we received your feedback!",
|
||||
"Thanks! We'll get right on it.": "Thanks! We'll get right on it.",
|
||||
"This call already exists, would you like to join?": "This call already exists, would you like to join?",
|
||||
"This feature is only supported on Firefox.": "This feature is only supported on Firefox.",
|
||||
@@ -126,7 +128,6 @@
|
||||
"Turn on camera": "Turn on camera",
|
||||
"Unmute microphone": "Unmute microphone",
|
||||
"Use the upcoming grid system": "Use the upcoming grid system",
|
||||
"User ID": "User ID",
|
||||
"User menu": "User menu",
|
||||
"Username": "Username",
|
||||
"Version: {{version}}": "Version: {{version}}",
|
||||
@@ -138,8 +139,8 @@
|
||||
"Walkie-talkie call": "Walkie-talkie call",
|
||||
"Walkie-talkie call name": "Walkie-talkie call name",
|
||||
"WebRTC is not supported or is being blocked in this browser.": "WebRTC is not supported or is being blocked in this browser.",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.",
|
||||
"Yes, join call": "Yes, join call",
|
||||
"You can't talk at the same time": "You can't talk at the same time",
|
||||
"Your feedback": "Your feedback",
|
||||
"Your recent calls": "Your recent calls"
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"Version: {{version}}": "Versión: {{version}}",
|
||||
"Username": "Nombre de usuario",
|
||||
"User menu": "Menú de usuario",
|
||||
"User ID": "ID de usuario",
|
||||
"Unmute microphone": "Desilenciar el micrófono",
|
||||
"Turn on camera": "Encender la cámara",
|
||||
"Turn off camera": "Apagar la cámara",
|
||||
@@ -33,7 +32,6 @@
|
||||
"Talking…": "Hablando…",
|
||||
"Talk over speaker": "Hablar por encima",
|
||||
"Take me Home": "Volver al inicio",
|
||||
"Submitting feedback…": "Enviando comentarios…",
|
||||
"Submit feedback": "Enviar comentarios",
|
||||
"Stop sharing screen": "Dejar de compartir pantalla",
|
||||
"Spotlight": "Foco",
|
||||
@@ -49,8 +47,6 @@
|
||||
"Sending debug logs…": "Enviando registros de depuración…",
|
||||
"Send debug logs": "Enviar registros de depuración",
|
||||
"Select an option": "Selecciona una opción",
|
||||
"Saving…": "Guardando…",
|
||||
"Save": "Guardar",
|
||||
"Return to home screen": "Volver a la pantalla de inicio",
|
||||
"Remove": "Eliminar",
|
||||
"Release to stop": "Suelta para parar",
|
||||
@@ -68,7 +64,6 @@
|
||||
"Not now, return to home screen": "Ahora no, volver a la pantalla de inicio",
|
||||
"No": "No",
|
||||
"Mute microphone": "Silenciar micrófono",
|
||||
"More menu": "Menú Más",
|
||||
"More": "Más",
|
||||
"Microphone permissions needed to join the call.": "Se necesitan permisos del micrófono para unirse a la llamada.",
|
||||
"Microphone {{n}}": "Micrófono {{n}}",
|
||||
@@ -77,7 +72,6 @@
|
||||
"Logging in…": "Iniciando sesión…",
|
||||
"Local volume": "Volumen local",
|
||||
"Loading…": "Cargando…",
|
||||
"Loading room…": "Cargando sala…",
|
||||
"Leave": "Abandonar",
|
||||
"Join existing call?": "¿Unirse a llamada existente?",
|
||||
"Join call now": "Unirse a la llamada ahora",
|
||||
@@ -89,7 +83,6 @@
|
||||
"Incompatible versions": "Versiones incompatibles",
|
||||
"Include debug logs": "Incluir registros de depuración",
|
||||
"Home": "Inicio",
|
||||
"Having trouble? Help us fix it.": "¿Tienes problemas? Ayúdanos a resolverlos.",
|
||||
"Grid layout menu": "Menú de distribución de cuadrícula",
|
||||
"Go": "Comenzar",
|
||||
"Full screen": "Pantalla completa",
|
||||
@@ -100,7 +93,6 @@
|
||||
"Display name": "Nombre a mostrar",
|
||||
"Developer": "Desarrollador",
|
||||
"Details": "Detalles",
|
||||
"Description (optional)": "Descripción (opcional)",
|
||||
"Debug log request": "Petición de registros de depuración",
|
||||
"Debug log": "Registro de depuración",
|
||||
"Create account": "Crear cuenta",
|
||||
@@ -131,13 +123,13 @@
|
||||
"{{count}} people connected|one": "{{count}} persona conectada",
|
||||
"Element Call Home": "Inicio de Element Call",
|
||||
"Copy": "Copiar",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Habilita los atajos de teclado de una sola tecla, por ejemplo 'm' para silenciar/desilenciar el micrófono.",
|
||||
"Single-key keyboard shortcuts": "Atajos de teclado de una sola tecla",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Esperando al video...)",
|
||||
"This feature is only supported on Firefox.": "Esta característica solo está disponible en Firefox.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Subir los registros de depuración nos ayudará a encontrar el problema.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Ups, algo ha salido mal.</0>",
|
||||
"Privacy Policy": "Política de privacidad",
|
||||
"Expose developer settings in the settings window.": "Muestra los ajustes de desarrollador en la ventana de ajustes.",
|
||||
"Developer Settings": "Ajustes de desarrollador"
|
||||
"Developer Settings": "Ajustes de desarrollador",
|
||||
"Use the upcoming grid system": "Utilizar el próximo sistema de cuadrícula",
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Al participar en esta beta, consientes a la recogida de datos anónimos, los cuales usaremos para mejorar el producto. Puedes encontrar más información sobre que datos recogemos en nuestra <2>Política de privacidad</2> y en nuestra <5>Política sobre Cookies</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Puedes retirar tu consentimiento desmarcando esta casilla. Si estás en una llamada, este ajuste se aplicará al final de esta."
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
"Incompatible versions": "Ühildumatud versioonid",
|
||||
"Include debug logs": "Lisa veatuvastuslogid",
|
||||
"Home": "Avavaatesse",
|
||||
"Having trouble? Help us fix it.": "Kas on probleeme? Aita meil asja parandada.",
|
||||
"Grid layout menu": "Ruudustikvaate menüü",
|
||||
"Go": "Jätka",
|
||||
"Full screen": "Täisekraan",
|
||||
@@ -31,7 +30,6 @@
|
||||
"Display name": "Kuvatav nimi",
|
||||
"Developer": "Arendaja",
|
||||
"Details": "Täpsemalt",
|
||||
"Description (optional)": "Kirjeldus (valikuline)",
|
||||
"Debug log request": "Veaotsingulogi päring",
|
||||
"Debug log": "Veaotsingulogi",
|
||||
"Create account": "Loo konto",
|
||||
@@ -60,7 +58,6 @@
|
||||
"Mute microphone": "Summuta mikrofon",
|
||||
"Your recent calls": "Hiljutised kõned",
|
||||
"You can't talk at the same time": "Üheaegselt ei saa rääkida",
|
||||
"More menu": "Rohkem valikuid",
|
||||
"More": "Rohkem",
|
||||
"Microphone permissions needed to join the call.": "Kõnega liitumiseks on vaja lubada mikrofoni kasutamine.",
|
||||
"Microphone {{n}}": "Mikrofon {{n}}",
|
||||
@@ -70,15 +67,12 @@
|
||||
"Logging in…": "Sisselogimine …",
|
||||
"Local volume": "Kohalik helitugevus",
|
||||
"Loading…": "Laadimine …",
|
||||
"Loading room…": "Ruumi laadimine …",
|
||||
"Leave": "Lahku",
|
||||
"Join existing call?": "Liitu juba käimasoleva kõnega?",
|
||||
"Join call now": "Kõnega liitumine",
|
||||
"Join call": "Kõnega liitumine",
|
||||
"User ID": "Kasutajatunnus",
|
||||
"Turn on camera": "Lülita kaamera sisse",
|
||||
"Turn off camera": "Lülita kaamera välja",
|
||||
"Submitting feedback…": "Tagasiside saatmine…",
|
||||
"Take me Home": "Mine avalehele",
|
||||
"Submit feedback": "Jaga tagasisidet",
|
||||
"Stop sharing screen": "Lõpeta ekraani jagamine",
|
||||
@@ -95,8 +89,6 @@
|
||||
"Sending debug logs…": "Veaotsingulogide saatmine…",
|
||||
"Send debug logs": "Saada veaotsingulogid",
|
||||
"Select an option": "Vali oma eelistus",
|
||||
"Saving…": "Salvestamine…",
|
||||
"Save": "Salvesta",
|
||||
"Return to home screen": "Tagasi avalehele",
|
||||
"Remove": "Eemalda",
|
||||
"Release to stop": "Peatamiseks vabasta klahv",
|
||||
@@ -131,15 +123,19 @@
|
||||
"This site is protected by ReCAPTCHA and the Google <2>Privacy Policy</2> and <6>Terms of Service</6> apply.<9></9>By clicking \"Register\", you agree to our <12>Terms and conditions</12>": "Siin saidis on kasutusel ReCAPTCHA ning kehtivad Google <2>privaatsuspoliitika</2> ja <6>teenusetingimused</6>.<9></9>Klikkides „Registreeru“, nõustud meie <12>kasutustingimustega</12>",
|
||||
"Element Call Home": "Element Call Home",
|
||||
"Copy": "Kopeeri",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Kas kasutame üheklahvilisi kiirklahve, näiteks „m“ mikrofoni sisse/välja lülitamiseks.",
|
||||
"Single-key keyboard shortcuts": "Üheklahvilised kiirklahvid",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Ootame videovoo algust...)",
|
||||
"This feature is only supported on Firefox.": "See funktsionaalsus on toetatud vaid Firefoxis.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Kui saadad meile vealogid, siis on lihtsam vea põhjust otsida.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Ohoo, midagi on nüüd katki.</0>",
|
||||
"Use the upcoming grid system": "Kasuta tulevast ruudustiku-põhist paigutust",
|
||||
"Privacy Policy": "Privaatsuspoliitika",
|
||||
"Expose developer settings in the settings window.": "Näita seadistuste aknas arendajale vajalikke seadeid.",
|
||||
"Developer Settings": "Arendaja seadistused",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Selle valiku märkimisel lubad meil koguda anonüümseid andmeid, mida me pruugime sinu kasutajakogemuse parandamiseks. Üksikasjalikumat teavet meie kogutavate andmete kohta leiad siit - "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Nõustudes selle beetaversiooni kasutamisega sa nõustud ka toote arendamiseks kasutatavate anonüümsete andmete kogumisega. Täpsemat teavet kogutavate andmete kohta leiad meie <2>Privaatsuspoliitikast</2> ja meie <5>Küpsiste kasutamise reeglitest</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Sa võid selle valiku eelmaldamisega alati oma nõusoleku tagasi võtta. Kui sul parasjagu on kõne pooleli, siis seadistuste muudatus jõustub pärast kõne lõppu.",
|
||||
"Your feedback": "Sinu tagasiside",
|
||||
"Thanks, we received your feedback!": "Tänud, me oleme sinu tagasiside kätte saanud!",
|
||||
"Submitting…": "Saadan…",
|
||||
"Submit": "Saada",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Kui selle rakenduse kasutamisel tekib sul probleeme või lihtsalt soovid oma arvamust avaldada, siis palun täida alljärgnev lühike kirjeldus.",
|
||||
"Feedback": "Tagasiside"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
"Video call": "تماس تصویری",
|
||||
"Video": "ویدیو",
|
||||
"Username": "نام کاربری",
|
||||
"User ID": "آی دی کاربر",
|
||||
"Turn on camera": "روشن کردن دوربین",
|
||||
"Turn off camera": "خاموش کردن دوربین",
|
||||
"Take me Home": "مرا به خانه ببر",
|
||||
@@ -11,7 +10,6 @@
|
||||
"Sign out": "خروج",
|
||||
"Sign in": "ورود",
|
||||
"Settings": "تنظیمات",
|
||||
"Save": "ذخیره",
|
||||
"Profile": "پروفایل",
|
||||
"Password": "رمز عبور",
|
||||
"No": "خیر",
|
||||
@@ -21,7 +19,6 @@
|
||||
"Login to your account": "به حساب کاربری خود وارد شوید",
|
||||
"Login": "ورود",
|
||||
"Loading…": "بارگزاری…",
|
||||
"Loading room…": "بارگزاری اتاق…",
|
||||
"Leave": "خروج",
|
||||
"Join existing call?": "پیوست به تماس؟",
|
||||
"Join call now": "الان به تماس بپیوند",
|
||||
@@ -37,7 +34,6 @@
|
||||
"Display name": "نام نمایشی",
|
||||
"Developer": "توسعه دهنده",
|
||||
"Details": "جزئیات",
|
||||
"Description (optional)": "توضیحات (اختیاری)",
|
||||
"Debug log request": "درخواست لاگ عیبیابی",
|
||||
"Debug log": "لاگ عیبیابی",
|
||||
"Create account": "ساخت حساب کاربری",
|
||||
@@ -81,7 +77,6 @@
|
||||
"Sending debug logs…": "در حال ارسال باگهای عیبیابی…",
|
||||
"Send debug logs": "ارسال لاگهای عیبیابی",
|
||||
"Select an option": "یک گزینه را انتخاب کنید",
|
||||
"Saving…": "در حال ذخیره…",
|
||||
"Return to home screen": "برگشت به صفحه اصلی",
|
||||
"Remove": "حذف",
|
||||
"Release to stop": "برای توقف رها کنید",
|
||||
@@ -98,12 +93,10 @@
|
||||
"Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}</1>": "کاربران دیگر تلاش میکنند با ورژنهای ناسازگار به مکالمه بپیوندند. این کاربران باید از بروزرسانی مرورگرشان اطمینان داشته باشند:<1>{userLis}</1>",
|
||||
"Not registered yet? <2>Create an account</2>": "هنوز ثبتنام نکردهاید؟ <2>ساخت حساب کاربری</2>",
|
||||
"Not now, return to home screen": "الان نه، به صفحه اصلی برگردید",
|
||||
"More menu": "تنظیمات بیشتر",
|
||||
"Microphone permissions needed to join the call.": "برای پیوستن به مکالمه دسترسی به میکروفون نیاز است.",
|
||||
"Microphone {{n}}": "میکروفون {{n}}",
|
||||
"Logging in…": "ورود…",
|
||||
"Include debug logs": "شامل لاگهای عیبیابی",
|
||||
"Having trouble? Help us fix it.": "با مشکلی رو به رو شدید؟ به ما کمک کنید رفعش کنیم.",
|
||||
"Grid layout menu": "منوی طرحبندی شبکهای",
|
||||
"Fetching group call timed out.": "زمان اتصال به مکالمه گروهی تمام شد.",
|
||||
"You can't talk at the same time": "نمی توانید همزمان صحبت کنید",
|
||||
@@ -123,12 +116,9 @@
|
||||
"Thanks! We'll get right on it.": "با تشکر! ما به درستی آن را انجام خواهیم داد.",
|
||||
"Talking…": "در حال صحبت کردن…",
|
||||
"Talk over speaker": "روی بلندگو صحبت کنید",
|
||||
"Submitting feedback…": "در حال ارسال بازخورد…",
|
||||
"Submit feedback": "بازخورد ارائه دهید",
|
||||
"Stop sharing screen": "توقف اشتراکگذاری صفحه نمایش",
|
||||
"Spatial audio": "صدای جهتدار",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "این که میانبرهای صفحهکلید تککلیده مثل m برای خموشی و ناخموشی میکروفون به کار بیفتند یا نه.",
|
||||
"Single-key keyboard shortcuts": "میانبرهای صفحهکلید تککلیده",
|
||||
"Element Call Home": "خانهٔ تماس المنت",
|
||||
"Copy": "رونوشت",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>اکنون به تماس پیوسته</0><1>یا</1><2>پیوند تماس را رونوشت کرده و بعداً بپیوندید</2>",
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"Create account": "Créer un compte",
|
||||
"Debug log": "Journal de débogage",
|
||||
"Debug log request": "Demande d’un journal de débogage",
|
||||
"Description (optional)": "Description (facultatif)",
|
||||
"Details": "Informations",
|
||||
"Developer": "Développeur",
|
||||
"Display name": "Nom d’affichage",
|
||||
@@ -32,7 +31,6 @@
|
||||
"Full screen": "Plein écran",
|
||||
"Go": "Commencer",
|
||||
"Grid layout menu": "Menu en grille",
|
||||
"Having trouble? Help us fix it.": "Un problème ? Aidez nous à le résoudre.",
|
||||
"Home": "Accueil",
|
||||
"Include debug logs": "Inclure les journaux de débogage",
|
||||
"Incompatible versions": "Versions incompatibles",
|
||||
@@ -43,7 +41,6 @@
|
||||
"Join call now": "Rejoindre l’appel maintenant",
|
||||
"Join existing call?": "Rejoindre un appel existant ?",
|
||||
"Leave": "Partir",
|
||||
"Loading room…": "Chargement du salon…",
|
||||
"Loading…": "Chargement…",
|
||||
"Local volume": "Volume local",
|
||||
"Logging in…": "Connexion…",
|
||||
@@ -53,7 +50,6 @@
|
||||
"Microphone permissions needed to join the call.": "Accès au microphone requis pour rejoindre l’appel.",
|
||||
"Microphone {{n}}": "Microphone {{n}}",
|
||||
"More": "Plus",
|
||||
"More menu": "Menu plus",
|
||||
"Mute microphone": "Couper le micro",
|
||||
"No": "Non",
|
||||
"Not now, return to home screen": "Pas maintenant, retourner à l’accueil",
|
||||
@@ -74,8 +70,6 @@
|
||||
"Release to stop": "Relâcher pour arrêter",
|
||||
"Remove": "Supprimer",
|
||||
"Return to home screen": "Retour à l’accueil",
|
||||
"Save": "Enregistrer",
|
||||
"Saving…": "Enregistrement…",
|
||||
"Select an option": "Sélectionnez une option",
|
||||
"Send debug logs": "Envoyer les journaux de débogage",
|
||||
"Sending…": "Envoi…",
|
||||
@@ -88,7 +82,6 @@
|
||||
"Spotlight": "Premier plan",
|
||||
"Stop sharing screen": "Arrêter le partage d’écran",
|
||||
"Submit feedback": "Envoyer des retours",
|
||||
"Submitting feedback…": "Envoi des retours…",
|
||||
"Take me Home": "Retouner à l’accueil",
|
||||
"Talk over speaker": "Parler par dessus l’intervenant",
|
||||
"Thanks! We'll get right on it.": "Merci ! Nous allons nous y attaquer.",
|
||||
@@ -115,7 +108,6 @@
|
||||
"Version: {{version}}": "Version : {{version}}",
|
||||
"Username": "Nom d’utilisateur",
|
||||
"User menu": "Menu utilisateur",
|
||||
"User ID": "Identifiant utilisateur",
|
||||
"Unmute microphone": "Allumer le micro",
|
||||
"Turn on camera": "Allumer la caméra",
|
||||
"Turn off camera": "Couper la caméra",
|
||||
@@ -131,15 +123,19 @@
|
||||
"{{name}} (Connecting...)": "{{name}} (Connexion…)",
|
||||
"Element Call Home": "Accueil Element Call",
|
||||
"Copy": "Copier",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Bascule sur les raccourcis clavier à touche unique, par exemple « m » pour désactiver / activer le micro.",
|
||||
"Single-key keyboard shortcuts": "Raccourcis clavier en une touche",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (En attente de vidéo…)",
|
||||
"This feature is only supported on Firefox.": "Cette fonctionnalité est prise en charge dans Firefox uniquement.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Soumettre les journaux de débogage nous aidera à déterminer le problème.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Oups, quelque chose s’est mal passé.</0>",
|
||||
"Use the upcoming grid system": "Utiliser le futur système de grille",
|
||||
"Privacy Policy": "Politique de confidentialité",
|
||||
"Expose developer settings in the settings window.": "Affiche les paramètres développeurs dans la fenêtre des paramètres.",
|
||||
"Developer Settings": "Paramètres développeurs",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "En cochant cette case vous consentez à la collecte de données anonymes, que nous nous utilisons pour améliorer votre expérience. Vous trouverez plus d’informations sur les données collectées dans notre "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "En participant à cette beta, vous consentez à la collecte de données anonymes, qui seront utilisées pour améliorer le produit. Vous trouverez plus d’informations sur les données collectées dans notre <2>Politique de vie privée</2> et notre <5>Politique de cookies</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Vous pouvez retirer votre consentement en décochant cette case. Si vous êtes actuellement en communication, ce paramètre prendra effet à la fin de l’appel.",
|
||||
"Your feedback": "Votre commentaire",
|
||||
"Thanks, we received your feedback!": "Merci, nous avons reçu vos commentaires !",
|
||||
"Submitting…": "Envoi…",
|
||||
"Submit": "Envoyer",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Si vous rencontrez des problèmes, ou vous voulez simplement faire un commentaire, veuillez nous envoyer une courte description ci-dessous.",
|
||||
"Feedback": "Commentaires"
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"Create account": "Buat akun",
|
||||
"Debug log": "Catatan pengawakutuan",
|
||||
"Debug log request": "Permintaan catatan pengawakutuan",
|
||||
"Description (optional)": "Deskripsi (opsional)",
|
||||
"Details": "Detail",
|
||||
"Developer": "Pengembang",
|
||||
"Display name": "Nama tampilan",
|
||||
@@ -34,7 +33,6 @@
|
||||
"Full screen": "Layar penuh",
|
||||
"Go": "Bergabung",
|
||||
"Grid layout menu": "Menu tata letak kisi",
|
||||
"Having trouble? Help us fix it.": "Mengalami masalah? Bantu kami memperbaikinya.",
|
||||
"Home": "Beranda",
|
||||
"Include debug logs": "Termasuk catatan pengawakutuan",
|
||||
"Incompatible versions": "Versi tidak kompatibel",
|
||||
@@ -46,7 +44,6 @@
|
||||
"Join call now": "Bergabung ke panggilan sekarang",
|
||||
"Join existing call?": "Bergabung ke panggilan yang sudah ada?",
|
||||
"Leave": "Keluar",
|
||||
"Loading room…": "Memuat ruangan…",
|
||||
"Loading…": "Memuat…",
|
||||
"Local volume": "Volume lokal",
|
||||
"Logging in…": "Memasuki…",
|
||||
@@ -56,7 +53,6 @@
|
||||
"Microphone permissions needed to join the call.": "Izin mikrofon dibutuhkan untuk bergabung ke panggilan ini.",
|
||||
"Microphone {{n}}": "Mikrofon {{n}}",
|
||||
"More": "Lainnya",
|
||||
"More menu": "Menu lainnya",
|
||||
"Mute microphone": "Bisukan mikrofon",
|
||||
"No": "Tidak",
|
||||
"Not now, return to home screen": "Tidak sekarang, kembali ke layar beranda",
|
||||
@@ -77,8 +73,6 @@
|
||||
"Release to stop": "Lepaskan untuk berhenti",
|
||||
"Remove": "Hapus",
|
||||
"Return to home screen": "Kembali ke layar beranda",
|
||||
"Save": "Simpan",
|
||||
"Saving…": "Menyimpan…",
|
||||
"Select an option": "Pilih sebuah opsi",
|
||||
"Send debug logs": "Kirim catatan pengawakutuan",
|
||||
"Sending…": "Mengirimkan…",
|
||||
@@ -93,7 +87,6 @@
|
||||
"Spotlight": "Sorotan",
|
||||
"Stop sharing screen": "Berhenti membagikan layar",
|
||||
"Submit feedback": "Kirim masukan",
|
||||
"Submitting feedback…": "Mengirimkan masukan…",
|
||||
"Take me Home": "Bawa saya ke Beranda",
|
||||
"Talk over speaker": "Bicara pada pembicara",
|
||||
"Talking…": "Berbicara…",
|
||||
@@ -104,7 +97,6 @@
|
||||
"Turn off camera": "Matikan kamera",
|
||||
"Turn on camera": "Nyalakan kamera",
|
||||
"Unmute microphone": "Suarakan mikrofon",
|
||||
"User ID": "ID pengguna",
|
||||
"User menu": "Menu pengguna",
|
||||
"Username": "Nama pengguna",
|
||||
"Version: {{version}}": "Versi: {{version}}",
|
||||
@@ -131,15 +123,19 @@
|
||||
"{{name}} (Connecting...)": "{{name}} (Menghubungkan...)",
|
||||
"Element Call Home": "Beranda Element Call",
|
||||
"Copy": "Salin",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Apakah pintasan papan ketik seharusnya diaktifkan, mis. 'm' untuk membisukan/menyuarakan mikrofon.",
|
||||
"Single-key keyboard shortcuts": "Pintasan papan ketik satu tombol",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Menunggu video...)",
|
||||
"This feature is only supported on Firefox.": "Fitur ini hanya didukung di Firefox.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Mengirim catatan pengawakutuan akan membantu kami melacak masalahnya.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Aduh, ada yang salah.</0>",
|
||||
"Use the upcoming grid system": "Gunakan sistem kisi yang akan segera datang",
|
||||
"Privacy Policy": "Kebijakan Privasi kami",
|
||||
"Expose developer settings in the settings window.": "Ekspos pengaturan pengembang dalam jendela pengaturan.",
|
||||
"Developer Settings": "Pengaturan Pengembang",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Dengan mencentang kotak ini Anda setuju untuk pengumpulan data anonim, yang kami gunakan untuk meningkatkan pengalaman. Anda dapat mempelajari lebih banyak informasi tentang data yang kami lacak di "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Dengan bergabung dalam beta ini, Anda mengizinkan kami untuk mengumpulkan data anonim, yang kami gunakan untuk meningkatkan produk ini. Anda dapat mempelajari lebih lanjut tentang data apa yang kami lacak dalam <2>Kebijakan Privasi</2> dan <5>Kebijakan Kuki</5> kami.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Anda dapat mengurungkan kembali izin dengan mencentang kotak ini. Jika Anda saat ini dalam panggilan, pengaturan ini akan diterapkan di akhir panggilan.",
|
||||
"Feedback": "Masukan",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Jika Anda mengalami masalah atau hanya ingin memberikan masukan, silakan kirimkan kami deskripsi pendek di bawah.",
|
||||
"Submit": "Kirim",
|
||||
"Submitting…": "Mengirim",
|
||||
"Thanks, we received your feedback!": "Terima kasih, kami telah menerima masukan Anda!",
|
||||
"Your feedback": "Masukan Anda"
|
||||
}
|
||||
|
||||
@@ -24,10 +24,8 @@
|
||||
"Copied!": "コピーしました!",
|
||||
"Copy and share this call link": "通話リンクをコピーし共有",
|
||||
"Copy": "コピー",
|
||||
"Description (optional)": "概要(任意)",
|
||||
"Debug log": "デバッグログ",
|
||||
"Create account": "アカウントを作成",
|
||||
"Having trouble? Help us fix it.": "問題が起きましたか?修正にご協力ください。",
|
||||
"Go": "続行",
|
||||
"Fetching group call timed out.": "グループ通話の取得がタイムアウトしました。",
|
||||
"Element Call Home": "Element Call ホーム",
|
||||
@@ -53,16 +51,13 @@
|
||||
"Login": "ログイン",
|
||||
"Logging in…": "ログインしています…",
|
||||
"Loading…": "読み込んでいます…",
|
||||
"Loading room…": "ルームを読み込んでいます…",
|
||||
"Leave": "退出",
|
||||
"Version: {{version}}": "バージョン:{{version}}",
|
||||
"Username": "ユーザー名",
|
||||
"User menu": "ユーザーメニュー",
|
||||
"User ID": "ユーザーID",
|
||||
"Unmute microphone": "マイクのミュートを解除",
|
||||
"Turn on camera": "カメラをつける",
|
||||
"Turn off camera": "カメラを切る",
|
||||
"Submitting feedback…": "フィードバックを送信しています…",
|
||||
"Submit feedback": "フィードバックを送信",
|
||||
"Stop sharing screen": "画面共有を停止",
|
||||
"Spotlight": "スポットライト",
|
||||
@@ -73,8 +68,6 @@
|
||||
"Settings": "設定",
|
||||
"Sending…": "送信しています…",
|
||||
"Sending debug logs…": "デバッグログを送信しています…",
|
||||
"Saving…": "保存しています…",
|
||||
"Save": "保存",
|
||||
"Return to home screen": "ホーム画面に戻る",
|
||||
"Registering…": "登録しています…",
|
||||
"Register": "登録",
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
{
|
||||
"More menu": "Menu \"więcej\"",
|
||||
"Login": "Zaloguj się",
|
||||
"Go": "Kontynuuj",
|
||||
"By clicking \"Go\", you agree to our <2>Terms and conditions</2>": "Klikając \"Kontynuuj\", wyrażasz zgodę na nasze <2>Warunki</2>",
|
||||
"{{count}} people connected|other": "{{count}} ludzi połączono",
|
||||
"Go": "Przejdź",
|
||||
"By clicking \"Go\", you agree to our <2>Terms and conditions</2>": "Klikając \"Kontynuuj\", wyrażasz zgodę na nasze <2>Zasady i warunki</2>",
|
||||
"{{count}} people connected|other": "{{count}} osób połączonych",
|
||||
"Your recent calls": "Twoje ostatnie połączenia",
|
||||
"You can't talk at the same time": "Nie możesz mówić w tym samym czasie",
|
||||
"Yes, join call": "Tak, dołącz do połączenia",
|
||||
@@ -18,7 +17,6 @@
|
||||
"Version: {{version}}": "Wersja: {{version}}",
|
||||
"Username": "Nazwa użytkownika",
|
||||
"User menu": "Menu użytkownika",
|
||||
"User ID": "ID użytkownika",
|
||||
"Unmute microphone": "Wyłącz wyciszenie mikrofonu",
|
||||
"Turn on camera": "Włącz kamerę",
|
||||
"Turn off camera": "Wyłącz kamerę",
|
||||
@@ -26,8 +24,7 @@
|
||||
"This call already exists, would you like to join?": "Te połączenie już istnieje, czy chcesz do niego dołączyć?",
|
||||
"Thanks! We'll get right on it.": "Dziękujemy! Zaraz się tym zajmiemy.",
|
||||
"Talking…": "Mówienie…",
|
||||
"Take me Home": "Zabierz mnie do ekranu startowego",
|
||||
"Submitting feedback…": "Przesyłanie opinii…",
|
||||
"Take me Home": "Zabierz mnie do strony głównej",
|
||||
"Submit feedback": "Prześlij opinię",
|
||||
"Stop sharing screen": "Zatrzymaj udostępnianie ekranu",
|
||||
"Spotlight": "Centrum uwagi",
|
||||
@@ -43,12 +40,10 @@
|
||||
"Sending debug logs…": "Wysyłanie dzienników debugowania…",
|
||||
"Send debug logs": "Wyślij dzienniki debugowania",
|
||||
"Select an option": "Wybierz opcję",
|
||||
"Saving…": "Zapisywanie…",
|
||||
"Save": "Zapisz",
|
||||
"Return to home screen": "Powróć do ekranu domowego",
|
||||
"Return to home screen": "Powróć do strony głównej",
|
||||
"Remove": "Usuń",
|
||||
"Release to stop": "Puść przycisk, aby przestać",
|
||||
"Release spacebar key to stop": "Puść spację, aby przestać",
|
||||
"Release to stop": "Puść przycisk, aby zatrzymać",
|
||||
"Release spacebar key to stop": "Puść spację, aby zatrzymać",
|
||||
"Registering…": "Rejestrowanie…",
|
||||
"Register": "Zarejestruj",
|
||||
"Recaptcha not loaded": "Recaptcha nie została załadowana",
|
||||
@@ -58,7 +53,7 @@
|
||||
"Press and hold to talk": "Przytrzymaj, aby mówić",
|
||||
"Press and hold spacebar to talk over {{name}}": "Przytrzymaj spację, aby mówić wraz z {{name}}",
|
||||
"Press and hold spacebar to talk": "Przytrzymaj spację, aby mówić",
|
||||
"Passwords must match": "Hasła muszą być identyczne",
|
||||
"Passwords must match": "Hasła muszą pasować",
|
||||
"Password": "Hasło",
|
||||
"Other users are trying to join this call from incompatible versions. These users should ensure that they have refreshed their browsers:<1>{userLis}</1>": "Inni użytkownicy próbują dołączyć do tego połączenia przy użyciu niekompatybilnych wersji. Powinni oni upewnić się, że odświeżyli stronę w swoich przeglądarkach:<1>{userLis}</1>",
|
||||
"Not registered yet? <2>Create an account</2>": "Nie masz konta? <2>Utwórz je</2>",
|
||||
@@ -71,9 +66,8 @@
|
||||
"Microphone": "Mikrofon",
|
||||
"Login to your account": "Zaloguj się do swojego konta",
|
||||
"Logging in…": "Logowanie…",
|
||||
"Local volume": "Lokalna głośność",
|
||||
"Local volume": "Głośność lokalna",
|
||||
"Loading…": "Ładowanie…",
|
||||
"Loading room…": "Ładowanie pokoju…",
|
||||
"Leave": "Opuść",
|
||||
"Join existing call?": "Dołączyć do istniejącego połączenia?",
|
||||
"Join call now": "Dołącz do połączenia teraz",
|
||||
@@ -85,57 +79,57 @@
|
||||
"Incompatible versions": "Niekompatybilne wersje",
|
||||
"Include debug logs": "Dołącz dzienniki debugowania",
|
||||
"Home": "Strona domowa",
|
||||
"Having trouble? Help us fix it.": "Masz problem? Pomóż nam go naprawić.",
|
||||
"Grid layout menu": "Menu układu siatki",
|
||||
"Full screen": "Pełen ekran",
|
||||
"Full screen": "Pełny ekran",
|
||||
"Freedom": "Wolność",
|
||||
"Fetching group call timed out.": "Przekroczono limit czasu na uzyskanie połączenia grupowego.",
|
||||
"Exit full screen": "Zamknij pełny ekran",
|
||||
"Exit full screen": "Opuść pełny ekran",
|
||||
"Download debug logs": "Pobierz dzienniki debugowania",
|
||||
"Display name": "Wyświetlana nazwa",
|
||||
"Developer": "Deweloper",
|
||||
"Display name": "Nazwa wyświetlana",
|
||||
"Developer": "Programista",
|
||||
"Details": "Szczegóły",
|
||||
"Description (optional)": "Opis (opcjonalny)",
|
||||
"Debug log request": "Prośba o dzienniki debugowania",
|
||||
"Debug log": "Dzienniki debugowania",
|
||||
"Create account": "Utwórz konto",
|
||||
"Copy and share this call link": "Skopiuj i podziel się linkiem do połączenia",
|
||||
"Copy and share this call link": "Skopiuj i udostępnij link do rozmowy",
|
||||
"Copied!": "Skopiowano!",
|
||||
"Connection lost": "Połączenie utracone",
|
||||
"Confirm password": "Potwierdź hasło",
|
||||
"Close": "Zamknij",
|
||||
"Change layout": "Zmień układ",
|
||||
"Camera/microphone permissions needed to join the call.": "Aby dołączyć do tego połączenia, potrzebne są uprawnienia do kamery/mikrofonu.",
|
||||
"Camera/microphone permissions needed to join the call.": "Wymagane są uprawnienia do kamery/mikrofonu, aby dołączyć do rozmowy.",
|
||||
"Camera {{n}}": "Kamera {{n}}",
|
||||
"Camera": "Kamera",
|
||||
"Call type menu": "Menu rodzaju połączenia",
|
||||
"Call type menu": "Menu typu połączenia",
|
||||
"Call link copied": "Skopiowano link do połączenia",
|
||||
"By clicking \"Join call now\", you agree to our <2>Terms and conditions</2>": "Klikając \"Dołącz do rozmowy\", wyrażasz zgodę na nasze <2>Warunki</2>",
|
||||
"By clicking \"Join call now\", you agree to our <2>Terms and conditions</2>": "Klikając \"Dołącz do rozmowy\", wyrażasz zgodę na nasze <2>Zasady i warunki</2>",
|
||||
"Avatar": "Awatar",
|
||||
"Audio": "Dźwięk",
|
||||
"Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.": "Inny użytkownik w tym połączeniu napotkał problem. Aby lepiej zdiagnozować tę usterkę, chcielibyśmy zebrać dzienniki debugowania.",
|
||||
"Accept microphone permissions to join the call.": "Przyznaj uprawnienia do mikrofonu aby dołączyć do połączenia.",
|
||||
"Accept camera/microphone permissions to join the call.": "Przyznaj uprawnienia do kamery/mikrofonu aby dołączyć do połączenia.",
|
||||
"Accept microphone permissions to join the call.": "Akceptuj uprawnienia mikrofonu, aby dołączyć do połączenia.",
|
||||
"Accept camera/microphone permissions to join the call.": "Akceptuj uprawnienia kamery/mikrofonu, aby dołączyć do połączenia.",
|
||||
"<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>": "<0>Może zechcesz ustawić hasło, aby zachować swoje konto?</0><1>Będziesz w stanie utrzymać swoją nazwę i ustawić awatar do wyświetlania podczas połączeń w przyszłości</1>",
|
||||
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Utwórz konto</0> Albo <2>Dołącz jako gość</2>",
|
||||
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Masz już konto?</0><1><0>Zaloguj się</0> Albo <2>Dołącz jako gość</2></1>",
|
||||
"<0>Create an account</0> Or <2>Access as a guest</2>": "<0>Utwórz konto</0> lub <2>Dołącz jako gość</2>",
|
||||
"<0>Already have an account?</0><1><0>Log in</0> Or <2>Access as a guest</2></1>": "<0>Masz już konto?</0><1><0>Zaloguj się</0> lub <2>Dołącz jako gość</2></1>",
|
||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - połączenie walkie-talkie",
|
||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||
"{{name}} is talking…": "{{name}} mówi…",
|
||||
"{{name}} is presenting": "{{name}} prezentuje",
|
||||
"{{displayName}}, your call is now ended": "{{displayName}}, twoje połączenie zostało zakończone",
|
||||
"{{count}} people connected|one": "{{count}} osoba połączona",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Czy włączyć skróty klawiszowe pojedynczych klawiszy, np. 'm' aby wyciszyć/załączyć mikrofon.",
|
||||
"This feature is only supported on Firefox.": "Ta funkcjonalność jest dostępna tylko w Firefox.",
|
||||
"Single-key keyboard shortcuts": "Skróty klawiszowe (pojedyncze klawisze)",
|
||||
"Copy": "Kopiuj",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Wysłanie logów debuggowania pomoże nam ustalić przyczynę problemu.</0>",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Wysłanie dzienników debuggowania pomoże nam ustalić przyczynę problemu.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Ojej, coś poszło nie tak.</0>",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>Dołącz do rozmowy teraz</0><1>Or</1><2>Skopiuj link do rozmowy i dołącz później</2>",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>Dołącz do rozmowy już teraz</0><1>lub</1><2>Skopiuj link do rozmowy i dołącz później</2>",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Oczekiwanie na wideo...)",
|
||||
"{{name}} (Connecting...)": "{{name}} (Łączenie...)",
|
||||
"Expose developer settings in the settings window.": "Wyświetlaj opcje programisty w oknie ustawień.",
|
||||
"Expose developer settings in the settings window.": "Wyświetl opcje programisty w oknie ustawień.",
|
||||
"Element Call Home": "Strona główna Element Call",
|
||||
"Developer Settings": "Opcje programisty",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Zaznaczając to pole, wyrażasz zgodę na gromadzenie anonimowych danych, które wykorzystujemy do poprawy Twoich doświadczeń. Więcej informacji o tym, jakie dane śledzimy, można znaleźć w naszym "
|
||||
"Talk over speaker": "Rozmowa przez głośnik",
|
||||
"Use the upcoming grid system": "Użyj nadchodzącego systemu siatek",
|
||||
"This site is protected by ReCAPTCHA and the Google <2>Privacy Policy</2> and <6>Terms of Service</6> apply.<9></9>By clicking \"Register\", you agree to our <12>Terms and conditions</12>": "Ta strona jest chroniona przez ReCAPTCHA, więc obowiązują na niej <2>Polityka prywatności</2> i <6>Warunki świadczenia usług</6> Google.<9></9>Klikając \"Zarejestruj się\", zgadzasz się na nasze <12>Warunki świadczenia usług</12>",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Możesz wycofać swoją zgodę poprzez odznaczenie tego pola. Jeśli już jesteś w trakcie rozmowy, opcja zostanie zastosowana po jej zakończeniu.",
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Uczestnicząc w tej becie, upoważniasz nas do zbierania anonimowych danych, które wykorzystamy do ulepszenia produktu. Dowiedz się więcej na temat danych, które zbieramy w naszej <2>Polityce prywatności</2> i <5>Polityce ciasteczek</5>."
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"Register": "Зарегистрироваться",
|
||||
"Saving…": "Сохранение…",
|
||||
"Registering…": "Регистрация…",
|
||||
"Logging in…": "Вход…",
|
||||
"{{names}}, {{name}}": "{{names}}, {{name}}",
|
||||
@@ -10,7 +9,6 @@
|
||||
"This call already exists, would you like to join?": "Этот звонок уже существует, хотите присоединиться?",
|
||||
"Thanks! We'll get right on it.": "Спасибо! Мы учтём ваш отзыв.",
|
||||
"Talking…": "Говорите…",
|
||||
"Submitting feedback…": "Отправка отзыва…",
|
||||
"Submit feedback": "Отправить отзыв",
|
||||
"Sending debug logs…": "Отправка журнала отладки…",
|
||||
"Select an option": "Выберите вариант",
|
||||
@@ -38,7 +36,6 @@
|
||||
"Version: {{version}}": "Версия: {{version}}",
|
||||
"Username": "Имя пользователя",
|
||||
"User menu": "Меню пользователя",
|
||||
"User ID": "ID пользователя",
|
||||
"Unmute microphone": "Включить микрофон",
|
||||
"Turn on camera": "Включить камеру",
|
||||
"Turn off camera": "Отключить камеру",
|
||||
@@ -57,7 +54,6 @@
|
||||
"Sending…": "Отправка…",
|
||||
"Local volume": "Местная громкость",
|
||||
"Call type menu": "Меню \"Тип звонка\"",
|
||||
"More menu": "Полное меню",
|
||||
"{{roomName}} - Walkie-talkie call": "{{roomName}} - Звонок-рация",
|
||||
"Include debug logs": "Приложить журнал отладки",
|
||||
"Download debug logs": "Скачать журнал отладки",
|
||||
@@ -65,7 +61,6 @@
|
||||
"Debug log": "Журнал отладки",
|
||||
"Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.": "У одного из участников звонка есть неполадки. Чтобы лучше диагностировать похожие проблемы, нам нужен журнал отладки.",
|
||||
"Send debug logs": "Отправить журнал отладки",
|
||||
"Save": "Сохранить",
|
||||
"Return to home screen": "Вернуться в Начало",
|
||||
"Remove": "Удалить",
|
||||
"Recaptcha not loaded": "Невозможно начать проверку",
|
||||
@@ -86,7 +81,6 @@
|
||||
"Login to your account": "Войдите в свой аккаунт",
|
||||
"Login": "Вход",
|
||||
"Loading…": "Загрузка…",
|
||||
"Loading room…": "Загрузка комнаты…",
|
||||
"Leave": "Покинуть",
|
||||
"Join existing call?": "Присоединиться к существующему звонку?",
|
||||
"Join call now": "Присоединиться сейчас",
|
||||
@@ -97,7 +91,6 @@
|
||||
"Incompatible versions!": "Несовместимые версии!",
|
||||
"Incompatible versions": "Несовместимые версии",
|
||||
"Home": "Начало",
|
||||
"Having trouble? Help us fix it.": "Есть проблема? Помогите нам её устранить.",
|
||||
"Go": "Далее",
|
||||
"Full screen": "Полноэкранный режим",
|
||||
"Freedom": "Свобода",
|
||||
@@ -106,7 +99,6 @@
|
||||
"Display name": "Видимое имя",
|
||||
"Developer": "Разработчику",
|
||||
"Details": "Подробности",
|
||||
"Description (optional)": "Описание (необязательно)",
|
||||
"Create account": "Создать аккаунт",
|
||||
"Copy and share this call link": "Скопируйте и поделитесь этой ссылкой на звонок",
|
||||
"Copied!": "Скопировано!",
|
||||
@@ -129,13 +121,15 @@
|
||||
"{{count}} people connected|one": "{{count}} подключился",
|
||||
"Element Call Home": "Главная Element Call",
|
||||
"Copy": "Копировать",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>Присоединиться сейчас</0><1>или<1><2>cкопировать ссылку на звонок и присоединиться позже</2>",
|
||||
"<0>Join call now</0><1>Or</1><2>Copy call link and join later</2>": "<0>Присоединиться сейчас к звонку</0><1>или<1><2>Скопировать ссылку на звонок и присоединиться позже</2>",
|
||||
"{{name}} (Connecting...)": "{{name}} (Соединение...)",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Включить горячие клавиши, например 'm' чтобы отключить/включить микрофон.",
|
||||
"This feature is only supported on Firefox.": "Эта возможность доступна только в Firefox.",
|
||||
"Single-key keyboard shortcuts": "Горячие клавиши",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Отправка журналов поможет нам найти и устранить проблему.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Упс, что-то пошло не так.</0>",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Ожидание видео...)",
|
||||
"Use the upcoming grid system": "Использовать сеточный показ"
|
||||
"Use the upcoming grid system": "Использовать сеточный показ",
|
||||
"Expose developer settings in the settings window.": "Раскрыть настройки разработчика в окне настроек.",
|
||||
"Developer Settings": "Настройки Разработчика",
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Участвуя в этой бета-версии, вы соглашаетесь на сбор анонимных данных, которые мы используем для улучшения продукта. Более подробную информацию о том, какие данные мы отслеживаем, вы можете найти в нашей <2> Политике конфиденциальности</2> и нашей <5> Политике использования файлов cookie</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Вы можете отозвать согласие, сняв этот флажок. Если вы в данный момент находитесь в разговоре, эта настройка вступит в силу по окончании разговора."
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"Fetching group call timed out.": "Vypršal čas načítania skupinového volania.",
|
||||
"Element Call Home": "Domov Element Call",
|
||||
"You can't talk at the same time": "Nemôžete hovoriť naraz",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Či chcete povoliť jednotlačidlové klávesové skratky, napr. \"m\" na stlmenie/zapnutie mikrofónu.",
|
||||
"Waiting for other participants…": "Čaká sa na ďalších účastníkov…",
|
||||
"Waiting for network": "Čakanie na sieť",
|
||||
"This will make a speaker's audio seem as if it is coming from where their tile is positioned on screen. (Experimental feature: this may impact the stability of audio.)": "Zvuk reproduktora tak bude vyzerať, akoby vychádzal z miesta, kde je na obrazovke umiestnená jeho ikona. (Experimentálna funkcia: môže to mať vplyv na stabilitu zvuku.)",
|
||||
@@ -13,18 +12,14 @@
|
||||
"Talking…": "Rozprávanie…",
|
||||
"Talk over speaker": "Hovor cez reproduktor",
|
||||
"Take me Home": "Zober ma domov",
|
||||
"Submitting feedback…": "Odosielanie spätnej väzby…",
|
||||
"Submit feedback": "Odoslať spätnú väzbu",
|
||||
"Stop sharing screen": "Zastaviť zdieľanie obrazovky",
|
||||
"Single-key keyboard shortcuts": "Jednotlačidlové klávesové skratky",
|
||||
"Show call inspector": "Zobraziť inšpektora hovorov",
|
||||
"Share screen": "Zdieľať obrazovku",
|
||||
"Sending…": "Odosielanie…",
|
||||
"Sending debug logs…": "Odosielanie záznamov o ladení…",
|
||||
"Send debug logs": "Odoslať záznamy o ladení",
|
||||
"Select an option": "Vyberte možnosť",
|
||||
"Saving…": "Ukladanie…",
|
||||
"Save": "Uložiť",
|
||||
"Return to home screen": "Návrat na domovskú obrazovku",
|
||||
"Remove": "Odstrániť",
|
||||
"Release spacebar key to stop": "Pustite medzerník pre ukončenie",
|
||||
@@ -45,7 +40,6 @@
|
||||
"Not now, return to home screen": "Teraz nie, vrátiť sa na domovskú obrazovku",
|
||||
"No": "Nie",
|
||||
"Mute microphone": "Stlmiť mikrofón",
|
||||
"More menu": "Ponuka viac",
|
||||
"More": "Viac",
|
||||
"Microphone permissions needed to join the call.": "Povolenie mikrofónu je potrebné na pripojenie k hovoru.",
|
||||
"Microphone {{n}}": "Mikrofón {{n}}",
|
||||
@@ -54,7 +48,6 @@
|
||||
"Login": "Prihlásiť sa",
|
||||
"Logging in…": "Prihlasovanie…",
|
||||
"Loading…": "Načítanie…",
|
||||
"Loading room…": "Načítanie miestnosti…",
|
||||
"Leave": "Opustiť",
|
||||
"Join existing call?": "Pripojiť sa k existujúcemu hovoru?",
|
||||
"Join call now": "Pripojiť sa k hovoru teraz",
|
||||
@@ -65,7 +58,6 @@
|
||||
"Incompatible versions!": "Nekompatibilné verzie!",
|
||||
"Incompatible versions": "Nekompatibilné verzie",
|
||||
"Home": "Domov",
|
||||
"Having trouble? Help us fix it.": "Máte problém? Pomôžte nám ho opraviť.",
|
||||
"Grid layout menu": "Ponuka rozloženia mriežky",
|
||||
"Go": "Prejsť",
|
||||
"Full screen": "Zobrazenie na celú obrazovku",
|
||||
@@ -83,7 +75,6 @@
|
||||
"Version: {{version}}": "Verzia: {{version}}",
|
||||
"Username": "Meno používateľa",
|
||||
"User menu": "Používateľské menu",
|
||||
"User ID": "ID používateľa",
|
||||
"Unmute microphone": "Zrušiť stlmenie mikrofónu",
|
||||
"Turn on camera": "Zapnúť kameru",
|
||||
"Turn off camera": "Vypnúť kameru",
|
||||
@@ -98,7 +89,6 @@
|
||||
"Display name": "Zobrazované meno",
|
||||
"Developer": "Vývojár",
|
||||
"Details": "Podrobnosti",
|
||||
"Description (optional)": "Popis (voliteľné)",
|
||||
"Debug log request": "Žiadosť o záznam ladenia",
|
||||
"Debug log": "Záznam o ladení",
|
||||
"Create account": "Vytvoriť účet",
|
||||
@@ -138,8 +128,14 @@
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Odoslanie záznamov ladenia nám pomôže nájsť problém.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Hups, niečo sa pokazilo.</0>",
|
||||
"Use the upcoming grid system": "Použiť pripravovaný systém mriežky",
|
||||
"Privacy Policy": "Zásady ochrany osobných údajov",
|
||||
"Expose developer settings in the settings window.": "Zobraziť nastavenia pre vývojárov v okne nastavení.",
|
||||
"Developer Settings": "Nastavenia pre vývojárov",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Označením tohto políčka súhlasíte so zhromažďovaním anonymných údajov, ktoré používame na zlepšenie vašich skúseností. Viac informácií o tom, ktoré údaje sledujeme, nájdete v našich "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Účasťou v tejto beta verzii súhlasíte so zhromažďovaním anonymných údajov, ktoré použijeme na zlepšenie produktu. Viac informácií o tom, ktoré údaje sledujeme, nájdete v našich <2>Zásadách ochrany osobných údajov</2> a <5>Zásadách používania súborov cookie</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Súhlas môžete odvolať zrušením označenia tohto políčka. Ak práve prebieha hovor, toto nastavenie nadobudne platnosť po skončení hovoru.",
|
||||
"Your feedback": "Vaša spätná väzba",
|
||||
"Thanks, we received your feedback!": "Ďakujeme, dostali sme vašu spätnú väzbu!",
|
||||
"Submitting…": "Odosielanie…",
|
||||
"Submit": "Odoslať",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Ak máte problémy alebo jednoducho chcete poskytnúť spätnú väzbu, pošlite nám krátky popis nižšie.",
|
||||
"Feedback": "Spätná väzba"
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
"Create account": "Hesap aç",
|
||||
"Debug log": "Hata ayıklama kütüğü",
|
||||
"Debug log request": "Hata ayıklama kütük istemi",
|
||||
"Description (optional)": "Tanım (isteğe bağlı)",
|
||||
"Details": "Ayrıntı",
|
||||
"Developer": "Geliştirici",
|
||||
"Display name": "Ekran adı",
|
||||
@@ -32,7 +31,6 @@
|
||||
"Full screen": "Tam ekran",
|
||||
"Go": "Git",
|
||||
"Grid layout menu": "Izgara plan menü",
|
||||
"Having trouble? Help us fix it.": "Sorun mu var? Çözmemize yardım edin.",
|
||||
"Home": "Ev",
|
||||
"Include debug logs": "Hata ayıklama kütüğünü dahil et",
|
||||
"Incompatible versions": "Uyumsuz sürümler",
|
||||
@@ -43,7 +41,6 @@
|
||||
"Join call now": "Aramaya katıl",
|
||||
"Join existing call?": "Mevcut aramaya katıl?",
|
||||
"Leave": "Çık",
|
||||
"Loading room…": "Oda yükleniyor…",
|
||||
"Loading…": "Yükleniyor…",
|
||||
"Local volume": "Yerel ses seviyesi",
|
||||
"Logging in…": "Giriliyor…",
|
||||
@@ -53,7 +50,6 @@
|
||||
"Microphone permissions needed to join the call.": "Aramaya katılmak için mikrofon erişim izni gerek.",
|
||||
"Microphone {{n}}": "{{n}}. mikrofon",
|
||||
"More": "Daha",
|
||||
"More menu": "Daha fazla",
|
||||
"Mute microphone": "Mikrofonu kapat",
|
||||
"No": "Hayır",
|
||||
"Not now, return to home screen": "Şimdi değil, ev ekranına dön",
|
||||
@@ -71,8 +67,6 @@
|
||||
"Release to stop": "Kesmek için bırakın",
|
||||
"Remove": "Çıkar",
|
||||
"Return to home screen": "Ev ekranına geri dön",
|
||||
"Save": "Kaydet",
|
||||
"Saving…": "Kaydediliyor…",
|
||||
"Select an option": "Bir seçenek seç",
|
||||
"Send debug logs": "Hata ayıklama kütüğünü gönder",
|
||||
"Sending…": "Gönderiliyor…",
|
||||
@@ -84,7 +78,6 @@
|
||||
"Spatial audio": "Uzamsal ses",
|
||||
"Stop sharing screen": "Ekran paylaşmayı terk et",
|
||||
"Submit feedback": "Geri bildirim ver",
|
||||
"Submitting feedback…": "Geri bildirimler gönderiliyor…",
|
||||
"Take me Home": "Ev ekranına gir",
|
||||
"Talking…": "Konuşuyor…",
|
||||
"Thanks! We'll get right on it.": "Sağol! Bununla ilgileneceğiz.",
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
"Version: {{version}}": "Версія: {{version}}",
|
||||
"Username": "Ім'я користувача",
|
||||
"User menu": "Меню користувача",
|
||||
"User ID": "ID користувача",
|
||||
"Unmute microphone": "Увімкнути мікрофон",
|
||||
"Turn on camera": "Увімкнути камеру",
|
||||
"Turn off camera": "Вимкнути камеру",
|
||||
@@ -25,7 +24,6 @@
|
||||
"Talking…": "Говоріть…",
|
||||
"Talk over speaker": "Говорити через динамік",
|
||||
"Take me Home": "Перейти до Домівки",
|
||||
"Submitting feedback…": "Надсилання відгуку…",
|
||||
"Submit feedback": "Надіслати відгук",
|
||||
"Stop sharing screen": "Припинити показ екрана",
|
||||
"Spotlight": "У центрі уваги",
|
||||
@@ -38,11 +36,9 @@
|
||||
"Share screen": "Поділитися екраном",
|
||||
"Settings": "Налаштування",
|
||||
"Sending…": "Надсилання…",
|
||||
"Sending debug logs…": "Надсилання журналу зневадження…",
|
||||
"Send debug logs": "Надіслати журнал зневадження",
|
||||
"Sending debug logs…": "Надсилання журналу налагодження…",
|
||||
"Send debug logs": "Надіслати журнал налагодження",
|
||||
"Select an option": "Вибрати опцію",
|
||||
"Saving…": "Збереження…",
|
||||
"Save": "Зберегти",
|
||||
"Return to home screen": "Повернутися на екран домівки",
|
||||
"Remove": "Вилучити",
|
||||
"Release to stop": "Відпустіть, щоб закінчити",
|
||||
@@ -63,7 +59,6 @@
|
||||
"Not now, return to home screen": "Не зараз, повернутися на екран домівки",
|
||||
"No": "Ні",
|
||||
"Mute microphone": "Заглушити мікрофон",
|
||||
"More menu": "Усе меню",
|
||||
"More": "Докладніше",
|
||||
"Microphone permissions needed to join the call.": "Для участі у виклику необхідний дозвіл на користування мікрофоном.",
|
||||
"Microphone {{n}}": "Мікрофон {{n}}",
|
||||
@@ -72,7 +67,6 @@
|
||||
"Login": "Увійти",
|
||||
"Logging in…": "Вхід…",
|
||||
"Local volume": "Локальна гучність",
|
||||
"Loading room…": "Завантаження кімнати…",
|
||||
"Leave": "Вийти",
|
||||
"Join existing call?": "Приєднатися до наявного виклику?",
|
||||
"Join call now": "Приєднатися до виклику зараз",
|
||||
@@ -82,22 +76,20 @@
|
||||
"Inspector": "Інспектор",
|
||||
"Incompatible versions!": "Несумісні версії!",
|
||||
"Incompatible versions": "Несумісні версії",
|
||||
"Include debug logs": "Долучити журнали зневадження",
|
||||
"Include debug logs": "Долучити журнали налагодження",
|
||||
"Home": "Домівка",
|
||||
"Having trouble? Help us fix it.": "Проблеми? Допоможіть нам це виправити.",
|
||||
"Grid layout menu": "Меню у вигляді сітки",
|
||||
"Go": "Далі",
|
||||
"Full screen": "Повноекранний режим",
|
||||
"Freedom": "Свобода",
|
||||
"Fetching group call timed out.": "Вичерпано час очікування групового виклику.",
|
||||
"Exit full screen": "Вийти з повноекранного режиму",
|
||||
"Download debug logs": "Завантажити журнали зневадження",
|
||||
"Download debug logs": "Завантажити журнали налагодження",
|
||||
"Display name": "Показуване ім'я",
|
||||
"Developer": "Розробнику",
|
||||
"Details": "Подробиці",
|
||||
"Description (optional)": "Опис (необов'язково)",
|
||||
"Debug log request": "Запит журналу зневадження",
|
||||
"Debug log": "Журнал зневадження",
|
||||
"Debug log request": "Запит журналу налагодження",
|
||||
"Debug log": "Журнал налагодження",
|
||||
"Create account": "Створити обліковий запис",
|
||||
"Copy and share this call link": "Скопіювати та поділитися цим посиланням на виклик",
|
||||
"Copied!": "Скопійовано!",
|
||||
@@ -114,7 +106,7 @@
|
||||
"By clicking \"Go\", you agree to our <2>Terms and conditions</2>": "Натиснувши «Далі», ви погодитеся з нашими <2>Умовами та положеннями</2>",
|
||||
"Avatar": "Аватар",
|
||||
"Audio": "Звук",
|
||||
"Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.": "Інший користувач у цьому виклику має проблему. Щоб краще визначити ці проблеми, ми хотіли б зібрати журнал зневадження.",
|
||||
"Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.": "Інший користувач у цьому виклику має проблему. Щоб краще визначити ці проблеми, ми хотіли б зібрати журнал налагодження.",
|
||||
"Accept microphone permissions to join the call.": "Надайте дозволи на використання мікрофонів для приєднання до виклику.",
|
||||
"Accept camera/microphone permissions to join the call.": "Надайте дозвіл на використання камери/мікрофона для приєднання до виклику.",
|
||||
"<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>": "<0>Чому б не завершити, налаштувавши пароль для збереження свого облікового запису?</0><1>Ви зможете зберегти своє ім'я та встановити аватарку для подальшого користування під час майбутніх викликів</1>",
|
||||
@@ -131,15 +123,19 @@
|
||||
"{{name}} (Connecting...)": "{{name}} (З'єднання...)",
|
||||
"Element Call Home": "Домівка Element Call",
|
||||
"Copy": "Копіювати",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "Чи вмикати/вимикати мікрофон однією клавішею, наприклад, «m» для ввімкнення/вимкнення мікрофона.",
|
||||
"Single-key keyboard shortcuts": "Одноклавішні комбінації клавіш",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Очікування на відео...)",
|
||||
"This feature is only supported on Firefox.": "Ця функція підтримується лише в браузері Firefox.",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Надсилання журналів зневадження допоможе нам виявити проблему.</0>",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>Надсилання журналів налагодження допоможе нам виявити проблему.</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>Йой, щось пішло не за планом.</0>",
|
||||
"Use the upcoming grid system": "Використовувати майбутню сіткову систему",
|
||||
"Privacy Policy": "Політика приватності",
|
||||
"Expose developer settings in the settings window.": "Відкрийте налаштування розробника у вікні налаштувань.",
|
||||
"Developer Settings": "Налаштування розробника",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "Ставлячи прапорець у цьому полі, ви погоджуєтеся на збір анонімних даних, які ми використовуємо для поліпшення роботи. Ви можете знайти більше інформації про те, які дані ми відстежуємо в нашому "
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "Користуючись дочасним доступом, ви даєте згоду на збір анонімних даних, які ми використовуємо для вдосконалення продукту. Ви можете знайти більше інформації про те, які дані ми відстежуємо в нашій <2>Політиці Приватності</2> і нашій <5>Політиці про куки</5>.",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>Ви можете відкликати згоду, прибравши цей прапорець. Якщо ви зараз розмовляєте, це налаштування застосується після завершення виклику.",
|
||||
"Your feedback": "Ваш відгук",
|
||||
"Thanks, we received your feedback!": "Дякуємо, ми отримали ваш відгук!",
|
||||
"Submitting…": "Надсилання…",
|
||||
"Submit": "Надіслати",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "Якщо у вас виникли проблеми або ви просто хочете залишити відгук, надішліть нам короткий опис нижче.",
|
||||
"Feedback": "Відгук"
|
||||
}
|
||||
|
||||
38
public/locales/vi/app.json
Normal file
38
public/locales/vi/app.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"Login": "Đăng nhập",
|
||||
"{{count}} people connected|other": "{{count}} người đã kết nối",
|
||||
"{{name}} (Waiting for video...)": "{{name}} (Đang đợi truyền hình...)",
|
||||
"Join call": "Tham gia cuộc gọi",
|
||||
"Mute microphone": "Tắt micrô",
|
||||
"Password": "Mật khẩu",
|
||||
"Settings": "Cài đặt",
|
||||
"Sending…": "Đang gửi…",
|
||||
"Sign in": "Đăng nhập",
|
||||
"Submit": "Gửi",
|
||||
"Video call name": "Tên cuộc gọi truyền hình",
|
||||
"Video call": "Gọi truyền hình",
|
||||
"Video": "Truyền hình",
|
||||
"Username": "Tên người dùng",
|
||||
"Yes, join call": "Vâng, tham gia cuộc gọi",
|
||||
"Your feedback": "Phản hồi của bạn",
|
||||
"{{count}} people connected|one": "{{count}} người đã kết nối",
|
||||
"{{displayName}}, your call is now ended": "{{displayName}}, cuộc gọi của bạn đã kết thúc",
|
||||
"{{name}} (Connecting...)": "{{name}} (Đang kết nối...)",
|
||||
"Your recent calls": "Cuộc gọi gần đây",
|
||||
"You can't talk at the same time": "Bạn không thể nói cùng thời điểm",
|
||||
"WebRTC is not supported or is being blocked in this browser.": "WebRTC không được hỗ trợ hay bị chặn trong trình duyệt này.",
|
||||
"Waiting for network": "Đang đợi kết nối mạng",
|
||||
"Waiting for other participants…": "Đang đợi những người khác…",
|
||||
"Version: {{version}}": "Phiên bản: {{version}}",
|
||||
"Turn on camera": "Bật máy quay",
|
||||
"Turn off camera": "Tắt máy quay",
|
||||
"Submit feedback": "Gửi phản hồi",
|
||||
"Stop sharing screen": "Ngừng chia sẻ màn hình",
|
||||
"Speaker": "Loa",
|
||||
"Sign out": "Đăng xuất",
|
||||
"Share screen": "Chia sẻ màn hình",
|
||||
"No": "Không",
|
||||
"Invite people": "Mời mọi người",
|
||||
"Join call now": "Tham gia cuộc gọi",
|
||||
"Create account": "Tạo tài khoản"
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
"Your recent calls": "最近通话",
|
||||
"You can't talk at the same time": "你不能在同一时间发言",
|
||||
"Yes, join call": "是,加入通话",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "是否启用单键键盘快捷键,例如,'m'可使麦克风静音/取消静音。",
|
||||
"WebRTC is not supported or is being blocked in this browser.": "此浏览器不支持WebRTC或WebRTC被浏览器阻止。",
|
||||
"Walkie-talkie call name": "对讲机通话名称",
|
||||
"Walkie-talkie call": "对讲机通话",
|
||||
@@ -14,7 +13,6 @@
|
||||
"Version: {{version}}": "版本:{{version}}",
|
||||
"Username": "用户名",
|
||||
"User menu": "用户菜单",
|
||||
"User ID": "用户ID",
|
||||
"Unmute microphone": "取消麦克风静音",
|
||||
"Turn on camera": "开启摄像头",
|
||||
"Turn off camera": "关闭摄像头",
|
||||
@@ -25,14 +23,12 @@
|
||||
"Talking…": "正在发言……",
|
||||
"Talk over speaker": "通过扬声器发言",
|
||||
"Take me Home": "返回主页",
|
||||
"Submitting feedback…": "正在提交反馈……",
|
||||
"Submit feedback": "提交反馈",
|
||||
"Stop sharing screen": "停止屏幕共享",
|
||||
"Spotlight": "聚焦模式",
|
||||
"Speaker {{n}}": "发言人 {{n}}",
|
||||
"Speaker": "发言人",
|
||||
"Spatial audio": "空间音频",
|
||||
"Single-key keyboard shortcuts": "单键键盘快捷方式",
|
||||
"Sign out": "注销登录",
|
||||
"Sign in": "登录",
|
||||
"Audio": "音频",
|
||||
@@ -60,8 +56,6 @@
|
||||
"Sending debug logs…": "正在发送调试日志……",
|
||||
"Send debug logs": "发送调试日志",
|
||||
"Select an option": "选择一个选项",
|
||||
"Saving…": "正在保存……",
|
||||
"Save": "保存",
|
||||
"Return to home screen": "返回主页",
|
||||
"Remove": "移除",
|
||||
"Release to stop": "松开后停止",
|
||||
@@ -82,7 +76,6 @@
|
||||
"Not now, return to home screen": "暂不,先返回主页",
|
||||
"No": "否",
|
||||
"Mute microphone": "麦克风静音",
|
||||
"More menu": "更多",
|
||||
"More": "更多",
|
||||
"Microphone permissions needed to join the call.": "加入通话需要麦克风权限。",
|
||||
"Microphone {{n}}": "麦克风 {{n}}",
|
||||
@@ -92,7 +85,6 @@
|
||||
"Logging in…": "登录中……",
|
||||
"Local volume": "本地音量",
|
||||
"Loading…": "加载中……",
|
||||
"Loading room…": "加载房间中……",
|
||||
"Leave": "离开",
|
||||
"Join existing call?": "加入现有的通话?",
|
||||
"Join call now": "现在加入通话",
|
||||
@@ -103,7 +95,6 @@
|
||||
"Incompatible versions": "不兼容版本",
|
||||
"Include debug logs": "包含调试日志",
|
||||
"Home": "主页",
|
||||
"Having trouble? Help us fix it.": "遇到麻烦?帮助我们解决问题。",
|
||||
"Grid layout menu": "网格布局菜单",
|
||||
"Go": "开始",
|
||||
"Full screen": "全屏",
|
||||
@@ -115,7 +106,6 @@
|
||||
"Display name": "显示名称",
|
||||
"Developer": "开发者",
|
||||
"Details": "详情",
|
||||
"Description (optional)": "描述(可选)",
|
||||
"Debug log request": "调试日志请求",
|
||||
"Debug log": "调试日志",
|
||||
"Create account": "创建账户",
|
||||
@@ -133,5 +123,7 @@
|
||||
"Call type menu": "通话类型菜单",
|
||||
"Call link copied": "链接已复制",
|
||||
"By clicking \"Join call now\", you agree to our <2>Terms and conditions</2>": "点击“现在加入”则表示同意我们的<2>条款与条件<2>",
|
||||
"Avatar": "头像"
|
||||
"Avatar": "头像",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>哎哟,出问题了。</0>",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": ""
|
||||
}
|
||||
|
||||
@@ -12,16 +12,13 @@
|
||||
"{{count}} people connected|other": "{{count}} 人已連結",
|
||||
"{{count}} people connected|one": "{{count}} 人已連結",
|
||||
"Use the upcoming grid system": "使用即將推出的網格系統",
|
||||
"Privacy Policy": "隱私權政策",
|
||||
"Expose developer settings in the settings window.": "在設定視窗中顯示開發者設定。",
|
||||
"Developer Settings": "開發者設定",
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our ": "勾選這個選取盒,代表您同意我們以匿名方式收集資料,用於改善您的使用體驗。您可以在下列位置找到我們會收集哪些資料的相關資訊: ",
|
||||
"<0>Submitting debug logs will help us track down the problem.</0>": "<0>送出除錯紀錄,可幫助我們修正問題。</0>",
|
||||
"<0>Oops, something's gone wrong.</0>": "<0>喔喔,有些地方怪怪的。</0>",
|
||||
"Your recent calls": "您最近的通話",
|
||||
"You can't talk at the same time": "您無法在同一時間發言",
|
||||
"Yes, join call": "是,加入對話",
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic.": "是否要啟用快捷鍵,例如:開/關麥克風。",
|
||||
"WebRTC is not supported or is being blocked in this browser.": "此瀏覽器未支援 WebRTC 或 WebRTC 被瀏覽器封鎖。",
|
||||
"Walkie-talkie call name": "對講機式通話名稱",
|
||||
"Walkie-talkie call": "即時通話",
|
||||
@@ -33,7 +30,6 @@
|
||||
"Version: {{version}}": "版本: {{version}}",
|
||||
"Username": "使用者名稱",
|
||||
"User menu": "使用者選單",
|
||||
"User ID": "使用者 ID",
|
||||
"Unmute microphone": "取消麥克風靜音",
|
||||
"Turn on camera": "開啟相機",
|
||||
"Turn off camera": "關閉相機",
|
||||
@@ -45,14 +41,12 @@
|
||||
"Talking…": "對話中…",
|
||||
"Talk over speaker": "以擴音對話",
|
||||
"Take me Home": "帶我回主畫面",
|
||||
"Submitting feedback…": "遞交回饋…",
|
||||
"Submit feedback": "遞交回覆",
|
||||
"Stop sharing screen": "停止分享螢幕畫面",
|
||||
"Spotlight": "聚焦",
|
||||
"Speaker {{n}}": "發言者{{n}}",
|
||||
"Speaker": "發言者",
|
||||
"Spatial audio": "空間音效",
|
||||
"Single-key keyboard shortcuts": "快捷鍵",
|
||||
"Sign out": "登出",
|
||||
"Sign in": "登入",
|
||||
"Show call inspector": "顯示通話稽查員",
|
||||
@@ -62,8 +56,6 @@
|
||||
"Sending debug logs…": "傳送除錯記錄檔中…",
|
||||
"Send debug logs": "傳送除錯紀錄",
|
||||
"Select an option": "選擇一個選項",
|
||||
"Saving…": "儲存中…",
|
||||
"Save": "儲存",
|
||||
"Return to home screen": "回到首頁",
|
||||
"Remove": "移除",
|
||||
"Release to stop": "放開以停止",
|
||||
@@ -84,7 +76,6 @@
|
||||
"Not now, return to home screen": "現在不行,回到首頁",
|
||||
"No": "否",
|
||||
"Mute microphone": "麥克風靜音",
|
||||
"More menu": "更多選單",
|
||||
"More": "更多",
|
||||
"Microphone permissions needed to join the call.": "加入通話前需要取得麥克風的權限。",
|
||||
"Microphone {{n}}": "麥克風 {{n}}",
|
||||
@@ -94,7 +85,6 @@
|
||||
"Logging in…": "登入中…",
|
||||
"Local volume": "您的音量",
|
||||
"Loading…": "載入中…",
|
||||
"Loading room…": "載入聊天室…",
|
||||
"Leave": "離開",
|
||||
"Join existing call?": "加入已開始的通話嗎?",
|
||||
"Join call now": "現在加入通話",
|
||||
@@ -106,7 +96,6 @@
|
||||
"Incompatible versions": "不相容版本",
|
||||
"Include debug logs": "包含除錯紀錄",
|
||||
"Home": "首頁",
|
||||
"Having trouble? Help us fix it.": "遇到問題嗎?請讓我們協助您。",
|
||||
"Grid layout menu": "格框式清單",
|
||||
"Go": "前往",
|
||||
"Full screen": "全螢幕",
|
||||
@@ -118,7 +107,6 @@
|
||||
"Display name": "顯示名稱",
|
||||
"Developer": "開發者",
|
||||
"Details": "詳細說明",
|
||||
"Description (optional)": "描述(選擇性)",
|
||||
"Debug log request": "請求偵錯報告",
|
||||
"Debug log": "除錯紀錄",
|
||||
"Create account": "建立帳號",
|
||||
@@ -141,5 +129,13 @@
|
||||
"Another user on this call is having an issue. In order to better diagnose these issues we'd like to collect a debug log.": "這通對話中的另一位使用者遇到了某些問題。為了診斷問題,我們將會建立除錯紀錄。",
|
||||
"Accept microphone permissions to join the call.": "請授權使用您的麥克風以加入通話。",
|
||||
"Accept camera/microphone permissions to join the call.": "請授權使用您的相機/麥克風以加入對話。",
|
||||
"<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>": "<0>何不設定密碼以保留此帳號?</0><1>您可以保留暱稱並設定頭像,以便未來通話時使用</1>"
|
||||
"<0>Why not finish by setting up a password to keep your account?</0><1>You'll be able to keep your name and set an avatar for use on future calls</1>": "<0>何不設定密碼以保留此帳號?</0><1>您可以保留暱稱並設定頭像,以便未來通話時使用</1>",
|
||||
"By participating in this beta, you consent to the collection of anonymous data, which we use to improve the product. You can find more information about which data we track in our <2>Privacy Policy</2> and our <5>Cookie Policy</5>.": "參與此測試版即表示您同意蒐集匿名資料,我們使用這些資料來改進產品。您可以在我們的<2>隱私政策</2>與我們的 <5>Cookie 政策</5> 中找到關於我們追蹤哪些資料的更多資訊。",
|
||||
"<0></0><1></1>You may withdraw consent by unchecking this box. If you are currently in a call, this setting will take effect at the end of the call.": "<0></0><1></1>您可以透過取消核取此方塊來撤回同意。若您目前正在通話中,此設定將在通話結束時生效。",
|
||||
"Your feedback": "您的回饋",
|
||||
"Thanks, we received your feedback!": "感謝,我們已經收到您的回饋了!",
|
||||
"Submitting…": "正在遞交……",
|
||||
"Submit": "遞交",
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below.": "若您遇到問題或只是想提供一些回饋,請在下方傳送簡短說明給我們。",
|
||||
"Feedback": "回饋"
|
||||
}
|
||||
|
||||
15
scripts/reformat-release-notes.py
Executable file
15
scripts/reformat-release-notes.py
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# This script can be used to reformat the release notes generated by
|
||||
# GitHub releases into a format slightly more appropriate for our
|
||||
# project (ie. we don't really need to mention the author of every PR)
|
||||
#
|
||||
# eg. in: * OpenTelemetry by @dbkr in https://github.com/vector-im/element-call/pull/961
|
||||
# out: * OpenTelemetry (https://github.com/vector-im/element-call/pull/961)
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
for line in sys.stdin:
|
||||
matches = re.match(r'^\* (.*) by (\S+) in (\S+)$', line.strip())
|
||||
print("* %s (%s)" % (matches[1], matches[3]))
|
||||
57
src/App.tsx
57
src/App.tsx
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2021 New Vector Ltd
|
||||
Copyright 2021 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -30,6 +30,7 @@ import { SequenceDiagramViewerPage } from "./SequenceDiagramViewerPage";
|
||||
import { InspectorContextProvider } from "./room/GroupCallInspector";
|
||||
import { CrashView, LoadingView } from "./FullScreenView";
|
||||
import { Initializer } from "./initializer";
|
||||
import { MediaHandlerProvider } from "./settings/useMediaHandler";
|
||||
|
||||
const SentryRoute = Sentry.withSentryRouting(Route);
|
||||
|
||||
@@ -55,32 +56,34 @@ export default function App({ history }: AppProps) {
|
||||
{loaded ? (
|
||||
<Suspense fallback={null}>
|
||||
<ClientProvider>
|
||||
<InspectorContextProvider>
|
||||
<Sentry.ErrorBoundary fallback={errorPage}>
|
||||
<OverlayProvider>
|
||||
<Switch>
|
||||
<SentryRoute exact path="/">
|
||||
<HomePage />
|
||||
</SentryRoute>
|
||||
<SentryRoute exact path="/login">
|
||||
<LoginPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute exact path="/register">
|
||||
<RegisterPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="/room/:roomId?">
|
||||
<RoomPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="/inspector">
|
||||
<SequenceDiagramViewerPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="*">
|
||||
<RoomRedirect />
|
||||
</SentryRoute>
|
||||
</Switch>
|
||||
</OverlayProvider>
|
||||
</Sentry.ErrorBoundary>
|
||||
</InspectorContextProvider>
|
||||
<MediaHandlerProvider>
|
||||
<InspectorContextProvider>
|
||||
<Sentry.ErrorBoundary fallback={errorPage}>
|
||||
<OverlayProvider>
|
||||
<Switch>
|
||||
<SentryRoute exact path="/">
|
||||
<HomePage />
|
||||
</SentryRoute>
|
||||
<SentryRoute exact path="/login">
|
||||
<LoginPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute exact path="/register">
|
||||
<RegisterPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="/room/:roomId?">
|
||||
<RoomPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="/inspector">
|
||||
<SequenceDiagramViewerPage />
|
||||
</SentryRoute>
|
||||
<SentryRoute path="*">
|
||||
<RoomRedirect />
|
||||
</SentryRoute>
|
||||
</Switch>
|
||||
</OverlayProvider>
|
||||
</Sentry.ErrorBoundary>
|
||||
</InspectorContextProvider>
|
||||
</MediaHandlerProvider>
|
||||
</ClientProvider>
|
||||
</Suspense>
|
||||
) : (
|
||||
|
||||
@@ -342,6 +342,9 @@ export const ClientProvider: FC<Props> = ({ children }) => {
|
||||
useEffect(() => {
|
||||
window.matrixclient = client;
|
||||
window.isPasswordlessUser = isPasswordlessUser;
|
||||
|
||||
if (PosthogAnalytics.hasInstance())
|
||||
PosthogAnalytics.instance.onLoginStatusChanged();
|
||||
}, [client, isPasswordlessUser]);
|
||||
|
||||
if (error) {
|
||||
|
||||
@@ -134,7 +134,9 @@ export function RoomHeaderInfo({ roomName, avatarUrl }: RoomHeaderInfo) {
|
||||
/>
|
||||
<VideoIcon width={16} height={16} />
|
||||
</div>
|
||||
<Subtitle fontWeight="semiBold">{roomName}</Subtitle>
|
||||
<Subtitle data-testid="roomHeader_roomName" fontWeight="semiBold">
|
||||
{roomName}
|
||||
</Subtitle>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ limitations under the License.
|
||||
.modalHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 34px 34px 0 34px;
|
||||
padding: 34px 32px 0 32px;
|
||||
}
|
||||
|
||||
.modalHeader h3 {
|
||||
@@ -72,7 +72,7 @@ limitations under the License.
|
||||
.modalHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 24px 24px 0 24px;
|
||||
padding: 32px 20px 0 20px;
|
||||
}
|
||||
|
||||
.modal.mobileFullScreen {
|
||||
|
||||
@@ -92,6 +92,7 @@ export function Modal({
|
||||
{...closeButtonProps}
|
||||
ref={closeButtonRef}
|
||||
className={styles.closeButton}
|
||||
data-testid="modal_close"
|
||||
title={t("Close")}
|
||||
>
|
||||
<CloseIcon />
|
||||
|
||||
@@ -79,6 +79,11 @@ export interface UrlParams {
|
||||
* The Posthog analytics ID. It is only available if the user has given consent for sharing telemetry in element web.
|
||||
*/
|
||||
analyticsID: string | null;
|
||||
/**
|
||||
* Whether the app is allowed to use fallback STUN servers for ICE in case the
|
||||
* user's homeserver doesn't provide any.
|
||||
*/
|
||||
allowIceFallback: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,6 +140,7 @@ export const getUrlParams = (
|
||||
fonts: getAllParams("font"),
|
||||
fontScale: Number.isNaN(fontScale) ? null : fontScale,
|
||||
analyticsID: getParam("analyticsID"),
|
||||
allowIceFallback: hasParam("allowIceFallback"),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -25,6 +25,7 @@ import { Menu } from "./Menu";
|
||||
import { TooltipTrigger } from "./Tooltip";
|
||||
import { Avatar, Size } from "./Avatar";
|
||||
import { ReactComponent as UserIcon } from "./icons/User.svg";
|
||||
import { ReactComponent as SettingsIcon } from "./icons/Settings.svg";
|
||||
import { ReactComponent as LoginIcon } from "./icons/Login.svg";
|
||||
import { ReactComponent as LogoutIcon } from "./icons/Logout.svg";
|
||||
import { Body } from "./typography/Typography";
|
||||
@@ -58,6 +59,12 @@ export function UserMenu({
|
||||
key: "user",
|
||||
icon: UserIcon,
|
||||
label: displayName,
|
||||
dataTestid: "usermenu_user",
|
||||
});
|
||||
arr.push({
|
||||
key: "settings",
|
||||
icon: SettingsIcon,
|
||||
label: t("Settings"),
|
||||
});
|
||||
|
||||
if (isPasswordlessUser && !preventNavigation) {
|
||||
@@ -65,6 +72,7 @@ export function UserMenu({
|
||||
key: "login",
|
||||
label: t("Sign in"),
|
||||
icon: LoginIcon,
|
||||
dataTestid: "usermenu_login",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -73,6 +81,7 @@ export function UserMenu({
|
||||
key: "logout",
|
||||
label: t("Sign out"),
|
||||
icon: LogoutIcon,
|
||||
dataTestid: "usermenu_logout",
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -93,7 +102,11 @@ export function UserMenu({
|
||||
return (
|
||||
<PopoverMenuTrigger placement="bottom right">
|
||||
<TooltipTrigger tooltip={tooltip} placement="bottom left">
|
||||
<Button variant="icon" className={styles.userButton}>
|
||||
<Button
|
||||
variant="icon"
|
||||
className={styles.userButton}
|
||||
data-testid="usermenu_open"
|
||||
>
|
||||
{isAuthenticated && (!isPasswordlessUser || avatarUrl) ? (
|
||||
<Avatar
|
||||
size={Size.SM}
|
||||
@@ -108,9 +121,14 @@ export function UserMenu({
|
||||
</TooltipTrigger>
|
||||
{(props) => (
|
||||
<Menu {...props} label={t("User menu")} onAction={onAction}>
|
||||
{items.map(({ key, icon: Icon, label }) => (
|
||||
{items.map(({ key, icon: Icon, label, dataTestid }) => (
|
||||
<Item key={key} textValue={label}>
|
||||
<Icon width={24} height={24} className={styles.menuIcon} />
|
||||
<Icon
|
||||
width={24}
|
||||
height={24}
|
||||
className={styles.menuIcon}
|
||||
data-testid={dataTestid}
|
||||
/>
|
||||
<Body overflowEllipsis>{label}</Body>
|
||||
</Item>
|
||||
))}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { useCallback } from "react";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { useHistory, useLocation } from "react-router-dom";
|
||||
|
||||
import { useClient } from "./ClientContext";
|
||||
import { useProfile } from "./profile/useProfile";
|
||||
import { useModalTriggerState } from "./Modal";
|
||||
import { ProfileModal } from "./profile/ProfileModal";
|
||||
import { SettingsModal } from "./settings/SettingsModal";
|
||||
import { UserMenu } from "./UserMenu";
|
||||
|
||||
interface Props {
|
||||
@@ -35,10 +35,17 @@ export function UserMenuContainer({ preventNavigation = false }: Props) {
|
||||
const { displayName, avatarUrl } = useProfile(client);
|
||||
const { modalState, modalProps } = useModalTriggerState();
|
||||
|
||||
const [defaultSettingsTab, setDefaultSettingsTab] = useState<string>();
|
||||
|
||||
const onAction = useCallback(
|
||||
(value: string) => {
|
||||
async (value: string) => {
|
||||
switch (value) {
|
||||
case "user":
|
||||
setDefaultSettingsTab("profile");
|
||||
modalState.open();
|
||||
break;
|
||||
case "settings":
|
||||
setDefaultSettingsTab("audio");
|
||||
modalState.open();
|
||||
break;
|
||||
case "logout":
|
||||
@@ -64,7 +71,13 @@ export function UserMenuContainer({ preventNavigation = false }: Props) {
|
||||
displayName || (userName ? userName.replace("@", "") : undefined)
|
||||
}
|
||||
/>
|
||||
{modalState.isOpen && <ProfileModal client={client} {...modalProps} />}
|
||||
{modalState.isOpen && (
|
||||
<SettingsModal
|
||||
client={client}
|
||||
defaultTab={defaultSettingsTab}
|
||||
{...modalProps}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
14
src/analytics/AnalyticsNotice.tsx
Normal file
14
src/analytics/AnalyticsNotice.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import React, { FC } from "react";
|
||||
import { Trans } from "react-i18next";
|
||||
|
||||
import { Link } from "../typography/Typography";
|
||||
|
||||
export const AnalyticsNotice: FC = () => (
|
||||
<Trans>
|
||||
By participating in this beta, you consent to the collection of anonymous
|
||||
data, which we use to improve the product. You can find more information
|
||||
about which data we track in our{" "}
|
||||
<Link href="https://element.io/privacy">Privacy Policy</Link> and our{" "}
|
||||
<Link href="https://element.io/cookie-policy">Cookie Policy</Link>.
|
||||
</Trans>
|
||||
);
|
||||
@@ -1,20 +0,0 @@
|
||||
import { t } from "i18next";
|
||||
import React from "react";
|
||||
|
||||
import { Link } from "../typography/Typography";
|
||||
|
||||
export const optInDescription: () => JSX.Element = () => {
|
||||
return (
|
||||
<>
|
||||
<>
|
||||
{t(
|
||||
"By ticking this box you consent to the collection of anonymous data, which we use to improve your experience. You can find more information about which data we track in our "
|
||||
)}
|
||||
</>
|
||||
<Link color="primary" href="https://element.io/privacy">
|
||||
<>{t("Privacy Policy")}</>
|
||||
</Link>
|
||||
.
|
||||
</>
|
||||
);
|
||||
};
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
MuteCameraTracker,
|
||||
MuteMicrophoneTracker,
|
||||
UndecryptableToDeviceEventTracker,
|
||||
QualitySurveyEventTracker,
|
||||
} from "./PosthogEvents";
|
||||
import { Config } from "../config/Config";
|
||||
import { getUrlParams } from "../UrlParams";
|
||||
@@ -102,6 +103,10 @@ export class PosthogAnalytics {
|
||||
private platformSuperProperties = {};
|
||||
private registrationType: RegistrationType = RegistrationType.Guest;
|
||||
|
||||
public static hasInstance(): boolean {
|
||||
return Boolean(this.internalInstance);
|
||||
}
|
||||
|
||||
public static get instance(): PosthogAnalytics {
|
||||
if (!this.internalInstance) {
|
||||
this.internalInstance = new PosthogAnalytics(posthog);
|
||||
@@ -227,7 +232,7 @@ export class PosthogAnalytics {
|
||||
.join("");
|
||||
}
|
||||
|
||||
public async identifyUser(analyticsIdGenerator: () => string) {
|
||||
private async identifyUser(analyticsIdGenerator: () => string) {
|
||||
if (this.anonymity == Anonymity.Pseudonymous && this.enabled) {
|
||||
// Check the user's account_data for an analytics ID to use. Storing the ID in account_data allows
|
||||
// different devices to send the same ID.
|
||||
@@ -319,7 +324,12 @@ export class PosthogAnalytics {
|
||||
this.setAnonymity(Anonymity.Disabled);
|
||||
}
|
||||
|
||||
public updateSuperProperties() {
|
||||
public onLoginStatusChanged(): void {
|
||||
const optInAnalytics = getSetting("opt-in-analytics", false);
|
||||
this.updateAnonymityAndIdentifyUser(optInAnalytics);
|
||||
}
|
||||
|
||||
private updateSuperProperties() {
|
||||
// Update super properties in posthog with our platform (app version, platform).
|
||||
// These properties will be subsequently passed in every event.
|
||||
//
|
||||
@@ -339,7 +349,7 @@ export class PosthogAnalytics {
|
||||
return this.eventSignup.getSignupEndTime() > new Date(0);
|
||||
}
|
||||
|
||||
public async updateAnonymityAndIdentifyUser(
|
||||
private async updateAnonymityAndIdentifyUser(
|
||||
pseudonymousOptIn: boolean
|
||||
): Promise<void> {
|
||||
// Update this.anonymity based on the user's analytics opt-in settings
|
||||
@@ -348,6 +358,10 @@ export class PosthogAnalytics {
|
||||
: Anonymity.Disabled;
|
||||
this.setAnonymity(anonymity);
|
||||
|
||||
// We may not yet have a Matrix client at this point, if not, bail. This should get
|
||||
// triggered again by onLoginStatusChanged once we do have a client.
|
||||
if (!window.matrixclient) return;
|
||||
|
||||
if (anonymity === Anonymity.Pseudonymous) {
|
||||
this.setRegistrationType(
|
||||
window.matrixclient.isGuest() || window.isPasswordlessUser
|
||||
@@ -385,7 +399,7 @@ export class PosthogAnalytics {
|
||||
this.capture(eventName, properties, options);
|
||||
}
|
||||
|
||||
public startListeningToSettingsChanges(): void {
|
||||
private startListeningToSettingsChanges(): void {
|
||||
// Listen to account data changes from sync so we can observe changes to relevant flags and update.
|
||||
// This is called -
|
||||
// * On page load, when the account data is first received by sync
|
||||
@@ -418,4 +432,5 @@ export class PosthogAnalytics {
|
||||
public eventMuteMicrophone = new MuteMicrophoneTracker();
|
||||
public eventMuteCamera = new MuteCameraTracker();
|
||||
public eventUndecryptableToDevice = new UndecryptableToDeviceEventTracker();
|
||||
public eventQualitySurvey = new QualitySurveyEventTracker();
|
||||
}
|
||||
|
||||
@@ -163,3 +163,21 @@ export class UndecryptableToDeviceEventTracker {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
interface QualitySurveyEvent {
|
||||
eventName: "QualitySurvey";
|
||||
callId: string;
|
||||
feedbackText: string;
|
||||
stars: number;
|
||||
}
|
||||
|
||||
export class QualitySurveyEventTracker {
|
||||
track(callId: string, feedbackText: string, stars: number) {
|
||||
PosthogAnalytics.instance.trackEvent<QualitySurveyEvent>({
|
||||
eventName: "QualitySurvey",
|
||||
callId,
|
||||
feedbackText,
|
||||
stars,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
163
src/analytics/PosthogSpanProcessor.ts
Normal file
163
src/analytics/PosthogSpanProcessor.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
SpanProcessor,
|
||||
ReadableSpan,
|
||||
Span,
|
||||
} from "@opentelemetry/sdk-trace-base";
|
||||
import { hrTimeToMilliseconds } from "@opentelemetry/core";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { PosthogAnalytics } from "./PosthogAnalytics";
|
||||
|
||||
interface PrevCall {
|
||||
callId: string;
|
||||
hangupTs: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* The maximum time between hanging up and joining the same call that we would
|
||||
* consider a 'rejoin' on the user's part.
|
||||
*/
|
||||
const maxRejoinMs = 2 * 60 * 1000; // 2 minutes
|
||||
|
||||
/**
|
||||
* Span processor that extracts certain metrics from spans to send to PostHog
|
||||
*/
|
||||
export class PosthogSpanProcessor implements SpanProcessor {
|
||||
async forceFlush(): Promise<void> {}
|
||||
|
||||
onStart(span: Span): void {
|
||||
// Hack: Yield to allow attributes to be set before processing
|
||||
Promise.resolve().then(() => {
|
||||
switch (span.name) {
|
||||
case "matrix.groupCallMembership":
|
||||
this.onGroupCallMembershipStart(span);
|
||||
return;
|
||||
case "matrix.groupCallMembership.summaryReport":
|
||||
this.onSummaryReportStart(span);
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onEnd(span: ReadableSpan): void {
|
||||
switch (span.name) {
|
||||
case "matrix.groupCallMembership":
|
||||
this.onGroupCallMembershipEnd(span);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private get prevCall(): PrevCall | null {
|
||||
// This is stored in localStorage so we can remember the previous call
|
||||
// across app restarts
|
||||
const data = localStorage.getItem("matrix-prev-call");
|
||||
if (data === null) return null;
|
||||
|
||||
try {
|
||||
return JSON.parse(data);
|
||||
} catch (e) {
|
||||
logger.warn("Invalid prev call data", data);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private set prevCall(data: PrevCall | null) {
|
||||
localStorage.setItem("matrix-prev-call", JSON.stringify(data));
|
||||
}
|
||||
|
||||
private onGroupCallMembershipStart(span: ReadableSpan): void {
|
||||
const prevCall = this.prevCall;
|
||||
const newCallId = span.attributes["matrix.confId"] as string;
|
||||
|
||||
// If the user joined the same call within a short time frame, log this as a
|
||||
// rejoin. This is interesting as a call quality metric, since rejoins may
|
||||
// indicate that users had to intervene to make the product work.
|
||||
if (prevCall !== null && newCallId === prevCall.callId) {
|
||||
const duration = hrTimeToMilliseconds(span.startTime) - prevCall.hangupTs;
|
||||
if (duration <= maxRejoinMs) {
|
||||
PosthogAnalytics.instance.trackEvent({
|
||||
eventName: "Rejoin",
|
||||
callId: prevCall.callId,
|
||||
rejoinDuration: duration,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private onGroupCallMembershipEnd(span: ReadableSpan): void {
|
||||
this.prevCall = {
|
||||
callId: span.attributes["matrix.confId"] as string,
|
||||
hangupTs: hrTimeToMilliseconds(span.endTime),
|
||||
};
|
||||
}
|
||||
|
||||
private onSummaryReportStart(span: ReadableSpan): void {
|
||||
// Searching for an event like this:
|
||||
// matrix.stats.summary
|
||||
// matrix.stats.summary.percentageReceivedAudioMedia: 0.75
|
||||
// matrix.stats.summary.percentageReceivedMedia: 1
|
||||
// matrix.stats.summary.percentageReceivedVideoMedia: 0.75
|
||||
// matrix.stats.summary.maxJitter: 100
|
||||
// matrix.stats.summary.maxPacketLoss: 20
|
||||
const event = span.events.find((e) => e.name === "matrix.stats.summary");
|
||||
if (event !== undefined) {
|
||||
const attributes = event.attributes;
|
||||
if (attributes) {
|
||||
const mediaReceived = `${attributes["matrix.stats.summary.percentageReceivedMedia"]}`;
|
||||
const videoReceived = `${attributes["matrix.stats.summary.percentageReceivedVideoMedia"]}`;
|
||||
const audioReceived = `${attributes["matrix.stats.summary.percentageReceivedAudioMedia"]}`;
|
||||
const maxJitter = `${attributes["matrix.stats.summary.maxJitter"]}`;
|
||||
const maxPacketLoss = `${attributes["matrix.stats.summary.maxPacketLoss"]}`;
|
||||
const peerConnections = `${attributes["matrix.stats.summary.peerConnections"]}`;
|
||||
const percentageConcealedAudio = `${attributes["matrix.stats.summary.percentageConcealedAudio"]}`;
|
||||
const opponentUsersInCall = `${attributes["matrix.stats.summary.opponentUsersInCall"]}`;
|
||||
const opponentDevicesInCall = `${attributes["matrix.stats.summary.opponentDevicesInCall"]}`;
|
||||
const diffDevicesToPeerConnections = `${attributes["matrix.stats.summary.diffDevicesToPeerConnections"]}`;
|
||||
const ratioPeerConnectionToDevices = `${attributes["matrix.stats.summary.ratioPeerConnectionToDevices"]}`;
|
||||
|
||||
PosthogAnalytics.instance.trackEvent(
|
||||
{
|
||||
eventName: "MediaReceived",
|
||||
callId: span.attributes["matrix.confId"] as string,
|
||||
mediaReceived: mediaReceived,
|
||||
audioReceived: audioReceived,
|
||||
videoReceived: videoReceived,
|
||||
maxJitter: maxJitter,
|
||||
maxPacketLoss: maxPacketLoss,
|
||||
peerConnections: peerConnections,
|
||||
percentageConcealedAudio: percentageConcealedAudio,
|
||||
opponentUsersInCall: opponentUsersInCall,
|
||||
opponentDevicesInCall: opponentDevicesInCall,
|
||||
diffDevicesToPeerConnections: diffDevicesToPeerConnections,
|
||||
ratioPeerConnectionToDevices: ratioPeerConnectionToDevices,
|
||||
},
|
||||
// Send instantly because the window might be closing
|
||||
{ send_instantly: true }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Shutdown the processor.
|
||||
*/
|
||||
shutdown(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
114
src/analytics/RageshakeSpanProcessor.ts
Normal file
114
src/analytics/RageshakeSpanProcessor.ts
Normal file
@@ -0,0 +1,114 @@
|
||||
import { Attributes } from "@opentelemetry/api";
|
||||
import { hrTimeToMicroseconds } from "@opentelemetry/core";
|
||||
import {
|
||||
SpanProcessor,
|
||||
ReadableSpan,
|
||||
Span,
|
||||
} from "@opentelemetry/sdk-trace-base";
|
||||
|
||||
const dumpAttributes = (attr: Attributes) =>
|
||||
Object.entries(attr).map(([key, value]) => ({
|
||||
key,
|
||||
type: typeof value,
|
||||
value,
|
||||
}));
|
||||
|
||||
/**
|
||||
* Exports spans on demand to the Jaeger JSON format, which can be attached to
|
||||
* rageshakes and loaded into analysis tools like Jaeger and Stalk.
|
||||
*/
|
||||
export class RageshakeSpanProcessor implements SpanProcessor {
|
||||
private readonly spans: ReadableSpan[] = [];
|
||||
|
||||
async forceFlush(): Promise<void> {}
|
||||
|
||||
onStart(span: Span): void {
|
||||
this.spans.push(span);
|
||||
}
|
||||
|
||||
onEnd(): void {}
|
||||
|
||||
/**
|
||||
* Dumps the spans collected so far as Jaeger-compatible JSON.
|
||||
*/
|
||||
public dump(): string {
|
||||
const now = Date.now() * 1000; // Jaeger works in microseconds
|
||||
const traces = new Map<string, ReadableSpan[]>();
|
||||
|
||||
// Organize spans by their trace IDs
|
||||
for (const span of this.spans) {
|
||||
const traceId = span.spanContext().traceId;
|
||||
let trace = traces.get(traceId);
|
||||
|
||||
if (trace === undefined) {
|
||||
trace = [];
|
||||
traces.set(traceId, trace);
|
||||
}
|
||||
|
||||
trace.push(span);
|
||||
}
|
||||
|
||||
const processId = "p1";
|
||||
const processes = {
|
||||
[processId]: {
|
||||
serviceName: "element-call",
|
||||
tags: [],
|
||||
},
|
||||
warnings: null,
|
||||
};
|
||||
|
||||
return JSON.stringify({
|
||||
// Honestly not sure what some of these fields mean, I just know that
|
||||
// they're present in Jaeger JSON exports
|
||||
total: 0,
|
||||
limit: 0,
|
||||
offset: 0,
|
||||
errors: null,
|
||||
data: [...traces.entries()].map(([traceId, spans]) => ({
|
||||
traceID: traceId,
|
||||
warnings: null,
|
||||
processes,
|
||||
spans: spans.map((span) => {
|
||||
const ctx = span.spanContext();
|
||||
const startTime = hrTimeToMicroseconds(span.startTime);
|
||||
// If the span has not yet ended, pretend that it ends now
|
||||
const duration =
|
||||
span.duration[0] === -1
|
||||
? now - startTime
|
||||
: hrTimeToMicroseconds(span.duration);
|
||||
|
||||
return {
|
||||
traceID: traceId,
|
||||
spanID: ctx.spanId,
|
||||
operationName: span.name,
|
||||
processID: processId,
|
||||
warnings: null,
|
||||
startTime,
|
||||
duration,
|
||||
references:
|
||||
span.parentSpanId === undefined
|
||||
? []
|
||||
: [
|
||||
{
|
||||
refType: "CHILD_OF",
|
||||
traceID: traceId,
|
||||
spanID: span.parentSpanId,
|
||||
},
|
||||
],
|
||||
tags: dumpAttributes(span.attributes),
|
||||
logs: span.events.map((event) => ({
|
||||
timestamp: hrTimeToMicroseconds(event.time),
|
||||
// The name of the event is in the "event" field, aparently.
|
||||
fields: [
|
||||
...dumpAttributes(event.attributes ?? {}),
|
||||
{ key: "event", type: "string", value: event.name },
|
||||
],
|
||||
})),
|
||||
};
|
||||
}),
|
||||
})),
|
||||
});
|
||||
}
|
||||
|
||||
async shutdown(): Promise<void> {}
|
||||
}
|
||||
@@ -88,6 +88,7 @@ export const LoginPage: FC = () => {
|
||||
autoCapitalize="none"
|
||||
prefix="@"
|
||||
suffix={`:${Config.defaultServerName()}`}
|
||||
data-testid="login_username"
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
@@ -96,6 +97,7 @@ export const LoginPage: FC = () => {
|
||||
ref={passwordRef}
|
||||
placeholder={t("Password")}
|
||||
label={t("Password")}
|
||||
data-testid="login_password"
|
||||
/>
|
||||
</FieldRow>
|
||||
{error && (
|
||||
@@ -104,7 +106,11 @@ export const LoginPage: FC = () => {
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow>
|
||||
<Button type="submit" disabled={loading}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
data-testid="login_login"
|
||||
>
|
||||
{loading ? t("Logging in…") : t("Login")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
|
||||
@@ -166,6 +166,7 @@ export const RegisterPage: FC = () => {
|
||||
autoCapitalize="none"
|
||||
prefix="@"
|
||||
suffix={`:${Config.defaultServerName()}`}
|
||||
data-testid="register_username"
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
@@ -179,6 +180,7 @@ export const RegisterPage: FC = () => {
|
||||
value={password}
|
||||
placeholder={t("Password")}
|
||||
label={t("Password")}
|
||||
data-testid="register_password"
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
@@ -193,6 +195,7 @@ export const RegisterPage: FC = () => {
|
||||
placeholder={t("Confirm password")}
|
||||
label={t("Confirm password")}
|
||||
ref={confirmPasswordRef}
|
||||
data-testid="register_confirm_password"
|
||||
/>
|
||||
</FieldRow>
|
||||
<Caption>
|
||||
@@ -217,7 +220,11 @@ export const RegisterPage: FC = () => {
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow>
|
||||
<Button type="submit" disabled={registering}>
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={registering}
|
||||
data-testid="register_register"
|
||||
>
|
||||
{registering ? t("Registering…") : t("Register")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
|
||||
@@ -39,10 +39,10 @@ limitations under the License.
|
||||
.secondaryHangup,
|
||||
.button,
|
||||
.copyButton {
|
||||
padding: 7px 15px;
|
||||
padding: 8px 20px;
|
||||
border-radius: 8px;
|
||||
font-size: var(--font-size-body);
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.button {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -238,7 +238,7 @@ export function SettingsButton({
|
||||
return (
|
||||
<TooltipTrigger tooltip={tooltip}>
|
||||
<Button variant="toolbar" {...rest}>
|
||||
<SettingsIcon />
|
||||
<SettingsIcon width={20} height={20} />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
);
|
||||
@@ -246,9 +246,11 @@ export function SettingsButton({
|
||||
|
||||
export function InviteButton({
|
||||
className,
|
||||
variant = "toolbar",
|
||||
...rest
|
||||
}: {
|
||||
className?: string;
|
||||
variant?: string;
|
||||
// TODO: add all props for <Button>
|
||||
[index: string]: unknown;
|
||||
}) {
|
||||
@@ -257,7 +259,7 @@ export function InviteButton({
|
||||
|
||||
return (
|
||||
<TooltipTrigger tooltip={tooltip}>
|
||||
<Button variant="toolbar" {...rest}>
|
||||
<Button variant={variant} {...rest}>
|
||||
<AddUserIcon />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
|
||||
@@ -36,6 +36,14 @@ export interface ConfigOptions {
|
||||
submit_url: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the URL to send opentelemetry data to. If unset, opentelemetry will
|
||||
* be disabled.
|
||||
*/
|
||||
opentelemetry?: {
|
||||
collector_url: string;
|
||||
};
|
||||
|
||||
// Describes the default homeserver to use. The same format as Element Web
|
||||
// (without identity servers as we don't use them).
|
||||
default_server_config?: {
|
||||
|
||||
@@ -15,14 +15,14 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import classNames from "classnames";
|
||||
import React, { FormEventHandler, forwardRef } from "react";
|
||||
import React, { FormEventHandler, forwardRef, ReactNode } from "react";
|
||||
|
||||
import styles from "./Form.module.css";
|
||||
|
||||
interface FormProps {
|
||||
className: string;
|
||||
onSubmit: FormEventHandler<HTMLFormElement>;
|
||||
children: JSX.Element[];
|
||||
children: ReactNode[];
|
||||
}
|
||||
|
||||
export const Form = forwardRef<HTMLFormElement, FormProps>(
|
||||
|
||||
@@ -43,7 +43,9 @@ export function JoinExistingCallModal({ onJoin, onClose, ...rest }: Props) {
|
||||
<p>{t("This call already exists, would you like to join?")}</p>
|
||||
<FieldRow rightAlign className={styles.buttons}>
|
||||
<Button onPress={onClose}>{t("No")}</Button>
|
||||
<Button onPress={onJoin}>{t("Yes, join call")}</Button>
|
||||
<Button onPress={onJoin} data-testid="home_joinExistingRoom">
|
||||
{t("Yes, join call")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
@@ -37,3 +37,7 @@ limitations under the License.
|
||||
.recentCallsTitle {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.notice {
|
||||
color: var(--secondary-content);
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ import { CallList } from "./CallList";
|
||||
import { UserMenuContainer } from "../UserMenuContainer";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
import { JoinExistingCallModal } from "./JoinExistingCallModal";
|
||||
import { Title } from "../typography/Typography";
|
||||
import { Caption, Title } from "../typography/Typography";
|
||||
import { Form } from "../form/Form";
|
||||
import { CallType, CallTypeDropdown } from "./CallTypeDropdown";
|
||||
import { useOptInAnalytics } from "../settings/useSetting";
|
||||
import { optInDescription } from "../analytics/AnalyticsOptInDescription";
|
||||
import { AnalyticsNotice } from "../analytics/AnalyticsNotice";
|
||||
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
@@ -54,7 +54,7 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
|
||||
const [callType, setCallType] = useState(CallType.Video);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<Error>();
|
||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||
const [optInAnalytics] = useOptInAnalytics();
|
||||
const history = useHistory();
|
||||
const { t } = useTranslation();
|
||||
const { modalState, modalProps } = useModalTriggerState();
|
||||
@@ -133,6 +133,7 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
|
||||
type="text"
|
||||
required
|
||||
autoComplete="off"
|
||||
data-testid="home_callName"
|
||||
/>
|
||||
|
||||
<Button
|
||||
@@ -140,19 +141,16 @@ export function RegisteredView({ client, isPasswordlessUser }: Props) {
|
||||
size="lg"
|
||||
className={styles.button}
|
||||
disabled={loading}
|
||||
data-testid="home_go"
|
||||
>
|
||||
{loading ? t("Loading…") : t("Go")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
<InputField
|
||||
id="optInAnalytics"
|
||||
type="checkbox"
|
||||
checked={optInAnalytics}
|
||||
description={optInDescription()}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setOptInAnalytics(event.target.checked)
|
||||
}
|
||||
/>
|
||||
{optInAnalytics === null && (
|
||||
<Caption className={styles.notice}>
|
||||
<AnalyticsNotice />
|
||||
</Caption>
|
||||
)}
|
||||
{error && (
|
||||
<FieldRow className={styles.fieldRow}>
|
||||
<ErrorMessage error={error} />
|
||||
|
||||
@@ -45,3 +45,7 @@ limitations under the License.
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.notice {
|
||||
color: var(--secondary-content);
|
||||
}
|
||||
|
||||
@@ -39,15 +39,15 @@ import { CallType, CallTypeDropdown } from "./CallTypeDropdown";
|
||||
import styles from "./UnauthenticatedView.module.css";
|
||||
import commonStyles from "./common.module.css";
|
||||
import { generateRandomName } from "../auth/generateRandomName";
|
||||
import { AnalyticsNotice } from "../analytics/AnalyticsNotice";
|
||||
import { useOptInAnalytics } from "../settings/useSetting";
|
||||
import { optInDescription } from "../analytics/AnalyticsOptInDescription";
|
||||
|
||||
export const UnauthenticatedView: FC = () => {
|
||||
const { setClient } = useClient();
|
||||
const [callType, setCallType] = useState(CallType.Video);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState<Error>();
|
||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||
const [optInAnalytics] = useOptInAnalytics();
|
||||
const [privacyPolicyUrl, recaptchaKey, register] =
|
||||
useInteractiveRegistration();
|
||||
const { execute, reset, recaptchaId } = useRecaptcha(recaptchaKey);
|
||||
@@ -142,6 +142,7 @@ export const UnauthenticatedView: FC = () => {
|
||||
type="text"
|
||||
required
|
||||
autoComplete="off"
|
||||
data-testid="home_callName"
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
@@ -152,19 +153,16 @@ export const UnauthenticatedView: FC = () => {
|
||||
placeholder={t("Display name")}
|
||||
type="text"
|
||||
required
|
||||
data-testid="home_displayName"
|
||||
autoComplete="off"
|
||||
/>
|
||||
</FieldRow>
|
||||
<InputField
|
||||
id="optInAnalytics"
|
||||
type="checkbox"
|
||||
checked={optInAnalytics}
|
||||
description={optInDescription()}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setOptInAnalytics(event.target.checked)
|
||||
}
|
||||
/>
|
||||
<Caption>
|
||||
{optInAnalytics === null && (
|
||||
<Caption className={styles.notice}>
|
||||
<AnalyticsNotice />
|
||||
</Caption>
|
||||
)}
|
||||
<Caption className={styles.notice}>
|
||||
<Trans>
|
||||
By clicking "Go", you agree to our{" "}
|
||||
<Link href={privacyPolicyUrl}>Terms and conditions</Link>
|
||||
@@ -175,7 +173,12 @@ export const UnauthenticatedView: FC = () => {
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<Button type="submit" size="lg" disabled={loading}>
|
||||
<Button
|
||||
type="submit"
|
||||
size="lg"
|
||||
disabled={loading}
|
||||
data-testid="home_go"
|
||||
>
|
||||
{loading ? t("Loading…") : t("Go")}
|
||||
</Button>
|
||||
<div id={recaptchaId} />
|
||||
@@ -183,14 +186,14 @@ export const UnauthenticatedView: FC = () => {
|
||||
</main>
|
||||
<footer className={styles.footer}>
|
||||
<Body className={styles.mobileLoginLink}>
|
||||
<Link color="primary" to="/login">
|
||||
<Link color="primary" to="/login" data-testid="home_login">
|
||||
{t("Login to your account")}
|
||||
</Link>
|
||||
</Body>
|
||||
<Body>
|
||||
<Trans>
|
||||
Not registered yet?{" "}
|
||||
<Link color="primary" to="/register">
|
||||
<Link color="primary" to="/register" data-testid="home_register">
|
||||
Create an account
|
||||
</Link>
|
||||
</Trans>
|
||||
|
||||
3
src/icons/StarSelected.svg
Normal file
3
src/icons/StarSelected.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="28" height="26" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M14 21.0267L22.24 26.0001L20.0533 16.6267L27.3333 10.3201L17.7466 9.50675L14 0.666748L10.2533 9.50675L0.666626 10.3201L7.94663 16.6267L5.75996 26.0001L14 21.0267Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
4
src/icons/StarUnselected.svg
Normal file
4
src/icons/StarUnselected.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="28" height="26" viewBox="0 0 28 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path id="Vector" d="M14 7.50675L15.2933 10.5601L15.92 12.0401L17.52 12.1734L20.8133 12.4534L18.3066 14.6267L17.0933 15.6801L17.4533 17.2534L18.2 20.4667L15.3733 18.7601L14 17.9067L12.6266 18.7334L9.79996 20.4401L10.5466 17.2267L10.9066 15.6534L9.69329 14.6001L7.18663 12.4267L10.48 12.1467L12.08 12.0134L12.7066 10.5334L14 7.50675M14 0.666748L10.2533 9.50675L0.666626 10.3201L7.94663 16.6267L5.75996 26.0001L14 21.0267L22.24 26.0001L20.0533 16.6267L27.3333 10.3201L17.7466 9.50675L14 0.666748Z" fill="white"/>
|
||||
</svg>
|
||||
|
||||
|
After Width: | Height: | Size: 620 B |
@@ -1,4 +1,4 @@
|
||||
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg data-testid="videoTile_muted" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.20333 0.963373C0.474437 0.690007 0.913989 0.690007 1.1851 0.963373L11.5983 11.4633C11.8694 11.7367 11.8694 12.1799 11.5983 12.4533C11.3272 12.7267 10.8876 12.7267 10.6165 12.4533L0.20333 1.95332C-0.0677768 1.67995 -0.0677768 1.23674 0.20333 0.963373Z" fill="white"/>
|
||||
<path d="M0.418261 3.63429C0.226267 3.95219 0.115674 4.32557 0.115674 4.725V9.85832C0.115674 11.0181 1.0481 11.9583 2.19831 11.9583H8.65411L0.447396 3.66596C0.437225 3.65568 0.427513 3.64511 0.418261 3.63429Z" fill="white"/>
|
||||
<path d="M9.95036 4.725V8.33212L4.30219 2.625H7.86772C9.01793 2.625 9.95036 3.5652 9.95036 4.725Z" fill="white"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 892 B After Width: | Height: | Size: 922 B |
@@ -180,10 +180,16 @@ h2 {
|
||||
|
||||
/* Subtitle */
|
||||
h3 {
|
||||
font-weight: 400;
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-subtitle);
|
||||
}
|
||||
|
||||
/* Body Semi Bold */
|
||||
h4 {
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
|
||||
@@ -23,6 +23,7 @@ import * as Sentry from "@sentry/react";
|
||||
|
||||
import { getUrlParams } from "./UrlParams";
|
||||
import { Config } from "./config/Config";
|
||||
import { ElementCallOpenTelemetry } from "./otel/otel";
|
||||
|
||||
enum LoadState {
|
||||
None,
|
||||
@@ -35,6 +36,7 @@ class DependencyLoadStates {
|
||||
// olm: LoadState = LoadState.None;
|
||||
config: LoadState = LoadState.None;
|
||||
sentry: LoadState = LoadState.None;
|
||||
openTelemetry: LoadState = LoadState.None;
|
||||
|
||||
allDepsAreLoaded() {
|
||||
return !Object.values(this).some((s) => s !== LoadState.Loaded);
|
||||
@@ -209,6 +211,15 @@ export class Initializer {
|
||||
this.loadStates.sentry = LoadState.Loaded;
|
||||
}
|
||||
|
||||
// OpenTelemetry (also only after config loaded)
|
||||
if (
|
||||
this.loadStates.openTelemetry === LoadState.None &&
|
||||
this.loadStates.config === LoadState.Loaded
|
||||
) {
|
||||
ElementCallOpenTelemetry.globalInit();
|
||||
this.loadStates.openTelemetry = LoadState.Loaded;
|
||||
}
|
||||
|
||||
if (this.loadStates.allDepsAreLoaded()) {
|
||||
// resolve if there is no dependency that is not loaded
|
||||
resolve();
|
||||
|
||||
@@ -54,4 +54,6 @@ limitations under the License.
|
||||
|
||||
.removeButton {
|
||||
color: var(--accent);
|
||||
font-size: var(--font-size-caption);
|
||||
padding: 6px 0;
|
||||
}
|
||||
|
||||
23
src/input/FeedbackInput.module.css
Normal file
23
src/input/FeedbackInput.module.css
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.feedback textarea {
|
||||
height: 75px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.feedback {
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -72,6 +72,7 @@ interface InputFieldProps {
|
||||
autoCorrect?: string;
|
||||
autoCapitalize?: string;
|
||||
value?: string;
|
||||
defaultValue?: string;
|
||||
placeholder?: string;
|
||||
defaultChecked?: boolean;
|
||||
onChange?: (event: ChangeEvent) => void;
|
||||
|
||||
@@ -22,8 +22,6 @@ limitations under the License.
|
||||
}
|
||||
|
||||
.label {
|
||||
font-weight: 600;
|
||||
font-size: var(--font-size-subtitle);
|
||||
margin-top: 0;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
41
src/input/StarRatingInput.module.css
Normal file
41
src/input/StarRatingInput.module.css
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.starIcon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.starRating {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.inputContainer {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.hideElement {
|
||||
border: 0;
|
||||
clip-path: content-box;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
padding: 0;
|
||||
width: 1px;
|
||||
display: inline-block;
|
||||
}
|
||||
85
src/input/StarRatingInput.tsx
Normal file
85
src/input/StarRatingInput.tsx
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import styles from "./StarRatingInput.module.css";
|
||||
import { ReactComponent as StarSelected } from "../icons/StarSelected.svg";
|
||||
import { ReactComponent as StarUnselected } from "../icons/StarUnselected.svg";
|
||||
|
||||
interface Props {
|
||||
starCount: number;
|
||||
onChange: (stars: number) => void;
|
||||
required?: boolean;
|
||||
}
|
||||
|
||||
export function StarRatingInput({
|
||||
starCount,
|
||||
onChange,
|
||||
required,
|
||||
}: Props): JSX.Element {
|
||||
const [rating, setRating] = useState(0);
|
||||
const [hover, setHover] = useState(0);
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div className={styles.starRating}>
|
||||
{[...Array(starCount)].map((_star, index) => {
|
||||
index += 1;
|
||||
return (
|
||||
<div
|
||||
className={styles.inputContainer}
|
||||
onMouseEnter={() => setHover(index)}
|
||||
onMouseLeave={() => setHover(rating)}
|
||||
key={index}
|
||||
>
|
||||
<input
|
||||
className={styles.hideElement}
|
||||
type="radio"
|
||||
id={"starInput" + String(index)}
|
||||
value={String(index) + "Star"}
|
||||
name="star rating"
|
||||
onChange={(_ev) => {
|
||||
setRating(index);
|
||||
onChange(index);
|
||||
}}
|
||||
required
|
||||
/>
|
||||
<label
|
||||
className={styles.hideElement}
|
||||
id={"starInvisibleLabel" + String(index)}
|
||||
htmlFor={"starInput" + String(index)}
|
||||
>
|
||||
{t("{{count}} stars", {
|
||||
count: index,
|
||||
})}
|
||||
</label>
|
||||
<label
|
||||
className={styles.starIcon}
|
||||
id={"starIcon" + String(index)}
|
||||
htmlFor={"starInput" + String(index)}
|
||||
>
|
||||
{index <= (hover || rating) ? (
|
||||
<StarSelected />
|
||||
) : (
|
||||
<StarUnselected />
|
||||
)}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ export async function findDeviceByName(
|
||||
*
|
||||
* @return The available media devices
|
||||
*/
|
||||
export async function getDevices(): Promise<MediaDeviceInfo[]> {
|
||||
export async function getNamedDevices(): Promise<MediaDeviceInfo[]> {
|
||||
// First get the devices without their labels, to learn what kinds of streams
|
||||
// we can request
|
||||
let devices: MediaDeviceInfo[];
|
||||
|
||||
197
src/otel/OTelCall.ts
Normal file
197
src/otel/OTelCall.ts
Normal file
@@ -0,0 +1,197 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { Span } from "@opentelemetry/api";
|
||||
import { MatrixCall } from "matrix-js-sdk";
|
||||
import { CallEvent } from "matrix-js-sdk/src/webrtc/call";
|
||||
import {
|
||||
TransceiverStats,
|
||||
CallFeedStats,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { ObjectFlattener } from "./ObjectFlattener";
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan";
|
||||
import { OTelCallTransceiverMediaStreamSpan } from "./OTelCallTransceiverMediaStreamSpan";
|
||||
import { OTelCallFeedMediaStreamSpan } from "./OTelCallFeedMediaStreamSpan";
|
||||
|
||||
type StreamId = string;
|
||||
type MID = string;
|
||||
|
||||
/**
|
||||
* Tracks an individual call within a group call, either to a full-mesh peer or a focus
|
||||
*/
|
||||
export class OTelCall {
|
||||
private readonly trackFeedSpan = new Map<
|
||||
StreamId,
|
||||
OTelCallAbstractMediaStreamSpan
|
||||
>();
|
||||
private readonly trackTransceiverSpan = new Map<
|
||||
MID,
|
||||
OTelCallAbstractMediaStreamSpan
|
||||
>();
|
||||
|
||||
constructor(
|
||||
public userId: string,
|
||||
public deviceId: string,
|
||||
public call: MatrixCall,
|
||||
public span: Span
|
||||
) {
|
||||
if (call.peerConn) {
|
||||
this.addCallPeerConnListeners();
|
||||
} else {
|
||||
this.call.once(
|
||||
CallEvent.PeerConnectionCreated,
|
||||
this.addCallPeerConnListeners
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public dispose() {
|
||||
this.call.peerConn.removeEventListener(
|
||||
"connectionstatechange",
|
||||
this.onCallConnectionStateChanged
|
||||
);
|
||||
this.call.peerConn.removeEventListener(
|
||||
"signalingstatechange",
|
||||
this.onCallSignalingStateChanged
|
||||
);
|
||||
this.call.peerConn.removeEventListener(
|
||||
"iceconnectionstatechange",
|
||||
this.onIceConnectionStateChanged
|
||||
);
|
||||
this.call.peerConn.removeEventListener(
|
||||
"icegatheringstatechange",
|
||||
this.onIceGatheringStateChanged
|
||||
);
|
||||
this.call.peerConn.removeEventListener(
|
||||
"icecandidateerror",
|
||||
this.onIceCandidateError
|
||||
);
|
||||
}
|
||||
|
||||
private addCallPeerConnListeners = (): void => {
|
||||
this.call.peerConn.addEventListener(
|
||||
"connectionstatechange",
|
||||
this.onCallConnectionStateChanged
|
||||
);
|
||||
this.call.peerConn.addEventListener(
|
||||
"signalingstatechange",
|
||||
this.onCallSignalingStateChanged
|
||||
);
|
||||
this.call.peerConn.addEventListener(
|
||||
"iceconnectionstatechange",
|
||||
this.onIceConnectionStateChanged
|
||||
);
|
||||
this.call.peerConn.addEventListener(
|
||||
"icegatheringstatechange",
|
||||
this.onIceGatheringStateChanged
|
||||
);
|
||||
this.call.peerConn.addEventListener(
|
||||
"icecandidateerror",
|
||||
this.onIceCandidateError
|
||||
);
|
||||
};
|
||||
|
||||
public onCallConnectionStateChanged = (): void => {
|
||||
this.span.addEvent("matrix.call.callConnectionStateChange", {
|
||||
callConnectionState: this.call.peerConn.connectionState,
|
||||
});
|
||||
};
|
||||
|
||||
public onCallSignalingStateChanged = (): void => {
|
||||
this.span.addEvent("matrix.call.callSignalingStateChange", {
|
||||
callSignalingState: this.call.peerConn.signalingState,
|
||||
});
|
||||
};
|
||||
|
||||
public onIceConnectionStateChanged = (): void => {
|
||||
this.span.addEvent("matrix.call.iceConnectionStateChange", {
|
||||
iceConnectionState: this.call.peerConn.iceConnectionState,
|
||||
});
|
||||
};
|
||||
|
||||
public onIceGatheringStateChanged = (): void => {
|
||||
this.span.addEvent("matrix.call.iceGatheringStateChange", {
|
||||
iceGatheringState: this.call.peerConn.iceGatheringState,
|
||||
});
|
||||
};
|
||||
|
||||
public onIceCandidateError = (ev: Event): void => {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(ev, flatObject, "error.", 0);
|
||||
|
||||
this.span.addEvent("matrix.call.iceCandidateError", flatObject);
|
||||
};
|
||||
|
||||
public onCallFeedStats(callFeeds: CallFeedStats[]): void {
|
||||
let prvFeeds: StreamId[] = [...this.trackFeedSpan.keys()];
|
||||
|
||||
callFeeds.forEach((feed) => {
|
||||
if (!this.trackFeedSpan.has(feed.stream)) {
|
||||
this.trackFeedSpan.set(
|
||||
feed.stream,
|
||||
new OTelCallFeedMediaStreamSpan(
|
||||
ElementCallOpenTelemetry.instance,
|
||||
this.span,
|
||||
feed
|
||||
)
|
||||
);
|
||||
}
|
||||
this.trackFeedSpan.get(feed.stream)?.update(feed);
|
||||
prvFeeds = prvFeeds.filter((prvStreamId) => prvStreamId !== feed.stream);
|
||||
});
|
||||
|
||||
prvFeeds.forEach((prvStreamId) => {
|
||||
this.trackFeedSpan.get(prvStreamId)?.end();
|
||||
this.trackFeedSpan.delete(prvStreamId);
|
||||
});
|
||||
}
|
||||
|
||||
public onTransceiverStats(transceiverStats: TransceiverStats[]): void {
|
||||
let prvTransSpan: MID[] = [...this.trackTransceiverSpan.keys()];
|
||||
|
||||
transceiverStats.forEach((transStats) => {
|
||||
if (!this.trackTransceiverSpan.has(transStats.mid)) {
|
||||
this.trackTransceiverSpan.set(
|
||||
transStats.mid,
|
||||
new OTelCallTransceiverMediaStreamSpan(
|
||||
ElementCallOpenTelemetry.instance,
|
||||
this.span,
|
||||
transStats
|
||||
)
|
||||
);
|
||||
}
|
||||
this.trackTransceiverSpan.get(transStats.mid)?.update(transStats);
|
||||
prvTransSpan = prvTransSpan.filter(
|
||||
(prvStreamId) => prvStreamId !== transStats.mid
|
||||
);
|
||||
});
|
||||
|
||||
prvTransSpan.forEach((prvMID) => {
|
||||
this.trackTransceiverSpan.get(prvMID)?.end();
|
||||
this.trackTransceiverSpan.delete(prvMID);
|
||||
});
|
||||
}
|
||||
|
||||
public end(): void {
|
||||
this.trackFeedSpan.forEach((feedSpan) => feedSpan.end());
|
||||
this.trackTransceiverSpan.forEach((transceiverSpan) =>
|
||||
transceiverSpan.end()
|
||||
);
|
||||
this.span.end();
|
||||
}
|
||||
}
|
||||
62
src/otel/OTelCallAbstractMediaStreamSpan.ts
Normal file
62
src/otel/OTelCallAbstractMediaStreamSpan.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import opentelemetry, { Span } from "@opentelemetry/api";
|
||||
import { TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
import { OTelCallMediaStreamTrackSpan } from "./OTelCallMediaStreamTrackSpan";
|
||||
|
||||
type TrackId = string;
|
||||
|
||||
export abstract class OTelCallAbstractMediaStreamSpan {
|
||||
protected readonly trackSpans = new Map<
|
||||
TrackId,
|
||||
OTelCallMediaStreamTrackSpan
|
||||
>();
|
||||
public readonly span;
|
||||
|
||||
public constructor(
|
||||
readonly oTel: ElementCallOpenTelemetry,
|
||||
readonly callSpan: Span,
|
||||
protected readonly type: string
|
||||
) {
|
||||
const ctx = opentelemetry.trace.setSpan(
|
||||
opentelemetry.context.active(),
|
||||
callSpan
|
||||
);
|
||||
const options = {
|
||||
links: [
|
||||
{
|
||||
context: callSpan.spanContext(),
|
||||
},
|
||||
],
|
||||
};
|
||||
this.span = oTel.tracer.startSpan(this.type, options, ctx);
|
||||
}
|
||||
|
||||
protected upsertTrackSpans(tracks: TrackStats[]) {
|
||||
let prvTracks: TrackId[] = [...this.trackSpans.keys()];
|
||||
tracks.forEach((t) => {
|
||||
if (!this.trackSpans.has(t.id)) {
|
||||
this.trackSpans.set(
|
||||
t.id,
|
||||
new OTelCallMediaStreamTrackSpan(this.oTel, this.span, t)
|
||||
);
|
||||
}
|
||||
this.trackSpans.get(t.id)?.update(t);
|
||||
prvTracks = prvTracks.filter((prvTrackId) => prvTrackId !== t.id);
|
||||
});
|
||||
|
||||
prvTracks.forEach((prvTrackId) => {
|
||||
this.trackSpans.get(prvTrackId)?.end();
|
||||
this.trackSpans.delete(prvTrackId);
|
||||
});
|
||||
}
|
||||
|
||||
public abstract update(data: Object): void;
|
||||
|
||||
public end(): void {
|
||||
this.trackSpans.forEach((tSpan) => {
|
||||
tSpan.end();
|
||||
});
|
||||
this.span.end();
|
||||
}
|
||||
}
|
||||
57
src/otel/OTelCallFeedMediaStreamSpan.ts
Normal file
57
src/otel/OTelCallFeedMediaStreamSpan.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import { Span } from "@opentelemetry/api";
|
||||
import {
|
||||
CallFeedStats,
|
||||
TrackStats,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan";
|
||||
|
||||
export class OTelCallFeedMediaStreamSpan extends OTelCallAbstractMediaStreamSpan {
|
||||
private readonly prev: { isAudioMuted: boolean; isVideoMuted: boolean };
|
||||
|
||||
constructor(
|
||||
readonly oTel: ElementCallOpenTelemetry,
|
||||
readonly callSpan: Span,
|
||||
callFeed: CallFeedStats
|
||||
) {
|
||||
const postFix =
|
||||
callFeed.type === "local" && callFeed.prefix === "from-call-feed"
|
||||
? "(clone)"
|
||||
: "";
|
||||
super(oTel, callSpan, `matrix.call.feed.${callFeed.type}${postFix}`);
|
||||
this.span.setAttribute("feed.streamId", callFeed.stream);
|
||||
this.span.setAttribute("feed.type", callFeed.type);
|
||||
this.span.setAttribute("feed.readFrom", callFeed.prefix);
|
||||
this.span.setAttribute("feed.purpose", callFeed.purpose);
|
||||
this.prev = {
|
||||
isAudioMuted: callFeed.isAudioMuted,
|
||||
isVideoMuted: callFeed.isVideoMuted,
|
||||
};
|
||||
this.span.addEvent("matrix.call.feed.initState", this.prev);
|
||||
}
|
||||
|
||||
public update(callFeed: CallFeedStats): void {
|
||||
if (this.prev.isAudioMuted !== callFeed.isAudioMuted) {
|
||||
this.span.addEvent("matrix.call.feed.audioMuted", {
|
||||
isAudioMuted: callFeed.isAudioMuted,
|
||||
});
|
||||
this.prev.isAudioMuted = callFeed.isAudioMuted;
|
||||
}
|
||||
if (this.prev.isVideoMuted !== callFeed.isVideoMuted) {
|
||||
this.span.addEvent("matrix.call.feed.isVideoMuted", {
|
||||
isVideoMuted: callFeed.isVideoMuted,
|
||||
});
|
||||
this.prev.isVideoMuted = callFeed.isVideoMuted;
|
||||
}
|
||||
|
||||
const trackStats: TrackStats[] = [];
|
||||
if (callFeed.video) {
|
||||
trackStats.push(callFeed.video);
|
||||
}
|
||||
if (callFeed.audio) {
|
||||
trackStats.push(callFeed.audio);
|
||||
}
|
||||
this.upsertTrackSpans(trackStats);
|
||||
}
|
||||
}
|
||||
62
src/otel/OTelCallMediaStreamTrackSpan.ts
Normal file
62
src/otel/OTelCallMediaStreamTrackSpan.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
import { TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
import opentelemetry, { Span } from "@opentelemetry/api";
|
||||
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
|
||||
export class OTelCallMediaStreamTrackSpan {
|
||||
private readonly span: Span;
|
||||
private prev: TrackStats;
|
||||
|
||||
public constructor(
|
||||
readonly oTel: ElementCallOpenTelemetry,
|
||||
readonly streamSpan: Span,
|
||||
data: TrackStats
|
||||
) {
|
||||
const ctx = opentelemetry.trace.setSpan(
|
||||
opentelemetry.context.active(),
|
||||
streamSpan
|
||||
);
|
||||
const options = {
|
||||
links: [
|
||||
{
|
||||
context: streamSpan.spanContext(),
|
||||
},
|
||||
],
|
||||
};
|
||||
const type = `matrix.call.track.${data.label}.${data.kind}`;
|
||||
this.span = oTel.tracer.startSpan(type, options, ctx);
|
||||
this.span.setAttribute("track.trackId", data.id);
|
||||
this.span.setAttribute("track.kind", data.kind);
|
||||
this.span.setAttribute("track.constrainDeviceId", data.constrainDeviceId);
|
||||
this.span.setAttribute("track.settingDeviceId", data.settingDeviceId);
|
||||
this.span.setAttribute("track.label", data.label);
|
||||
|
||||
this.span.addEvent("matrix.call.track.initState", {
|
||||
readyState: data.readyState,
|
||||
muted: data.muted,
|
||||
enabled: data.enabled,
|
||||
});
|
||||
this.prev = data;
|
||||
}
|
||||
|
||||
public update(data: TrackStats): void {
|
||||
if (this.prev.muted !== data.muted) {
|
||||
this.span.addEvent("matrix.call.track.muted", { muted: data.muted });
|
||||
}
|
||||
if (this.prev.enabled !== data.enabled) {
|
||||
this.span.addEvent("matrix.call.track.enabled", {
|
||||
enabled: data.enabled,
|
||||
});
|
||||
}
|
||||
if (this.prev.readyState !== data.readyState) {
|
||||
this.span.addEvent("matrix.call.track.readyState", {
|
||||
readyState: data.readyState,
|
||||
});
|
||||
}
|
||||
this.prev = data;
|
||||
}
|
||||
|
||||
public end(): void {
|
||||
this.span.end();
|
||||
}
|
||||
}
|
||||
54
src/otel/OTelCallTransceiverMediaStreamSpan.ts
Normal file
54
src/otel/OTelCallTransceiverMediaStreamSpan.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import { Span } from "@opentelemetry/api";
|
||||
import {
|
||||
TrackStats,
|
||||
TransceiverStats,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan";
|
||||
|
||||
export class OTelCallTransceiverMediaStreamSpan extends OTelCallAbstractMediaStreamSpan {
|
||||
private readonly prev: {
|
||||
direction: string;
|
||||
currentDirection: string;
|
||||
};
|
||||
|
||||
constructor(
|
||||
readonly oTel: ElementCallOpenTelemetry,
|
||||
readonly callSpan: Span,
|
||||
stats: TransceiverStats
|
||||
) {
|
||||
super(oTel, callSpan, `matrix.call.transceiver.${stats.mid}`);
|
||||
this.span.setAttribute("transceiver.mid", stats.mid);
|
||||
|
||||
this.prev = {
|
||||
direction: stats.direction,
|
||||
currentDirection: stats.currentDirection,
|
||||
};
|
||||
this.span.addEvent("matrix.call.transceiver.initState", this.prev);
|
||||
}
|
||||
|
||||
public update(stats: TransceiverStats): void {
|
||||
if (this.prev.currentDirection !== stats.currentDirection) {
|
||||
this.span.addEvent("matrix.call.transceiver.currentDirection", {
|
||||
currentDirection: stats.currentDirection,
|
||||
});
|
||||
this.prev.currentDirection = stats.currentDirection;
|
||||
}
|
||||
if (this.prev.direction !== stats.direction) {
|
||||
this.span.addEvent("matrix.call.transceiver.direction", {
|
||||
direction: stats.direction,
|
||||
});
|
||||
this.prev.direction = stats.direction;
|
||||
}
|
||||
|
||||
const trackStats: TrackStats[] = [];
|
||||
if (stats.sender) {
|
||||
trackStats.push(stats.sender);
|
||||
}
|
||||
if (stats.receiver) {
|
||||
trackStats.push(stats.receiver);
|
||||
}
|
||||
this.upsertTrackSpans(trackStats);
|
||||
}
|
||||
}
|
||||
474
src/otel/OTelGroupCallMembership.ts
Normal file
474
src/otel/OTelGroupCallMembership.ts
Normal file
@@ -0,0 +1,474 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import opentelemetry, { Span, Attributes, Context } from "@opentelemetry/api";
|
||||
import {
|
||||
GroupCall,
|
||||
MatrixClient,
|
||||
MatrixEvent,
|
||||
RoomMember,
|
||||
} from "matrix-js-sdk";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import {
|
||||
CallError,
|
||||
CallState,
|
||||
MatrixCall,
|
||||
VoipEvent,
|
||||
} from "matrix-js-sdk/src/webrtc/call";
|
||||
import {
|
||||
CallsByUserAndDevice,
|
||||
GroupCallError,
|
||||
GroupCallEvent,
|
||||
GroupCallStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import {
|
||||
ConnectionStatsReport,
|
||||
ByteSentStatsReport,
|
||||
SummaryStatsReport,
|
||||
CallFeedReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
import { setSpan } from "@opentelemetry/api/build/esm/trace/context-utils";
|
||||
|
||||
import { ElementCallOpenTelemetry } from "./otel";
|
||||
import { ObjectFlattener } from "./ObjectFlattener";
|
||||
import { OTelCall } from "./OTelCall";
|
||||
|
||||
/**
|
||||
* Represent the span of time which we intend to be joined to a group call
|
||||
*/
|
||||
export class OTelGroupCallMembership {
|
||||
private callMembershipSpan?: Span;
|
||||
private groupCallContext?: Context;
|
||||
private myUserId = "unknown";
|
||||
private myDeviceId: string;
|
||||
private myMember?: RoomMember;
|
||||
private callsByCallId = new Map<string, OTelCall>();
|
||||
private statsReportSpan: {
|
||||
span: Span | undefined;
|
||||
stats: OTelStatsReportEvent[];
|
||||
};
|
||||
private readonly speakingSpans = new Map<RoomMember, Map<string, Span>>();
|
||||
|
||||
constructor(private groupCall: GroupCall, client: MatrixClient) {
|
||||
const clientId = client.getUserId();
|
||||
if (clientId) {
|
||||
this.myUserId = clientId;
|
||||
const myMember = groupCall.room.getMember(clientId);
|
||||
if (myMember) {
|
||||
this.myMember = myMember;
|
||||
}
|
||||
}
|
||||
this.myDeviceId = client.getDeviceId() || "unknown";
|
||||
this.statsReportSpan = { span: undefined, stats: [] };
|
||||
this.groupCall.on(GroupCallEvent.CallsChanged, this.onCallsChanged);
|
||||
}
|
||||
|
||||
dispose() {
|
||||
this.groupCall.removeListener(
|
||||
GroupCallEvent.CallsChanged,
|
||||
this.onCallsChanged
|
||||
);
|
||||
}
|
||||
|
||||
public onJoinCall() {
|
||||
if (!ElementCallOpenTelemetry.instance) return;
|
||||
if (this.callMembershipSpan !== undefined) {
|
||||
logger.warn("Call membership span is already started");
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the main span that tracks the time we intend to be in the call
|
||||
this.callMembershipSpan =
|
||||
ElementCallOpenTelemetry.instance.tracer.startSpan(
|
||||
"matrix.groupCallMembership"
|
||||
);
|
||||
this.callMembershipSpan.setAttribute(
|
||||
"matrix.confId",
|
||||
this.groupCall.groupCallId
|
||||
);
|
||||
this.callMembershipSpan.setAttribute("matrix.userId", this.myUserId);
|
||||
this.callMembershipSpan.setAttribute("matrix.deviceId", this.myDeviceId);
|
||||
this.callMembershipSpan.setAttribute(
|
||||
"matrix.displayName",
|
||||
this.myMember ? this.myMember.name : "unknown-name"
|
||||
);
|
||||
|
||||
this.groupCallContext = opentelemetry.trace.setSpan(
|
||||
opentelemetry.context.active(),
|
||||
this.callMembershipSpan
|
||||
);
|
||||
|
||||
this.callMembershipSpan?.addEvent("matrix.joinCall");
|
||||
}
|
||||
|
||||
public onLeaveCall() {
|
||||
if (this.callMembershipSpan === undefined) {
|
||||
logger.warn("Call membership span is already ended");
|
||||
return;
|
||||
}
|
||||
|
||||
this.callMembershipSpan.addEvent("matrix.leaveCall");
|
||||
// and end the span to indicate we've left
|
||||
this.callMembershipSpan.end();
|
||||
this.callMembershipSpan = undefined;
|
||||
this.groupCallContext = undefined;
|
||||
}
|
||||
|
||||
public onUpdateRoomState(event: MatrixEvent) {
|
||||
if (
|
||||
!event ||
|
||||
(!event.getType().startsWith("m.call") &&
|
||||
!event.getType().startsWith("org.matrix.msc3401.call"))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.callMembershipSpan?.addEvent(
|
||||
`matrix.roomStateEvent_${event.getType()}`,
|
||||
ObjectFlattener.flattenVoipEvent(event.getContent())
|
||||
);
|
||||
}
|
||||
|
||||
public onCallsChanged = (calls: CallsByUserAndDevice) => {
|
||||
for (const [userId, userCalls] of calls.entries()) {
|
||||
for (const [deviceId, call] of userCalls.entries()) {
|
||||
if (!this.callsByCallId.has(call.callId)) {
|
||||
if (ElementCallOpenTelemetry.instance) {
|
||||
const span = ElementCallOpenTelemetry.instance.tracer.startSpan(
|
||||
`matrix.call`,
|
||||
undefined,
|
||||
this.groupCallContext
|
||||
);
|
||||
// XXX: anonymity
|
||||
span.setAttribute("matrix.call.target.userId", userId);
|
||||
span.setAttribute("matrix.call.target.deviceId", deviceId);
|
||||
const displayName =
|
||||
this.groupCall.room.getMember(userId)?.name ?? "unknown";
|
||||
span.setAttribute("matrix.call.target.displayName", displayName);
|
||||
this.callsByCallId.set(
|
||||
call.callId,
|
||||
new OTelCall(userId, deviceId, call, span)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const callTrackingInfo of this.callsByCallId.values()) {
|
||||
const userCalls = calls.get(callTrackingInfo.userId);
|
||||
if (
|
||||
!userCalls ||
|
||||
!userCalls.has(callTrackingInfo.deviceId) ||
|
||||
userCalls.get(callTrackingInfo.deviceId).callId !==
|
||||
callTrackingInfo.call.callId
|
||||
) {
|
||||
callTrackingInfo.end();
|
||||
this.callsByCallId.delete(callTrackingInfo.call.callId);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public onCallStateChange(call: MatrixCall, newState: CallState) {
|
||||
const callTrackingInfo = this.callsByCallId.get(call.callId);
|
||||
if (!callTrackingInfo) {
|
||||
logger.error(`Got call state change for unknown call ID ${call.callId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
callTrackingInfo.span.addEvent("matrix.call.stateChange", {
|
||||
state: newState,
|
||||
});
|
||||
}
|
||||
|
||||
public onSendEvent(call: MatrixCall, event: VoipEvent) {
|
||||
const eventType = event.eventType as string;
|
||||
if (
|
||||
!eventType.startsWith("m.call") &&
|
||||
!eventType.startsWith("org.matrix.call")
|
||||
)
|
||||
return;
|
||||
|
||||
const callTrackingInfo = this.callsByCallId.get(call.callId);
|
||||
if (!callTrackingInfo) {
|
||||
logger.error(`Got call send event for unknown call ID ${call.callId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.type === "toDevice") {
|
||||
callTrackingInfo.span.addEvent(
|
||||
`matrix.sendToDeviceEvent_${event.eventType}`,
|
||||
ObjectFlattener.flattenVoipEvent(event)
|
||||
);
|
||||
} else if (event.type === "sendEvent") {
|
||||
callTrackingInfo.span.addEvent(
|
||||
`matrix.sendToRoomEvent_${event.eventType}`,
|
||||
ObjectFlattener.flattenVoipEvent(event)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public onReceivedVoipEvent(event: MatrixEvent) {
|
||||
// These come straight from CallEventHandler so don't have
|
||||
// a call already associated (in principle we could receive
|
||||
// events for calls we don't know about).
|
||||
const callId = event.getContent().call_id;
|
||||
if (!callId) {
|
||||
this.callMembershipSpan?.addEvent("matrix.receive_voip_event_no_callid", {
|
||||
"sender.userId": event.getSender(),
|
||||
});
|
||||
logger.error("Received call event with no call ID!");
|
||||
return;
|
||||
}
|
||||
|
||||
const call = this.callsByCallId.get(callId);
|
||||
if (!call) {
|
||||
this.callMembershipSpan?.addEvent(
|
||||
"matrix.receive_voip_event_unknown_callid",
|
||||
{
|
||||
"sender.userId": event.getSender(),
|
||||
}
|
||||
);
|
||||
logger.error("Received call event for unknown call ID " + callId);
|
||||
return;
|
||||
}
|
||||
|
||||
call.span.addEvent("matrix.receive_voip_event", {
|
||||
"sender.userId": event.getSender(),
|
||||
...ObjectFlattener.flattenVoipEvent(event.getContent()),
|
||||
});
|
||||
}
|
||||
|
||||
public onToggleMicrophoneMuted(newValue: boolean) {
|
||||
this.callMembershipSpan?.addEvent("matrix.toggleMicMuted", {
|
||||
"matrix.microphone.muted": newValue,
|
||||
});
|
||||
}
|
||||
|
||||
public onSetMicrophoneMuted(setMuted: boolean) {
|
||||
this.callMembershipSpan?.addEvent("matrix.setMicMuted", {
|
||||
"matrix.microphone.muted": setMuted,
|
||||
});
|
||||
}
|
||||
|
||||
public onToggleLocalVideoMuted(newValue: boolean) {
|
||||
this.callMembershipSpan?.addEvent("matrix.toggleVidMuted", {
|
||||
"matrix.video.muted": newValue,
|
||||
});
|
||||
}
|
||||
|
||||
public onSetLocalVideoMuted(setMuted: boolean) {
|
||||
this.callMembershipSpan?.addEvent("matrix.setVidMuted", {
|
||||
"matrix.video.muted": setMuted,
|
||||
});
|
||||
}
|
||||
|
||||
public onToggleScreensharing(newValue: boolean) {
|
||||
this.callMembershipSpan?.addEvent("matrix.setVidMuted", {
|
||||
"matrix.screensharing.enabled": newValue,
|
||||
});
|
||||
}
|
||||
|
||||
public onSpeaking(member: RoomMember, deviceId: string, speaking: boolean) {
|
||||
if (speaking) {
|
||||
// Ensure that there's an audio activity span for this speaker
|
||||
let deviceMap = this.speakingSpans.get(member);
|
||||
if (deviceMap === undefined) {
|
||||
deviceMap = new Map();
|
||||
this.speakingSpans.set(member, deviceMap);
|
||||
}
|
||||
|
||||
if (!deviceMap.has(deviceId)) {
|
||||
const span = ElementCallOpenTelemetry.instance.tracer.startSpan(
|
||||
"matrix.audioActivity",
|
||||
undefined,
|
||||
this.groupCallContext
|
||||
);
|
||||
span.setAttribute("matrix.userId", member.userId);
|
||||
span.setAttribute("matrix.displayName", member.rawDisplayName);
|
||||
|
||||
deviceMap.set(deviceId, span);
|
||||
}
|
||||
} else {
|
||||
// End the audio activity span for this speaker, if any
|
||||
const deviceMap = this.speakingSpans.get(member);
|
||||
deviceMap?.get(deviceId)?.end();
|
||||
deviceMap?.delete(deviceId);
|
||||
|
||||
if (deviceMap?.size === 0) this.speakingSpans.delete(member);
|
||||
}
|
||||
}
|
||||
|
||||
public onCallError(error: CallError, call: MatrixCall) {
|
||||
const callTrackingInfo = this.callsByCallId.get(call.callId);
|
||||
if (!callTrackingInfo) {
|
||||
logger.error(`Got error for unknown call ID ${call.callId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
callTrackingInfo.span.recordException(error);
|
||||
}
|
||||
|
||||
public onGroupCallError(error: GroupCallError) {
|
||||
this.callMembershipSpan?.recordException(error);
|
||||
}
|
||||
|
||||
public onUndecryptableToDevice(event: MatrixEvent) {
|
||||
this.callMembershipSpan?.addEvent("matrix.toDevice.undecryptable", {
|
||||
"sender.userId": event.getSender(),
|
||||
});
|
||||
}
|
||||
|
||||
public onCallFeedStatsReport(report: GroupCallStatsReport<CallFeedReport>) {
|
||||
if (!ElementCallOpenTelemetry.instance) return;
|
||||
let call: OTelCall | undefined;
|
||||
const callId = report.report?.callId;
|
||||
|
||||
if (callId) {
|
||||
call = this.callsByCallId.get(callId);
|
||||
}
|
||||
|
||||
if (!call) {
|
||||
this.callMembershipSpan?.addEvent(
|
||||
OTelStatsReportType.CallFeedReport + "_unknown_callId",
|
||||
{
|
||||
"call.callId": callId,
|
||||
"call.opponentMemberId": report.report?.opponentMemberId
|
||||
? report.report?.opponentMemberId
|
||||
: "unknown",
|
||||
}
|
||||
);
|
||||
logger.error(
|
||||
`Received ${OTelStatsReportType.CallFeedReport} with unknown call ID: ${callId}`
|
||||
);
|
||||
return;
|
||||
} else {
|
||||
call.onCallFeedStats(report.report.callFeeds);
|
||||
call.onTransceiverStats(report.report.transceiver);
|
||||
}
|
||||
}
|
||||
|
||||
public onConnectionStatsReport(
|
||||
statsReport: GroupCallStatsReport<ConnectionStatsReport>
|
||||
) {
|
||||
this.buildCallStatsSpan(
|
||||
OTelStatsReportType.ConnectionReport,
|
||||
statsReport.report
|
||||
);
|
||||
}
|
||||
|
||||
public onByteSentStatsReport(
|
||||
statsReport: GroupCallStatsReport<ByteSentStatsReport>
|
||||
) {
|
||||
this.buildCallStatsSpan(
|
||||
OTelStatsReportType.ByteSentReport,
|
||||
statsReport.report
|
||||
);
|
||||
}
|
||||
|
||||
public buildCallStatsSpan(
|
||||
type: OTelStatsReportType,
|
||||
report: ByteSentStatsReport | ConnectionStatsReport
|
||||
): void {
|
||||
if (!ElementCallOpenTelemetry.instance) return;
|
||||
let call: OTelCall | undefined;
|
||||
const callId = report?.callId;
|
||||
|
||||
if (callId) {
|
||||
call = this.callsByCallId.get(callId);
|
||||
}
|
||||
|
||||
if (!call) {
|
||||
this.callMembershipSpan?.addEvent(type + "_unknown_callid", {
|
||||
"call.callId": callId,
|
||||
"call.opponentMemberId": report.opponentMemberId
|
||||
? report.opponentMemberId
|
||||
: "unknown",
|
||||
});
|
||||
logger.error(`Received ${type} with unknown call ID: ${callId}`);
|
||||
return;
|
||||
}
|
||||
const data = ObjectFlattener.flattenReportObject(type, report);
|
||||
const ctx = opentelemetry.trace.setSpan(
|
||||
opentelemetry.context.active(),
|
||||
call.span
|
||||
);
|
||||
|
||||
const options = {
|
||||
links: [
|
||||
{
|
||||
context: call.span.spanContext(),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
const span = ElementCallOpenTelemetry.instance.tracer.startSpan(
|
||||
type,
|
||||
options,
|
||||
ctx
|
||||
);
|
||||
|
||||
span.setAttribute("matrix.callId", callId);
|
||||
span.setAttribute(
|
||||
"matrix.opponentMemberId",
|
||||
report.opponentMemberId ? report.opponentMemberId : "unknown"
|
||||
);
|
||||
span.addEvent("matrix.call.connection_stats_event", data);
|
||||
span.end();
|
||||
}
|
||||
|
||||
public onSummaryStatsReport(
|
||||
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
||||
) {
|
||||
if (!ElementCallOpenTelemetry.instance) return;
|
||||
|
||||
const type = OTelStatsReportType.SummaryReport;
|
||||
const data = ObjectFlattener.flattenSummaryStatsReportObject(statsReport);
|
||||
if (this.statsReportSpan.span === undefined && this.callMembershipSpan) {
|
||||
const ctx = setSpan(
|
||||
opentelemetry.context.active(),
|
||||
this.callMembershipSpan
|
||||
);
|
||||
const span = ElementCallOpenTelemetry.instance?.tracer.startSpan(
|
||||
"matrix.groupCallMembership.summaryReport",
|
||||
undefined,
|
||||
ctx
|
||||
);
|
||||
if (span === undefined) {
|
||||
return;
|
||||
}
|
||||
span.setAttribute("matrix.confId", this.groupCall.groupCallId);
|
||||
span.setAttribute("matrix.userId", this.myUserId);
|
||||
span.setAttribute(
|
||||
"matrix.displayName",
|
||||
this.myMember ? this.myMember.name : "unknown-name"
|
||||
);
|
||||
span.addEvent(type, data);
|
||||
span.end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface OTelStatsReportEvent {
|
||||
type: OTelStatsReportType;
|
||||
data: Attributes;
|
||||
}
|
||||
|
||||
enum OTelStatsReportType {
|
||||
ConnectionReport = "matrix.call.stats.connection",
|
||||
ByteSentReport = "matrix.call.stats.byteSent",
|
||||
SummaryReport = "matrix.stats.summary",
|
||||
CallFeedReport = "matrix.stats.call_feed",
|
||||
}
|
||||
109
src/otel/ObjectFlattener.ts
Normal file
109
src/otel/ObjectFlattener.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import { Attributes } from "@opentelemetry/api";
|
||||
import { VoipEvent } from "matrix-js-sdk/src/webrtc/call";
|
||||
import { GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import {
|
||||
ByteSentStatsReport,
|
||||
ConnectionStatsReport,
|
||||
SummaryStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
export class ObjectFlattener {
|
||||
public static flattenReportObject(
|
||||
prefix: string,
|
||||
report: ConnectionStatsReport | ByteSentStatsReport
|
||||
): Attributes {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(report, flatObject, `${prefix}.`, 0);
|
||||
return flatObject;
|
||||
}
|
||||
|
||||
public static flattenByteSentStatsReportObject(
|
||||
statsReport: GroupCallStatsReport<ByteSentStatsReport>
|
||||
): Attributes {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(
|
||||
statsReport.report,
|
||||
flatObject,
|
||||
"matrix.stats.bytesSent.",
|
||||
0
|
||||
);
|
||||
return flatObject;
|
||||
}
|
||||
|
||||
static flattenSummaryStatsReportObject(
|
||||
statsReport: GroupCallStatsReport<SummaryStatsReport>
|
||||
) {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(
|
||||
statsReport.report,
|
||||
flatObject,
|
||||
"matrix.stats.summary.",
|
||||
0
|
||||
);
|
||||
return flatObject;
|
||||
}
|
||||
|
||||
/* Flattens out an object into a single layer with components
|
||||
* of the key separated by dots
|
||||
*/
|
||||
public static flattenVoipEvent(event: VoipEvent): Attributes {
|
||||
const flatObject = {};
|
||||
ObjectFlattener.flattenObjectRecursive(
|
||||
event as unknown as Record<string, unknown>, // XXX Types
|
||||
flatObject,
|
||||
"matrix.event.",
|
||||
0
|
||||
);
|
||||
|
||||
return flatObject;
|
||||
}
|
||||
|
||||
public static flattenObjectRecursive(
|
||||
obj: Object,
|
||||
flatObject: Attributes,
|
||||
prefix: string,
|
||||
depth: number
|
||||
): void {
|
||||
if (depth > 10)
|
||||
throw new Error(
|
||||
"Depth limit exceeded: aborting VoipEvent recursion. Prefix is " +
|
||||
prefix
|
||||
);
|
||||
let entries;
|
||||
if (obj instanceof Map) {
|
||||
entries = obj.entries();
|
||||
} else {
|
||||
entries = Object.entries(obj);
|
||||
}
|
||||
for (const [k, v] of entries) {
|
||||
if (["string", "number", "boolean"].includes(typeof v) || v === null) {
|
||||
let value;
|
||||
value = v === null ? "null" : v;
|
||||
value = typeof v === "number" && Number.isNaN(v) ? "NaN" : value;
|
||||
flatObject[prefix + k] = value;
|
||||
} else if (typeof v === "object") {
|
||||
ObjectFlattener.flattenObjectRecursive(
|
||||
v,
|
||||
flatObject,
|
||||
prefix + k + ".",
|
||||
depth + 1
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
122
src/otel/otel.ts
Normal file
122
src/otel/otel.ts
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { SimpleSpanProcessor } from "@opentelemetry/sdk-trace-base";
|
||||
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
|
||||
import { WebTracerProvider } from "@opentelemetry/sdk-trace-web";
|
||||
import opentelemetry, { Tracer } from "@opentelemetry/api";
|
||||
import { Resource } from "@opentelemetry/resources";
|
||||
import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
|
||||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
|
||||
import { PosthogSpanProcessor } from "../analytics/PosthogSpanProcessor";
|
||||
import { Anonymity } from "../analytics/PosthogAnalytics";
|
||||
import { Config } from "../config/Config";
|
||||
import { RageshakeSpanProcessor } from "../analytics/RageshakeSpanProcessor";
|
||||
|
||||
const SERVICE_NAME = "element-call";
|
||||
|
||||
let sharedInstance: ElementCallOpenTelemetry;
|
||||
|
||||
export class ElementCallOpenTelemetry {
|
||||
private _provider: WebTracerProvider;
|
||||
private _tracer: Tracer;
|
||||
private _anonymity: Anonymity;
|
||||
private otlpExporter: OTLPTraceExporter;
|
||||
public readonly rageshakeProcessor?: RageshakeSpanProcessor;
|
||||
|
||||
static globalInit(): void {
|
||||
const config = Config.get();
|
||||
// we always enable opentelemetry in general. We only enable the OTLP
|
||||
// collector if a URL is defined (and in future if another setting is defined)
|
||||
// Posthog reporting is enabled or disabled
|
||||
// within the posthog code.
|
||||
const shouldEnableOtlp = Boolean(config.opentelemetry?.collector_url);
|
||||
|
||||
if (!sharedInstance || sharedInstance.isOtlpEnabled !== shouldEnableOtlp) {
|
||||
logger.info("(Re)starting OpenTelemetry debug reporting");
|
||||
sharedInstance?.dispose();
|
||||
|
||||
sharedInstance = new ElementCallOpenTelemetry(
|
||||
config.opentelemetry?.collector_url,
|
||||
config.rageshake?.submit_url
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
static get instance(): ElementCallOpenTelemetry {
|
||||
return sharedInstance;
|
||||
}
|
||||
|
||||
constructor(
|
||||
collectorUrl: string | undefined,
|
||||
rageshakeUrl: string | undefined
|
||||
) {
|
||||
// This is how we can make Jaeger show a reasonable service in the dropdown on the left.
|
||||
const providerConfig = {
|
||||
resource: new Resource({
|
||||
[SemanticResourceAttributes.SERVICE_NAME]: SERVICE_NAME,
|
||||
}),
|
||||
};
|
||||
this._provider = new WebTracerProvider(providerConfig);
|
||||
|
||||
if (collectorUrl) {
|
||||
logger.info("Enabling OTLP collector with URL " + collectorUrl);
|
||||
this.otlpExporter = new OTLPTraceExporter({
|
||||
url: collectorUrl,
|
||||
});
|
||||
this._provider.addSpanProcessor(
|
||||
new SimpleSpanProcessor(this.otlpExporter)
|
||||
);
|
||||
} else {
|
||||
logger.info("OTLP collector disabled");
|
||||
}
|
||||
|
||||
if (rageshakeUrl) {
|
||||
this.rageshakeProcessor = new RageshakeSpanProcessor();
|
||||
this._provider.addSpanProcessor(this.rageshakeProcessor);
|
||||
}
|
||||
|
||||
this._provider.addSpanProcessor(new PosthogSpanProcessor());
|
||||
opentelemetry.trace.setGlobalTracerProvider(this._provider);
|
||||
|
||||
this._tracer = opentelemetry.trace.getTracer(
|
||||
// This is not the serviceName shown in jaeger
|
||||
"my-element-call-otl-tracer"
|
||||
);
|
||||
}
|
||||
|
||||
public dispose(): void {
|
||||
opentelemetry.trace.setGlobalTracerProvider(null);
|
||||
this._provider?.shutdown();
|
||||
}
|
||||
|
||||
public get isOtlpEnabled(): boolean {
|
||||
return Boolean(this.otlpExporter);
|
||||
}
|
||||
|
||||
public get tracer(): Tracer {
|
||||
return this._tracer;
|
||||
}
|
||||
|
||||
public get provider(): WebTracerProvider {
|
||||
return this._provider;
|
||||
}
|
||||
|
||||
public get anonymity(): Anonymity {
|
||||
return this._anonymity;
|
||||
}
|
||||
}
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { ChangeEvent, useCallback, useEffect, useState } from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Button } from "../button";
|
||||
import { useProfile } from "./useProfile";
|
||||
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
||||
import { Modal, ModalContent } from "../Modal";
|
||||
import { AvatarInputField } from "../input/AvatarInputField";
|
||||
import styles from "./ProfileModal.module.css";
|
||||
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
onClose: () => void;
|
||||
[rest: string]: unknown;
|
||||
}
|
||||
export function ProfileModal({ client, ...rest }: Props) {
|
||||
const { onClose } = rest;
|
||||
const { t } = useTranslation();
|
||||
const {
|
||||
success,
|
||||
error,
|
||||
loading,
|
||||
displayName: initialDisplayName,
|
||||
avatarUrl,
|
||||
saveProfile,
|
||||
} = useProfile(client);
|
||||
const [displayName, setDisplayName] = useState(initialDisplayName || "");
|
||||
const [removeAvatar, setRemoveAvatar] = useState(false);
|
||||
|
||||
const onRemoveAvatar = useCallback(() => {
|
||||
setRemoveAvatar(true);
|
||||
}, []);
|
||||
|
||||
const onChangeDisplayName = useCallback(
|
||||
(e: ChangeEvent<HTMLInputElement>) => {
|
||||
setDisplayName(e.target.value);
|
||||
},
|
||||
[setDisplayName]
|
||||
);
|
||||
|
||||
const onSubmit = useCallback(
|
||||
(e) => {
|
||||
e.preventDefault();
|
||||
const data = new FormData(e.target);
|
||||
const displayNameDataEntry = data.get("displayName");
|
||||
const avatar: File | string = data.get("avatar");
|
||||
|
||||
const avatarSize =
|
||||
typeof avatar == "string" ? avatar.length : avatar.size;
|
||||
const displayName =
|
||||
typeof displayNameDataEntry == "string"
|
||||
? displayNameDataEntry
|
||||
: displayNameDataEntry.name;
|
||||
|
||||
saveProfile({
|
||||
displayName,
|
||||
avatar: avatar && avatarSize > 0 ? avatar : undefined,
|
||||
removeAvatar: removeAvatar && (!avatar || avatarSize === 0),
|
||||
});
|
||||
},
|
||||
[saveProfile, removeAvatar]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (success) {
|
||||
onClose();
|
||||
}
|
||||
}, [success, onClose]);
|
||||
|
||||
return (
|
||||
<Modal title={t("Profile")} isDismissable {...rest}>
|
||||
<ModalContent>
|
||||
<form onSubmit={onSubmit}>
|
||||
<FieldRow className={styles.avatarFieldRow}>
|
||||
<AvatarInputField
|
||||
id="avatar"
|
||||
name="avatar"
|
||||
label={t("Avatar")}
|
||||
avatarUrl={avatarUrl}
|
||||
displayName={displayName}
|
||||
onRemoveAvatar={onRemoveAvatar}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="userId"
|
||||
name="userId"
|
||||
label={t("User ID")}
|
||||
type="text"
|
||||
disabled
|
||||
value={client.getUserId()}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="displayName"
|
||||
name="displayName"
|
||||
label={t("Display name")}
|
||||
type="text"
|
||||
required
|
||||
autoComplete="off"
|
||||
placeholder={t("Display name")}
|
||||
value={displayName}
|
||||
onChange={onChangeDisplayName}
|
||||
/>
|
||||
</FieldRow>
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow rightAlign>
|
||||
<Button type="button" variant="secondary" onPress={onClose}>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button type="submit" disabled={loading}>
|
||||
{loading ? t("Saving…") : t("Save")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
</form>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
@@ -17,20 +17,31 @@ limitations under the License.
|
||||
.headline {
|
||||
text-align: center;
|
||||
margin-bottom: 60px;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.callEndedContent {
|
||||
text-align: center;
|
||||
max-width: 360px;
|
||||
max-width: 450px;
|
||||
}
|
||||
.callEndedContent p {
|
||||
font-size: var(--font-size-subtitle);
|
||||
}
|
||||
|
||||
.callEndedContent h3 {
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.callEndedButton {
|
||||
margin-top: 54px;
|
||||
margin-left: 30px;
|
||||
margin-right: 30px !important;
|
||||
}
|
||||
|
||||
.submitButton {
|
||||
width: 100%;
|
||||
margin-top: 54px;
|
||||
margin-left: 30px;
|
||||
margin-right: 30px !important;
|
||||
}
|
||||
|
||||
.container {
|
||||
|
||||
@@ -14,19 +14,130 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import React, { FormEventHandler, useCallback, useState } from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import styles from "./CallEndedView.module.css";
|
||||
import { LinkButton } from "../button";
|
||||
import feedbackStyle from "../input/FeedbackInput.module.css";
|
||||
import { Button, LinkButton } from "../button";
|
||||
import { useProfile } from "../profile/useProfile";
|
||||
import { Subtitle, Body, Link, Headline } from "../typography/Typography";
|
||||
import { Body, Link, Headline } from "../typography/Typography";
|
||||
import { Header, HeaderLogo, LeftNav, RightNav } from "../Header";
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
import { FieldRow, InputField } from "../input/Input";
|
||||
import { StarRatingInput } from "../input/StarRatingInput";
|
||||
|
||||
export function CallEndedView({ client }: { client: MatrixClient }) {
|
||||
export function CallEndedView({
|
||||
client,
|
||||
isPasswordlessUser,
|
||||
endedCallId,
|
||||
}: {
|
||||
client: MatrixClient;
|
||||
isPasswordlessUser: boolean;
|
||||
endedCallId: string;
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const history = useHistory();
|
||||
|
||||
const { displayName } = useProfile(client);
|
||||
const [surveySubmitted, setSurverySubmitted] = useState(false);
|
||||
const [starRating, setStarRating] = useState(0);
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
const [submitDone, setSubmitDone] = useState(false);
|
||||
const submitSurvery: FormEventHandler<HTMLFormElement> = useCallback(
|
||||
(e) => {
|
||||
e.preventDefault();
|
||||
const data = new FormData(e.target as HTMLFormElement);
|
||||
const feedbackText = data.get("feedbackText") as string;
|
||||
|
||||
PosthogAnalytics.instance.eventQualitySurvey.track(
|
||||
endedCallId,
|
||||
feedbackText,
|
||||
starRating
|
||||
);
|
||||
|
||||
setSubmitting(true);
|
||||
|
||||
setTimeout(() => {
|
||||
setSubmitDone(true);
|
||||
|
||||
setTimeout(() => {
|
||||
if (isPasswordlessUser) {
|
||||
// setting this renders the callEndedView with the invitation to create an account
|
||||
setSurverySubmitted(true);
|
||||
} else {
|
||||
// if the user already has an account immediately go back to the home screen
|
||||
history.push("/");
|
||||
}
|
||||
}, 1000);
|
||||
}, 1000);
|
||||
},
|
||||
[endedCallId, history, isPasswordlessUser, starRating]
|
||||
);
|
||||
const createAccountDialog = isPasswordlessUser && (
|
||||
<div className={styles.callEndedContent}>
|
||||
<Trans>
|
||||
<p>Why not finish by setting up a password to keep your account?</p>
|
||||
<p>
|
||||
You'll be able to keep your name and set an avatar for use on future
|
||||
calls
|
||||
</p>
|
||||
</Trans>
|
||||
<LinkButton
|
||||
className={styles.callEndedButton}
|
||||
size="lg"
|
||||
variant="default"
|
||||
to="/register"
|
||||
>
|
||||
{t("Create account")}
|
||||
</LinkButton>
|
||||
</div>
|
||||
);
|
||||
|
||||
const qualitySurveyDialog = (
|
||||
<div className={styles.callEndedContent}>
|
||||
<Trans>
|
||||
<p>
|
||||
We'd love to hear your feedback so we can improve your experience.
|
||||
</p>
|
||||
</Trans>
|
||||
<form onSubmit={submitSurvery}>
|
||||
<FieldRow>
|
||||
<StarRatingInput starCount={5} onChange={setStarRating} required />
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
className={feedbackStyle.feedback}
|
||||
id="feedbackText"
|
||||
name="feedbackText"
|
||||
label={t("Your feedback")}
|
||||
placeholder={t("Your feedback")}
|
||||
type="textarea"
|
||||
required
|
||||
/>
|
||||
</FieldRow>{" "}
|
||||
<FieldRow>
|
||||
{submitDone ? (
|
||||
<Trans>
|
||||
<p>Thanks for your feedback!</p>
|
||||
</Trans>
|
||||
) : (
|
||||
<Button
|
||||
type="submit"
|
||||
className={styles.submitButton}
|
||||
size="lg"
|
||||
variant="default"
|
||||
data-testid="home_go"
|
||||
>
|
||||
{submitting ? t("Submitting…") : t("Submit")}
|
||||
</Button>
|
||||
)}
|
||||
</FieldRow>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -39,27 +150,19 @@ export function CallEndedView({ client }: { client: MatrixClient }) {
|
||||
<div className={styles.container}>
|
||||
<main className={styles.main}>
|
||||
<Headline className={styles.headline}>
|
||||
{t("{{displayName}}, your call is now ended", { displayName })}
|
||||
{surveySubmitted
|
||||
? t("{{displayName}}, your call has ended.", {
|
||||
displayName,
|
||||
})
|
||||
: t("{{displayName}}, your call has ended.", {
|
||||
displayName,
|
||||
}) +
|
||||
"\n" +
|
||||
t("How did it go?")}
|
||||
</Headline>
|
||||
<div className={styles.callEndedContent}>
|
||||
<Trans>
|
||||
<Subtitle>
|
||||
Why not finish by setting up a password to keep your account?
|
||||
</Subtitle>
|
||||
<Subtitle>
|
||||
You'll be able to keep your name and set an avatar for use on
|
||||
future calls
|
||||
</Subtitle>
|
||||
</Trans>
|
||||
<LinkButton
|
||||
className={styles.callEndedButton}
|
||||
size="lg"
|
||||
variant="default"
|
||||
to="/register"
|
||||
>
|
||||
{t("Create account")}
|
||||
</LinkButton>
|
||||
</div>
|
||||
{!surveySubmitted && PosthogAnalytics.instance.isEnabled()
|
||||
? qualitySurveyDialog
|
||||
: createAccountDialog}
|
||||
</main>
|
||||
<Body className={styles.footer}>
|
||||
<Link color="primary" to="/">
|
||||
|
||||
@@ -28,14 +28,25 @@ import ReactJson, { CollapsedFieldProps } from "react-json-view";
|
||||
import mermaid from "mermaid";
|
||||
import { Item } from "@react-stately/collections";
|
||||
import { MatrixEvent, IContent } from "matrix-js-sdk/src/models/event";
|
||||
import { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import {
|
||||
GroupCall,
|
||||
GroupCallError,
|
||||
GroupCallEvent,
|
||||
} from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { ClientEvent, MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { RoomStateEvent } from "matrix-js-sdk/src/models/room-state";
|
||||
import { CallEvent, VoipEvent } from "matrix-js-sdk/src/webrtc/call";
|
||||
import {
|
||||
CallEvent,
|
||||
CallState,
|
||||
CallError,
|
||||
MatrixCall,
|
||||
VoipEvent,
|
||||
} from "matrix-js-sdk/src/webrtc/call";
|
||||
|
||||
import styles from "./GroupCallInspector.module.css";
|
||||
import { SelectInput } from "../input/SelectInput";
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
||||
|
||||
interface InspectorContextState {
|
||||
eventsByUserId?: { [userId: string]: SequenceDiagramMatrixEvent[] };
|
||||
@@ -353,7 +364,7 @@ function reducer(
|
||||
function useGroupCallState(
|
||||
client: MatrixClient,
|
||||
groupCall: GroupCall,
|
||||
showPollCallStats: boolean
|
||||
otelGroupCallMembership: OTelGroupCallMembership
|
||||
): InspectorContextState {
|
||||
const [state, dispatch] = useReducer(reducer, {
|
||||
localUserId: client.getUserId(),
|
||||
@@ -381,28 +392,55 @@ function useGroupCallState(
|
||||
callStateEvent,
|
||||
memberStateEvents,
|
||||
});
|
||||
|
||||
otelGroupCallMembership?.onUpdateRoomState(event);
|
||||
}
|
||||
|
||||
function onReceivedVoipEvent(event: MatrixEvent) {
|
||||
dispatch({ type: ClientEvent.ReceivedVoipEvent, event });
|
||||
|
||||
otelGroupCallMembership?.onReceivedVoipEvent(event);
|
||||
}
|
||||
|
||||
function onSendVoipEvent(event: VoipEvent) {
|
||||
function onSendVoipEvent(event: VoipEvent, call: MatrixCall) {
|
||||
dispatch({ type: CallEvent.SendVoipEvent, rawEvent: event });
|
||||
|
||||
otelGroupCallMembership?.onSendEvent(call, event);
|
||||
}
|
||||
|
||||
function onCallStateChange(
|
||||
newState: CallState,
|
||||
_: CallState,
|
||||
call: MatrixCall
|
||||
) {
|
||||
otelGroupCallMembership?.onCallStateChange(call, newState);
|
||||
}
|
||||
|
||||
function onCallError(error: CallError, call: MatrixCall) {
|
||||
otelGroupCallMembership.onCallError(error, call);
|
||||
}
|
||||
|
||||
function onGroupCallError(error: GroupCallError) {
|
||||
otelGroupCallMembership.onGroupCallError(error);
|
||||
}
|
||||
|
||||
function onUndecryptableToDevice(event: MatrixEvent) {
|
||||
dispatch({ type: ClientEvent.ReceivedVoipEvent, event });
|
||||
|
||||
Sentry.captureMessage("Undecryptable to-device Event");
|
||||
// probably unnecessary if it's now captured via otel?
|
||||
PosthogAnalytics.instance.eventUndecryptableToDevice.track(
|
||||
groupCall.groupCallId
|
||||
);
|
||||
|
||||
otelGroupCallMembership.onUndecryptableToDevice(event);
|
||||
}
|
||||
|
||||
client.on(RoomStateEvent.Events, onUpdateRoomState);
|
||||
//groupCall.on("calls_changed", onCallsChanged);
|
||||
groupCall.on(CallEvent.SendVoipEvent, onSendVoipEvent);
|
||||
groupCall.on(CallEvent.State, onCallStateChange);
|
||||
groupCall.on(CallEvent.Error, onCallError);
|
||||
groupCall.on(GroupCallEvent.Error, onGroupCallError);
|
||||
//client.on("state", onCallsChanged);
|
||||
//client.on("hangup", onCallHangup);
|
||||
client.on(ClientEvent.ReceivedVoipEvent, onReceivedVoipEvent);
|
||||
@@ -412,8 +450,10 @@ function useGroupCallState(
|
||||
|
||||
return () => {
|
||||
client.removeListener(RoomStateEvent.Events, onUpdateRoomState);
|
||||
//groupCall.removeListener("calls_changed", onCallsChanged);
|
||||
groupCall.removeListener(CallEvent.SendVoipEvent, onSendVoipEvent);
|
||||
groupCall.removeListener(CallEvent.State, onCallStateChange);
|
||||
groupCall.removeListener(CallEvent.Error, onCallError);
|
||||
groupCall.removeListener(GroupCallEvent.Error, onGroupCallError);
|
||||
//client.removeListener("state", onCallsChanged);
|
||||
//client.removeListener("hangup", onCallHangup);
|
||||
client.removeListener(ClientEvent.ReceivedVoipEvent, onReceivedVoipEvent);
|
||||
@@ -422,7 +462,7 @@ function useGroupCallState(
|
||||
onUndecryptableToDevice
|
||||
);
|
||||
};
|
||||
}, [client, groupCall]);
|
||||
}, [client, groupCall, otelGroupCallMembership]);
|
||||
|
||||
return state;
|
||||
}
|
||||
@@ -430,17 +470,19 @@ function useGroupCallState(
|
||||
interface GroupCallInspectorProps {
|
||||
client: MatrixClient;
|
||||
groupCall: GroupCall;
|
||||
otelGroupCallMembership: OTelGroupCallMembership;
|
||||
show: boolean;
|
||||
}
|
||||
|
||||
export function GroupCallInspector({
|
||||
client,
|
||||
groupCall,
|
||||
otelGroupCallMembership,
|
||||
show,
|
||||
}: GroupCallInspectorProps) {
|
||||
const [currentTab, setCurrentTab] = useState("sequence-diagrams");
|
||||
const [selectedUserId, setSelectedUserId] = useState<string>();
|
||||
const state = useGroupCallState(client, groupCall, show);
|
||||
const state = useGroupCallState(client, groupCall, otelGroupCallMembership);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const [_, setState] = useContext(InspectorContext);
|
||||
|
||||
@@ -51,7 +51,7 @@ export function GroupCallLoader({
|
||||
if (loading) {
|
||||
return (
|
||||
<FullScreenView>
|
||||
<h1>{t("Loading room…")}</h1>
|
||||
<h1>{t("Loading…")}</h1>
|
||||
</FullScreenView>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import { useSentryGroupCallHandler } from "./useSentryGroupCallHandler";
|
||||
import { useLocationNavigation } from "../useLocationNavigation";
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
import { useMediaHandler } from "../settings/useMediaHandler";
|
||||
import { findDeviceByName, getDevices } from "../media-utils";
|
||||
import { findDeviceByName, getNamedDevices } from "../media-utils";
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
@@ -81,7 +81,8 @@ export function GroupCallView({
|
||||
screenshareFeeds,
|
||||
participants,
|
||||
unencryptedEventsFromUsers,
|
||||
} = useGroupCall(groupCall);
|
||||
otelGroupCallMembership,
|
||||
} = useGroupCall(groupCall, client);
|
||||
|
||||
const { t } = useTranslation();
|
||||
const { setAudioInput, setVideoInput } = useMediaHandler();
|
||||
@@ -101,7 +102,7 @@ export function GroupCallView({
|
||||
// Get the available devices so we can match the selected device
|
||||
// to its ID. This involves getting a media stream (see docs on
|
||||
// the function) so we only do it once and re-use the result.
|
||||
const devices = await getDevices();
|
||||
const devices = await getNamedDevices();
|
||||
|
||||
const { audioInput, videoInput } = ev.detail
|
||||
.data as unknown as JoinCallData;
|
||||
@@ -142,8 +143,7 @@ export function GroupCallView({
|
||||
groupCall.setLocalVideoMuted(videoInput === null),
|
||||
]);
|
||||
|
||||
await groupCall.enter();
|
||||
|
||||
await enter();
|
||||
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
|
||||
PosthogAnalytics.instance.eventCallStarted.track(groupCall.groupCallId);
|
||||
|
||||
@@ -158,17 +158,17 @@ export function GroupCallView({
|
||||
widget.lazyActions.off(ElementWidgetActions.JoinCall, onJoin);
|
||||
};
|
||||
}
|
||||
}, [groupCall, preload, setAudioInput, setVideoInput]);
|
||||
}, [groupCall, preload, setAudioInput, setVideoInput, enter]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isEmbedded && !preload) {
|
||||
// In embedded mode, bypass the lobby and just enter the call straight away
|
||||
groupCall.enter();
|
||||
enter();
|
||||
|
||||
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
|
||||
PosthogAnalytics.instance.eventCallStarted.track(groupCall.groupCallId);
|
||||
}
|
||||
}, [groupCall, isEmbedded, preload]);
|
||||
}, [groupCall, isEmbedded, preload, enter]);
|
||||
|
||||
useSentryGroupCallHandler(groupCall);
|
||||
|
||||
@@ -203,7 +203,11 @@ export function GroupCallView({
|
||||
widget.api.transport.send(ElementWidgetActions.HangupCall, {});
|
||||
}
|
||||
|
||||
if (!isPasswordlessUser && !isEmbedded) {
|
||||
if (
|
||||
!isPasswordlessUser &&
|
||||
!isEmbedded &&
|
||||
!PosthogAnalytics.instance.isEnabled()
|
||||
) {
|
||||
history.push("/");
|
||||
}
|
||||
}, [groupCall, leave, isPasswordlessUser, isEmbedded, history]);
|
||||
@@ -238,6 +242,7 @@ export function GroupCallView({
|
||||
onLeave={onLeave}
|
||||
isEmbedded={isEmbedded}
|
||||
hideHeader={hideHeader}
|
||||
otelGroupCallMembership={otelGroupCallMembership}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
@@ -262,12 +267,28 @@ export function GroupCallView({
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
unencryptedEventsFromUsers={unencryptedEventsFromUsers}
|
||||
hideHeader={hideHeader}
|
||||
otelGroupCallMembership={otelGroupCallMembership}
|
||||
/>
|
||||
);
|
||||
}
|
||||
} else if (left) {
|
||||
if (isPasswordlessUser) {
|
||||
return <CallEndedView client={client} />;
|
||||
// The call ended view is shown for two reasons: prompting guests to create
|
||||
// an account, and prompting users that have opted into analytics to provide
|
||||
// feedback. We don't show a feedback prompt to widget users however (at
|
||||
// least for now), because we don't yet have designs that would allow widget
|
||||
// users to dismiss the feedback prompt and close the call window without
|
||||
// submitting anything.
|
||||
if (
|
||||
isPasswordlessUser ||
|
||||
(PosthogAnalytics.instance.isEnabled() && !isEmbedded)
|
||||
) {
|
||||
return (
|
||||
<CallEndedView
|
||||
endedCallId={groupCall.groupCallId}
|
||||
client={client}
|
||||
isPasswordlessUser={isPasswordlessUser}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
// If the user is a regular user, we'll have sent them back to the homepage,
|
||||
// so just sit here & do nothing: otherwise we would (briefly) mount the
|
||||
@@ -279,7 +300,7 @@ export function GroupCallView({
|
||||
} else if (isEmbedded) {
|
||||
return (
|
||||
<FullScreenView>
|
||||
<h1>{t("Loading room…")}</h1>
|
||||
<h1>{t("Loading…")}</h1>
|
||||
</FullScreenView>
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,6 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
.inRoom {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@@ -26,6 +25,12 @@ limitations under the License.
|
||||
--footerHeight: calc(50px + 2 * var(--footerPadding));
|
||||
}
|
||||
|
||||
.controlsOverlay {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.centerMessage {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -24,6 +24,7 @@ import { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { CallFeed } from "matrix-js-sdk/src/webrtc/callFeed";
|
||||
import classNames from "classnames";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { OverlayTriggerState } from "@react-stately/overlays";
|
||||
import { JoinRule } from "matrix-js-sdk/src/@types/partials";
|
||||
|
||||
import type { IWidgetApiRequest } from "matrix-widget-api";
|
||||
@@ -33,6 +34,8 @@ import {
|
||||
MicButton,
|
||||
VideoButton,
|
||||
ScreenshareButton,
|
||||
SettingsButton,
|
||||
InviteButton,
|
||||
} from "../button";
|
||||
import {
|
||||
Header,
|
||||
@@ -48,12 +51,8 @@ import {
|
||||
} from "../video-grid/VideoGrid";
|
||||
import { VideoTileContainer } from "../video-grid/VideoTileContainer";
|
||||
import { GroupCallInspector } from "./GroupCallInspector";
|
||||
import { OverflowMenu } from "./OverflowMenu";
|
||||
import { GridLayoutMenu } from "./GridLayoutMenu";
|
||||
import { Avatar } from "../Avatar";
|
||||
import { UserMenuContainer } from "../UserMenuContainer";
|
||||
import { useRageshakeRequestModal } from "../settings/submit-rageshake";
|
||||
import { RageshakeRequestModal } from "./RageshakeRequestModal";
|
||||
import { useMediaHandler } from "../settings/useMediaHandler";
|
||||
import {
|
||||
useNewGrid,
|
||||
@@ -73,6 +72,11 @@ import { TileDescriptor } from "../video-grid/TileDescriptor";
|
||||
import { AudioSink } from "../video-grid/AudioSink";
|
||||
import { useCallViewKeyboardShortcuts } from "../useCallViewKeyboardShortcuts";
|
||||
import { NewVideoGrid } from "../video-grid/NewVideoGrid";
|
||||
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
||||
import { SettingsModal } from "../settings/SettingsModal";
|
||||
import { InviteModal } from "./InviteModal";
|
||||
import { useRageshakeRequestModal } from "../settings/submit-rageshake";
|
||||
import { RageshakeRequestModal } from "./RageshakeRequestModal";
|
||||
|
||||
const canScreenshare = "getDisplayMedia" in (navigator.mediaDevices ?? {});
|
||||
// There is currently a bug in Safari our our code with cloning and sending MediaStreams
|
||||
@@ -100,6 +104,7 @@ interface Props {
|
||||
roomIdOrAlias: string;
|
||||
unencryptedEventsFromUsers: Set<string>;
|
||||
hideHeader: boolean;
|
||||
otelGroupCallMembership: OTelGroupCallMembership;
|
||||
}
|
||||
|
||||
export function InCallView({
|
||||
@@ -122,10 +127,10 @@ export function InCallView({
|
||||
roomIdOrAlias,
|
||||
unencryptedEventsFromUsers,
|
||||
hideHeader,
|
||||
otelGroupCallMembership,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
usePreventScroll();
|
||||
const joinRule = useJoinRule(groupCall.room);
|
||||
|
||||
const containerRef1 = useRef<HTMLDivElement | null>(null);
|
||||
const [containerRef2, bounds] = useMeasure({ polyfill: ResizeObserver });
|
||||
@@ -148,13 +153,12 @@ export function InCallView({
|
||||
const [audioContext, audioDestination] = useAudioContext();
|
||||
const [showInspector] = useShowInspector();
|
||||
|
||||
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
||||
useModalTriggerState();
|
||||
|
||||
const { hideScreensharing } = useUrlParams();
|
||||
|
||||
const joinRule = useJoinRule(groupCall.room);
|
||||
|
||||
useCallViewKeyboardShortcuts(
|
||||
!feedbackModalState.isOpen,
|
||||
containerRef1,
|
||||
toggleMicrophoneMuted,
|
||||
toggleLocalVideoMuted,
|
||||
setMicrophoneMuted
|
||||
@@ -343,6 +347,36 @@ export function InCallView({
|
||||
modalProps: rageshakeRequestModalProps,
|
||||
} = useRageshakeRequestModal(groupCall.room.roomId);
|
||||
|
||||
const {
|
||||
modalState: settingsModalState,
|
||||
modalProps: settingsModalProps,
|
||||
}: {
|
||||
modalState: OverlayTriggerState;
|
||||
modalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
} = useModalTriggerState();
|
||||
|
||||
const openSettings = useCallback(() => {
|
||||
settingsModalState.open();
|
||||
}, [settingsModalState]);
|
||||
|
||||
const {
|
||||
modalState: inviteModalState,
|
||||
modalProps: inviteModalProps,
|
||||
}: {
|
||||
modalState: OverlayTriggerState;
|
||||
modalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
} = useModalTriggerState();
|
||||
|
||||
const openInvite = useCallback(() => {
|
||||
inviteModalState.open();
|
||||
}, [inviteModalState]);
|
||||
|
||||
const containerClasses = classNames(styles.inRoom, {
|
||||
[styles.maximised]: maximisedParticipant,
|
||||
});
|
||||
@@ -357,11 +391,11 @@ export function InCallView({
|
||||
const audioElements: JSX.Element[] = [];
|
||||
if (!spatialAudio || maximisedParticipant) {
|
||||
for (const item of items) {
|
||||
if (item.isLocal) continue; // We don't want to render own audio
|
||||
audioElements.push(
|
||||
<AudioSink
|
||||
tileDescriptor={item}
|
||||
audioOutput={audioOutput}
|
||||
otelGroupCallMembership={otelGroupCallMembership}
|
||||
key={item.id}
|
||||
/>
|
||||
);
|
||||
@@ -380,11 +414,13 @@ export function InCallView({
|
||||
key="1"
|
||||
muted={microphoneMuted}
|
||||
onPress={toggleMicrophoneMuted}
|
||||
data-testid="incall_mute"
|
||||
/>,
|
||||
<VideoButton
|
||||
key="2"
|
||||
muted={localVideoMuted}
|
||||
onPress={toggleLocalVideoMuted}
|
||||
data-testid="incall_videomute"
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -395,25 +431,18 @@ export function InCallView({
|
||||
key="3"
|
||||
enabled={isScreensharing}
|
||||
onPress={toggleScreensharing}
|
||||
data-testid="incall_screenshare"
|
||||
/>
|
||||
);
|
||||
}
|
||||
if (!maximisedParticipant) {
|
||||
buttons.push(
|
||||
<OverflowMenu
|
||||
key="4"
|
||||
inCall
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
groupCall={groupCall}
|
||||
showInvite={joinRule === JoinRule.Public}
|
||||
feedbackModalState={feedbackModalState}
|
||||
feedbackModalProps={feedbackModalProps}
|
||||
/>
|
||||
);
|
||||
buttons.push(<SettingsButton key="4" onPress={openSettings} />);
|
||||
}
|
||||
}
|
||||
|
||||
buttons.push(<HangupButton key="6" onPress={onLeave} />);
|
||||
buttons.push(
|
||||
<HangupButton key="6" onPress={onLeave} data-testid="incall_leave" />
|
||||
);
|
||||
footer = <div className={styles.footer}>{buttons}</div>;
|
||||
}
|
||||
|
||||
@@ -431,23 +460,38 @@ export function InCallView({
|
||||
</LeftNav>
|
||||
<RightNav>
|
||||
<GridLayoutMenu layout={layout} setLayout={setLayout} />
|
||||
<UserMenuContainer preventNavigation />
|
||||
{joinRule === JoinRule.Public && (
|
||||
<InviteButton variant="icon" onClick={openInvite} />
|
||||
)}
|
||||
</RightNav>
|
||||
</Header>
|
||||
)}
|
||||
{renderContent()}
|
||||
{footer}
|
||||
<div className={styles.controlsOverlay}>
|
||||
{renderContent()}
|
||||
{footer}
|
||||
</div>
|
||||
<GroupCallInspector
|
||||
client={client}
|
||||
groupCall={groupCall}
|
||||
otelGroupCallMembership={otelGroupCallMembership}
|
||||
show={showInspector}
|
||||
/>
|
||||
{rageshakeRequestModalState.isOpen && (
|
||||
{rageshakeRequestModalState.isOpen && !noControls && (
|
||||
<RageshakeRequestModal
|
||||
{...rageshakeRequestModalProps}
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
/>
|
||||
)}
|
||||
{settingsModalState.isOpen && (
|
||||
<SettingsModal
|
||||
client={client}
|
||||
roomId={groupCall.room.roomId}
|
||||
{...settingsModalProps}
|
||||
/>
|
||||
)}
|
||||
{inviteModalState.isOpen && (
|
||||
<InviteModal roomIdOrAlias={roomIdOrAlias} {...inviteModalProps} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ export const InviteModal: FC<Props> = ({ roomIdOrAlias, ...rest }) => {
|
||||
<CopyButton
|
||||
className={styles.copyButton}
|
||||
value={getRoomUrl(roomIdOrAlias)}
|
||||
data-testid="modal_inviteLink"
|
||||
/>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
|
||||
@@ -137,6 +137,7 @@ export function LobbyView({
|
||||
size="lg"
|
||||
disabled={state !== GroupCallState.LocalCallFeedInitialized}
|
||||
onPress={onEnter}
|
||||
data-testid="lobby_joinCall"
|
||||
>
|
||||
Join call now
|
||||
</Button>
|
||||
@@ -146,6 +147,7 @@ export function LobbyView({
|
||||
value={getRoomUrl(roomIdOrAlias)}
|
||||
className={styles.copyButton}
|
||||
copiedMessage={t("Call link copied")}
|
||||
data-testid="lobby_inviteLink"
|
||||
>
|
||||
Copy call link and join later
|
||||
</CopyButton>
|
||||
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { useCallback } from "react";
|
||||
import { Item } from "@react-stately/collections";
|
||||
import { GroupCall } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { OverlayTriggerState } from "@react-stately/overlays";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Button } from "../button";
|
||||
import { Menu } from "../Menu";
|
||||
import { PopoverMenuTrigger } from "../popover/PopoverMenu";
|
||||
import { ReactComponent as SettingsIcon } from "../icons/Settings.svg";
|
||||
import { ReactComponent as AddUserIcon } from "../icons/AddUser.svg";
|
||||
import { ReactComponent as OverflowIcon } from "../icons/Overflow.svg";
|
||||
import { ReactComponent as FeedbackIcon } from "../icons/Feedback.svg";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
import { SettingsModal } from "../settings/SettingsModal";
|
||||
import { InviteModal } from "./InviteModal";
|
||||
import { TooltipTrigger } from "../Tooltip";
|
||||
import { FeedbackModal } from "./FeedbackModal";
|
||||
import { Config } from "../config/Config";
|
||||
|
||||
interface Props {
|
||||
roomIdOrAlias: string;
|
||||
inCall: boolean;
|
||||
groupCall: GroupCall;
|
||||
showInvite: boolean;
|
||||
feedbackModalState: OverlayTriggerState;
|
||||
feedbackModalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
}
|
||||
|
||||
export function OverflowMenu({
|
||||
roomIdOrAlias,
|
||||
inCall,
|
||||
groupCall,
|
||||
showInvite,
|
||||
feedbackModalState,
|
||||
feedbackModalProps,
|
||||
}: Props) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const {
|
||||
modalState: inviteModalState,
|
||||
modalProps: inviteModalProps,
|
||||
}: {
|
||||
modalState: OverlayTriggerState;
|
||||
modalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
} = useModalTriggerState();
|
||||
const {
|
||||
modalState: settingsModalState,
|
||||
modalProps: settingsModalProps,
|
||||
}: {
|
||||
modalState: OverlayTriggerState;
|
||||
modalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
} = useModalTriggerState();
|
||||
|
||||
// TODO: On closing modal, focus should be restored to the trigger button
|
||||
// https://github.com/adobe/react-spectrum/issues/2444
|
||||
const onAction = useCallback(
|
||||
(key) => {
|
||||
switch (key) {
|
||||
case "invite":
|
||||
inviteModalState.open();
|
||||
break;
|
||||
case "settings":
|
||||
settingsModalState.open();
|
||||
break;
|
||||
case "feedback":
|
||||
feedbackModalState.open();
|
||||
break;
|
||||
}
|
||||
},
|
||||
[feedbackModalState, inviteModalState, settingsModalState]
|
||||
);
|
||||
|
||||
const tooltip = useCallback(() => t("More"), [t]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<PopoverMenuTrigger disableOnState>
|
||||
<TooltipTrigger tooltip={tooltip} placement="top">
|
||||
<Button variant="toolbar">
|
||||
<OverflowIcon />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
{(props: JSX.IntrinsicAttributes) => (
|
||||
<Menu {...props} label={t("More menu")} onAction={onAction}>
|
||||
{showInvite && (
|
||||
<Item key="invite" textValue={t("Invite people")}>
|
||||
<AddUserIcon />
|
||||
<span>{t("Invite people")}</span>
|
||||
</Item>
|
||||
)}
|
||||
<Item key="settings" textValue={t("Settings")}>
|
||||
<SettingsIcon />
|
||||
<span>{t("Settings")}</span>
|
||||
</Item>
|
||||
{Config.get().rageshake?.submit_url && (
|
||||
<Item key="feedback" textValue={t("Submit feedback")}>
|
||||
<FeedbackIcon />
|
||||
<span>{t("Submit feedback")}</span>
|
||||
</Item>
|
||||
)}
|
||||
</Menu>
|
||||
)}
|
||||
</PopoverMenuTrigger>
|
||||
{settingsModalState.isOpen && <SettingsModal {...settingsModalProps} />}
|
||||
{inviteModalState.isOpen && (
|
||||
<InviteModal roomIdOrAlias={roomIdOrAlias} {...inviteModalProps} />
|
||||
)}
|
||||
{feedbackModalState.isOpen && (
|
||||
<FeedbackModal
|
||||
{...feedbackModalProps}
|
||||
roomId={groupCall?.room.roomId}
|
||||
inCall={inCall}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { useDelayedState } from "../useDelayedState";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
import { InviteModal } from "./InviteModal";
|
||||
import { HangupButton, InviteButton } from "../button";
|
||||
import { HangupButton, InviteButton, SettingsButton } from "../button";
|
||||
import { Header, LeftNav, RightNav, RoomSetupHeaderInfo } from "../Header";
|
||||
import styles from "./PTTCallView.module.css";
|
||||
import { Facepile } from "../Facepile";
|
||||
@@ -41,9 +41,10 @@ import { ReactComponent as AudioIcon } from "../icons/Audio.svg";
|
||||
import { usePTTSounds } from "../sound/usePttSounds";
|
||||
import { PTTClips } from "../sound/PTTClips";
|
||||
import { GroupCallInspector } from "./GroupCallInspector";
|
||||
import { OverflowMenu } from "./OverflowMenu";
|
||||
import { Size } from "../Avatar";
|
||||
import { ParticipantInfo } from "./useGroupCall";
|
||||
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
||||
import { SettingsModal } from "../settings/SettingsModal";
|
||||
|
||||
function getPromptText(
|
||||
networkWaiting: boolean,
|
||||
@@ -106,6 +107,7 @@ interface Props {
|
||||
onLeave: () => void;
|
||||
isEmbedded: boolean;
|
||||
hideHeader: boolean;
|
||||
otelGroupCallMembership: OTelGroupCallMembership;
|
||||
}
|
||||
|
||||
export const PTTCallView: React.FC<Props> = ({
|
||||
@@ -119,12 +121,14 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
onLeave,
|
||||
isEmbedded,
|
||||
hideHeader,
|
||||
otelGroupCallMembership,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
const { modalState: inviteModalState, modalProps: inviteModalProps } =
|
||||
useModalTriggerState();
|
||||
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
||||
const { modalState: settingsModalState, modalProps: settingsModalProps } =
|
||||
useModalTriggerState();
|
||||
|
||||
const [containerRef, bounds] = useMeasure({ polyfill: ResizeObserver });
|
||||
const facepileSize = bounds.width < 800 ? Size.SM : Size.MD;
|
||||
const showControls = bounds.height > 500;
|
||||
@@ -192,6 +196,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
<GroupCallInspector
|
||||
client={client}
|
||||
groupCall={groupCall}
|
||||
otelGroupCallMembership={otelGroupCallMembership}
|
||||
// Never shown in PTT mode, but must be present to collect call state
|
||||
// https://github.com/vector-im/element-call/issues/328
|
||||
show={false}
|
||||
@@ -228,14 +233,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.footer}>
|
||||
<OverflowMenu
|
||||
inCall
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
groupCall={groupCall}
|
||||
showInvite={false}
|
||||
feedbackModalState={feedbackModalState}
|
||||
feedbackModalProps={feedbackModalProps}
|
||||
/>
|
||||
<SettingsButton onPress={() => settingsModalState.open()} />
|
||||
{!isEmbedded && <HangupButton onPress={onLeave} />}
|
||||
<InviteButton onPress={() => inviteModalState.open()} />
|
||||
</div>
|
||||
@@ -261,7 +259,7 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
<div className={styles.talkingInfo} />
|
||||
))}
|
||||
<PTTButton
|
||||
enabled={!feedbackModalState.isOpen}
|
||||
enabled={!inviteModalState.isOpen && !settingsModalState.isOpen}
|
||||
showTalkOverError={showTalkOverError}
|
||||
activeSpeakerUserId={activeSpeakerUserId}
|
||||
activeSpeakerDisplayName={activeSpeakerDisplayName}
|
||||
@@ -308,6 +306,13 @@ export const PTTCallView: React.FC<Props> = ({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{settingsModalState.isOpen && (
|
||||
<SettingsModal
|
||||
client={client}
|
||||
roomId={groupCall.room.roomId}
|
||||
{...settingsModalProps}
|
||||
/>
|
||||
)}
|
||||
{inviteModalState.isOpen && showControls && (
|
||||
<InviteModal roomIdOrAlias={roomIdOrAlias} {...inviteModalProps} />
|
||||
)}
|
||||
|
||||
@@ -74,6 +74,7 @@ export function RoomAuthView() {
|
||||
name="displayName"
|
||||
label={t("Display name")}
|
||||
placeholder={t("Display name")}
|
||||
data-testid="joincall_displayName"
|
||||
type="text"
|
||||
required
|
||||
autoComplete="off"
|
||||
@@ -90,7 +91,12 @@ export function RoomAuthView() {
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<Button type="submit" size="lg" disabled={loading}>
|
||||
<Button
|
||||
type="submit"
|
||||
size="lg"
|
||||
disabled={loading}
|
||||
data-testid="joincall_joincall"
|
||||
>
|
||||
{loading ? t("Loading…") : t("Join call now")}
|
||||
</Button>
|
||||
<div id={recaptchaId} />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2021-2022 New Vector Ltd
|
||||
Copyright 2021-2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -24,9 +24,9 @@ import { RoomAuthView } from "./RoomAuthView";
|
||||
import { GroupCallLoader } from "./GroupCallLoader";
|
||||
import { GroupCallView } from "./GroupCallView";
|
||||
import { useUrlParams } from "../UrlParams";
|
||||
import { MediaHandlerProvider } from "../settings/useMediaHandler";
|
||||
import { useRegisterPasswordlessUser } from "../auth/useRegisterPasswordlessUser";
|
||||
import { translatedError } from "../TranslatedError";
|
||||
import { useOptInAnalytics } from "../settings/useSetting";
|
||||
|
||||
export const RoomPage: FC = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -46,9 +46,15 @@ export const RoomPage: FC = () => {
|
||||
const roomIdOrAlias = roomId ?? roomAlias;
|
||||
if (!roomIdOrAlias) throw translatedError("No room specified", t);
|
||||
|
||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||
const { registerPasswordlessUser } = useRegisterPasswordlessUser();
|
||||
const [isRegistering, setIsRegistering] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
// During the beta, opt into analytics by default
|
||||
if (optInAnalytics === null) setOptInAnalytics(true);
|
||||
}, [optInAnalytics, setOptInAnalytics]);
|
||||
|
||||
useEffect(() => {
|
||||
// If we've finished loading, are not already authed and we've been given a display name as
|
||||
// a URL param, automatically register a passwordless user
|
||||
@@ -94,15 +100,13 @@ export const RoomPage: FC = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<MediaHandlerProvider client={client}>
|
||||
<GroupCallLoader
|
||||
client={client}
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
viaServers={viaServers}
|
||||
createPtt={isPtt}
|
||||
>
|
||||
{groupCallView}
|
||||
</GroupCallLoader>
|
||||
</MediaHandlerProvider>
|
||||
<GroupCallLoader
|
||||
client={client}
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
viaServers={viaServers}
|
||||
createPtt={isPtt}
|
||||
>
|
||||
{groupCallView}
|
||||
</GroupCallLoader>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,21 +14,22 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import React, { useCallback } from "react";
|
||||
import useMeasure from "react-use-measure";
|
||||
import { ResizeObserver } from "@juggle/resize-observer";
|
||||
import { GroupCallState } from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { OverlayTriggerState } from "@react-stately/overlays";
|
||||
|
||||
import { MicButton, VideoButton } from "../button";
|
||||
import { MicButton, SettingsButton, VideoButton } from "../button";
|
||||
import { useMediaStream } from "../video-grid/useMediaStream";
|
||||
import { OverflowMenu } from "./OverflowMenu";
|
||||
import { Avatar } from "../Avatar";
|
||||
import { useProfile } from "../profile/useProfile";
|
||||
import styles from "./VideoPreview.module.css";
|
||||
import { Body } from "../typography/Typography";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
import { SettingsModal } from "../settings/SettingsModal";
|
||||
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
@@ -59,12 +60,30 @@ export function VideoPreview({
|
||||
const [previewRef, previewBounds] = useMeasure({ polyfill: ResizeObserver });
|
||||
const avatarSize = (previewBounds.height - 66) / 2;
|
||||
|
||||
const { modalState: feedbackModalState, modalProps: feedbackModalProps } =
|
||||
useModalTriggerState();
|
||||
const {
|
||||
modalState: settingsModalState,
|
||||
modalProps: settingsModalProps,
|
||||
}: {
|
||||
modalState: OverlayTriggerState;
|
||||
modalProps: {
|
||||
isOpen: boolean;
|
||||
onClose: () => void;
|
||||
};
|
||||
} = useModalTriggerState();
|
||||
|
||||
const openSettings = useCallback(() => {
|
||||
settingsModalState.open();
|
||||
}, [settingsModalState]);
|
||||
|
||||
return (
|
||||
<div className={styles.preview} ref={previewRef}>
|
||||
<video ref={videoRef} muted playsInline disablePictureInPicture />
|
||||
<video
|
||||
ref={videoRef}
|
||||
muted
|
||||
playsInline
|
||||
disablePictureInPicture
|
||||
data-testid="preview_video"
|
||||
/>
|
||||
{state === GroupCallState.LocalCallFeedUninitialized && (
|
||||
<Body fontWeight="semiBold" className={styles.cameraPermissions}>
|
||||
{t("Camera/microphone permissions needed to join the call.")}
|
||||
@@ -95,17 +114,13 @@ export function VideoPreview({
|
||||
muted={localVideoMuted}
|
||||
onPress={toggleLocalVideoMuted}
|
||||
/>
|
||||
<OverflowMenu
|
||||
roomIdOrAlias={roomIdOrAlias}
|
||||
feedbackModalState={feedbackModalState}
|
||||
feedbackModalProps={feedbackModalProps}
|
||||
inCall={false}
|
||||
groupCall={undefined}
|
||||
showInvite={false}
|
||||
/>
|
||||
<SettingsButton onPress={openSettings} />
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
{settingsModalState.isOpen && (
|
||||
<SettingsModal client={client} {...settingsModalProps} />
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
65
src/room/checkForParallelCalls.ts
Normal file
65
src/room/checkForParallelCalls.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
Copyright 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { EventType } from "matrix-js-sdk/src/@types/event";
|
||||
import { RoomState } from "matrix-js-sdk/src/models/room-state";
|
||||
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
|
||||
function isObject(x: unknown): x is Record<string, unknown> {
|
||||
return typeof x === "object" && x !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks the state of a room for multiple calls happening in parallel, sending
|
||||
* the details to PostHog if that is indeed what's happening. (This is unwanted
|
||||
* as it indicates a split-brain scenario.)
|
||||
*/
|
||||
export function checkForParallelCalls(state: RoomState): void {
|
||||
const now = Date.now();
|
||||
const participantsPerCall = new Map<string, number>();
|
||||
|
||||
// For each participant in each call, increment the participant count
|
||||
for (const e of state.getStateEvents(EventType.GroupCallMemberPrefix)) {
|
||||
const content = e.getContent<Record<string, unknown>>();
|
||||
const calls: unknown[] = Array.isArray(content["m.calls"])
|
||||
? content["m.calls"]
|
||||
: [];
|
||||
|
||||
for (const call of calls) {
|
||||
if (isObject(call) && typeof call["m.call_id"] === "string") {
|
||||
const devices: unknown[] = Array.isArray(call["m.devices"])
|
||||
? call["m.devices"]
|
||||
: [];
|
||||
|
||||
for (const device of devices) {
|
||||
if (isObject(device) && (device["expires_ts"] as number) > now) {
|
||||
const participantCount =
|
||||
participantsPerCall.get(call["m.call_id"]) ?? 0;
|
||||
participantsPerCall.set(call["m.call_id"], participantCount + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (participantsPerCall.size > 1) {
|
||||
PosthogAnalytics.instance.trackEvent({
|
||||
eventName: "ParallelCalls",
|
||||
participantsPerCall: Object.fromEntries(participantsPerCall),
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -22,16 +22,28 @@ import {
|
||||
GroupCallErrorCode,
|
||||
GroupCallUnknownDeviceError,
|
||||
GroupCallError,
|
||||
GroupCallStatsReportEvent,
|
||||
GroupCallStatsReport,
|
||||
} from "matrix-js-sdk/src/webrtc/groupCall";
|
||||
import { CallFeed, CallFeedEvent } from "matrix-js-sdk/src/webrtc/callFeed";
|
||||
import { RoomMember } from "matrix-js-sdk/src/models/room-member";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { IWidgetApiRequest } from "matrix-widget-api";
|
||||
import { MatrixClient, RoomStateEvent } from "matrix-js-sdk";
|
||||
import {
|
||||
ByteSentStatsReport,
|
||||
ConnectionStatsReport,
|
||||
SummaryStatsReport,
|
||||
CallFeedReport,
|
||||
} from "matrix-js-sdk/src/webrtc/stats/statsReport";
|
||||
|
||||
import { usePageUnload } from "./usePageUnload";
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
import { TranslatedError, translatedError } from "../TranslatedError";
|
||||
import { ElementWidgetActions, ScreenshareStartData, widget } from "../widget";
|
||||
import { OTelGroupCallMembership } from "../otel/OTelGroupCallMembership";
|
||||
import { ElementCallOpenTelemetry } from "../otel/otel";
|
||||
import { checkForParallelCalls } from "./checkForParallelCalls";
|
||||
|
||||
export enum ConnectionState {
|
||||
EstablishingCall = "establishing call", // call hasn't been established yet
|
||||
@@ -66,6 +78,7 @@ export interface UseGroupCallReturnType {
|
||||
participants: Map<RoomMember, Map<string, ParticipantInfo>>;
|
||||
hasLocalParticipant: boolean;
|
||||
unencryptedEventsFromUsers: Set<string>;
|
||||
otelGroupCallMembership: OTelGroupCallMembership;
|
||||
}
|
||||
|
||||
interface State {
|
||||
@@ -84,6 +97,13 @@ interface State {
|
||||
hasLocalParticipant: boolean;
|
||||
}
|
||||
|
||||
// This is a bit of a hack, but we keep the opentelemetry tracker object at the file
|
||||
// level so that it doesn't pop in & out of existence as react mounts & unmounts
|
||||
// components. The right solution is probably for this to live in the js-sdk and have
|
||||
// the same lifetime as groupcalls themselves.
|
||||
let groupCallOTelMembership: OTelGroupCallMembership;
|
||||
let groupCallOTelMembershipGroupCallId: string;
|
||||
|
||||
function getParticipants(
|
||||
groupCall: GroupCall
|
||||
): Map<RoomMember, Map<string, ParticipantInfo>> {
|
||||
@@ -124,7 +144,10 @@ function getParticipants(
|
||||
return participants;
|
||||
}
|
||||
|
||||
export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
export function useGroupCall(
|
||||
groupCall: GroupCall,
|
||||
client: MatrixClient
|
||||
): UseGroupCallReturnType {
|
||||
const [
|
||||
{
|
||||
state,
|
||||
@@ -158,6 +181,19 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
hasLocalParticipant: false,
|
||||
});
|
||||
|
||||
if (groupCallOTelMembershipGroupCallId !== groupCall.groupCallId) {
|
||||
if (groupCallOTelMembership) groupCallOTelMembership.dispose();
|
||||
|
||||
// If the user disables analytics, this will stay around until they leave the call
|
||||
// so analytics will be disabled once they leave.
|
||||
if (ElementCallOpenTelemetry.instance) {
|
||||
groupCallOTelMembership = new OTelGroupCallMembership(groupCall, client);
|
||||
groupCallOTelMembershipGroupCallId = groupCall.groupCallId;
|
||||
} else {
|
||||
groupCallOTelMembership = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const [unencryptedEventsFromUsers, addUnencryptedEventUser] = useReducer(
|
||||
(state: Set<string>, newVal: string) => {
|
||||
return new Set(state).add(newVal);
|
||||
@@ -175,6 +211,11 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
[]
|
||||
);
|
||||
|
||||
const leaveCall = useCallback(() => {
|
||||
groupCallOTelMembership?.onLeaveCall();
|
||||
groupCall.leave();
|
||||
}, [groupCall]);
|
||||
|
||||
useEffect(() => {
|
||||
// disable the media action keys, otherwise audio elements get paused when
|
||||
// the user presses media keys or unplugs headphones, etc.
|
||||
@@ -305,6 +346,30 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
}
|
||||
}
|
||||
|
||||
function onConnectionStatsReport(
|
||||
report: GroupCallStatsReport<ConnectionStatsReport>
|
||||
): void {
|
||||
groupCallOTelMembership?.onConnectionStatsReport(report);
|
||||
}
|
||||
|
||||
function onByteSentStatsReport(
|
||||
report: GroupCallStatsReport<ByteSentStatsReport>
|
||||
): void {
|
||||
groupCallOTelMembership?.onByteSentStatsReport(report);
|
||||
}
|
||||
|
||||
function onSummaryStatsReport(
|
||||
report: GroupCallStatsReport<SummaryStatsReport>
|
||||
): void {
|
||||
groupCallOTelMembership?.onSummaryStatsReport(report);
|
||||
}
|
||||
|
||||
function onCallFeedStatsReport(
|
||||
report: GroupCallStatsReport<CallFeedReport>
|
||||
): void {
|
||||
groupCallOTelMembership?.onCallFeedStatsReport(report);
|
||||
}
|
||||
|
||||
groupCall.on(GroupCallEvent.GroupCallStateChanged, onGroupCallStateChanged);
|
||||
groupCall.on(GroupCallEvent.UserMediaFeedsChanged, onUserMediaFeedsChanged);
|
||||
groupCall.on(
|
||||
@@ -320,6 +385,24 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
groupCall.on(GroupCallEvent.CallsChanged, onCallsChanged);
|
||||
groupCall.on(GroupCallEvent.ParticipantsChanged, onParticipantsChanged);
|
||||
groupCall.on(GroupCallEvent.Error, onError);
|
||||
groupCall.on(
|
||||
GroupCallStatsReportEvent.ConnectionStats,
|
||||
onConnectionStatsReport
|
||||
);
|
||||
groupCall.on(
|
||||
GroupCallStatsReportEvent.ByteSentStats,
|
||||
onByteSentStatsReport
|
||||
);
|
||||
groupCall.on(GroupCallStatsReportEvent.SummaryStats, onSummaryStatsReport);
|
||||
groupCall.on(
|
||||
GroupCallStatsReportEvent.CallFeedStats,
|
||||
onCallFeedStatsReport
|
||||
);
|
||||
|
||||
groupCall.room.currentState.on(
|
||||
RoomStateEvent.Update,
|
||||
checkForParallelCalls
|
||||
);
|
||||
|
||||
updateState({
|
||||
error: null,
|
||||
@@ -367,12 +450,32 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
onParticipantsChanged
|
||||
);
|
||||
groupCall.removeListener(GroupCallEvent.Error, onError);
|
||||
groupCall.leave();
|
||||
groupCall.removeListener(
|
||||
GroupCallStatsReportEvent.ConnectionStats,
|
||||
onConnectionStatsReport
|
||||
);
|
||||
groupCall.removeListener(
|
||||
GroupCallStatsReportEvent.ByteSentStats,
|
||||
onByteSentStatsReport
|
||||
);
|
||||
groupCall.removeListener(
|
||||
GroupCallStatsReportEvent.SummaryStats,
|
||||
onSummaryStatsReport
|
||||
);
|
||||
groupCall.removeListener(
|
||||
GroupCallStatsReportEvent.CallFeedStats,
|
||||
onCallFeedStatsReport
|
||||
);
|
||||
groupCall.room.currentState.off(
|
||||
RoomStateEvent.Update,
|
||||
checkForParallelCalls
|
||||
);
|
||||
leaveCall();
|
||||
};
|
||||
}, [groupCall, updateState]);
|
||||
}, [groupCall, updateState, leaveCall]);
|
||||
|
||||
usePageUnload(() => {
|
||||
groupCall.leave();
|
||||
leaveCall();
|
||||
});
|
||||
|
||||
const initLocalCallFeed = useCallback(
|
||||
@@ -391,17 +494,21 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
PosthogAnalytics.instance.eventCallEnded.cacheStartCall(new Date());
|
||||
PosthogAnalytics.instance.eventCallStarted.track(groupCall.groupCallId);
|
||||
|
||||
// This must be called before we start trying to join the call, as we need to
|
||||
// have started tracking by the time calls start getting created.
|
||||
groupCallOTelMembership?.onJoinCall();
|
||||
|
||||
groupCall.enter().catch((error) => {
|
||||
console.error(error);
|
||||
updateState({ error });
|
||||
});
|
||||
}, [groupCall, updateState]);
|
||||
|
||||
const leave = useCallback(() => groupCall.leave(), [groupCall]);
|
||||
|
||||
const toggleLocalVideoMuted = useCallback(() => {
|
||||
const toggleToMute = !groupCall.isLocalVideoMuted();
|
||||
groupCall.setLocalVideoMuted(toggleToMute);
|
||||
groupCallOTelMembership?.onToggleLocalVideoMuted(toggleToMute);
|
||||
// TODO: These explict posthog calls should be unnecessary now with the posthog otel exporter?
|
||||
PosthogAnalytics.instance.eventMuteCamera.track(
|
||||
toggleToMute,
|
||||
groupCall.groupCallId
|
||||
@@ -411,6 +518,7 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
const setMicrophoneMuted = useCallback(
|
||||
(setMuted) => {
|
||||
groupCall.setMicrophoneMuted(setMuted);
|
||||
groupCallOTelMembership?.onSetMicrophoneMuted(setMuted);
|
||||
PosthogAnalytics.instance.eventMuteMicrophone.track(
|
||||
setMuted,
|
||||
groupCall.groupCallId
|
||||
@@ -421,10 +529,13 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
|
||||
const toggleMicrophoneMuted = useCallback(() => {
|
||||
const toggleToMute = !groupCall.isMicrophoneMuted();
|
||||
groupCallOTelMembership?.onToggleMicrophoneMuted(toggleToMute);
|
||||
setMicrophoneMuted(toggleToMute);
|
||||
}, [groupCall, setMicrophoneMuted]);
|
||||
|
||||
const toggleScreensharing = useCallback(async () => {
|
||||
groupCallOTelMembership?.onToggleScreensharing(!groupCall.isScreensharing);
|
||||
|
||||
if (!groupCall.isScreensharing()) {
|
||||
// toggling on
|
||||
updateState({ requestingScreenshare: true });
|
||||
@@ -525,7 +636,7 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
error,
|
||||
initLocalCallFeed,
|
||||
enter,
|
||||
leave,
|
||||
leave: leaveCall,
|
||||
toggleLocalVideoMuted,
|
||||
toggleMicrophoneMuted,
|
||||
toggleScreensharing,
|
||||
@@ -537,5 +648,6 @@ export function useGroupCall(groupCall: GroupCall): UseGroupCallReturnType {
|
||||
participants,
|
||||
hasLocalParticipant,
|
||||
unencryptedEventsFromUsers,
|
||||
otelGroupCallMembership: groupCallOTelMembership,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ import { isLocalRoomId, createRoom, roomNameFromRoomId } from "../matrix-utils";
|
||||
import { translatedError } from "../TranslatedError";
|
||||
import { widget } from "../widget";
|
||||
|
||||
const STATS_COLLECT_INTERVAL_TIME_MS = 10000;
|
||||
|
||||
export interface GroupCallLoadState {
|
||||
loading: boolean;
|
||||
error?: Error;
|
||||
@@ -94,10 +96,13 @@ export const useLoadGroupCall = (
|
||||
const fetchOrCreateGroupCall = async (): Promise<GroupCall> => {
|
||||
const room = await fetchOrCreateRoom();
|
||||
logger.debug(`Fetched / joined room ${roomIdOrAlias}`);
|
||||
const groupCall = client.getGroupCallForRoom(room.roomId);
|
||||
let groupCall = client.getGroupCallForRoom(room.roomId);
|
||||
logger.debug("Got group call", groupCall?.groupCallId);
|
||||
|
||||
if (groupCall) return groupCall;
|
||||
if (groupCall) {
|
||||
groupCall.setGroupCallStatsInterval(STATS_COLLECT_INTERVAL_TIME_MS);
|
||||
return groupCall;
|
||||
}
|
||||
|
||||
if (
|
||||
!widget &&
|
||||
@@ -112,12 +117,14 @@ export const useLoadGroupCall = (
|
||||
createPtt ? "PTT" : "video"
|
||||
} call`
|
||||
);
|
||||
return await client.createGroupCall(
|
||||
groupCall = await client.createGroupCall(
|
||||
room.roomId,
|
||||
createPtt ? GroupCallType.Voice : GroupCallType.Video,
|
||||
createPtt,
|
||||
GroupCallIntent.Room
|
||||
);
|
||||
groupCall.setGroupCallStatsInterval(STATS_COLLECT_INTERVAL_TIME_MS);
|
||||
return groupCall;
|
||||
}
|
||||
|
||||
// We don't have permission to create the call, so all we can do is wait
|
||||
@@ -126,6 +133,7 @@ export const useLoadGroupCall = (
|
||||
const onGroupCallIncoming = (groupCall: GroupCall) => {
|
||||
if (groupCall?.room.roomId === room.roomId) {
|
||||
clearTimeout(timeout);
|
||||
groupCall.setGroupCallStatsInterval(STATS_COLLECT_INTERVAL_TIME_MS);
|
||||
client.off(
|
||||
GroupCallEventHandlerEvent.Incoming,
|
||||
onGroupCallIncoming
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,28 +14,22 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { useCallback, useEffect } from "react";
|
||||
import React, { useCallback } from "react";
|
||||
import { randomString } from "matrix-js-sdk/src/randomstring";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Modal, ModalContent } from "../Modal";
|
||||
import { Button } from "../button";
|
||||
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
||||
import {
|
||||
useSubmitRageshake,
|
||||
useRageshakeRequest,
|
||||
} from "../settings/submit-rageshake";
|
||||
import { useSubmitRageshake, useRageshakeRequest } from "./submit-rageshake";
|
||||
import { Body } from "../typography/Typography";
|
||||
import styles from "../input/SelectInput.module.css";
|
||||
import feedbackStyles from "../input/FeedbackInput.module.css";
|
||||
|
||||
interface Props {
|
||||
inCall: boolean;
|
||||
roomId: string;
|
||||
onClose?: () => void;
|
||||
// TODO: add all props for for <Modal>
|
||||
[index: string]: unknown;
|
||||
roomId?: string;
|
||||
}
|
||||
|
||||
export function FeedbackModal({ inCall, roomId, onClose, ...rest }: Props) {
|
||||
export function FeedbackSettingsTab({ roomId }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const { submitRageshake, sending, sent, error } = useSubmitRageshake();
|
||||
const sendRageshakeRequest = useRageshakeRequest();
|
||||
@@ -57,37 +51,36 @@ export function FeedbackModal({ inCall, roomId, onClose, ...rest }: Props) {
|
||||
roomId,
|
||||
});
|
||||
|
||||
if (inCall && sendLogs) {
|
||||
if (roomId && sendLogs) {
|
||||
sendRageshakeRequest(roomId, rageshakeRequestId);
|
||||
}
|
||||
},
|
||||
[inCall, submitRageshake, roomId, sendRageshakeRequest]
|
||||
[submitRageshake, roomId, sendRageshakeRequest]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (sent) {
|
||||
onClose();
|
||||
}
|
||||
}, [sent, onClose]);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={t("Submit feedback")}
|
||||
isDismissable
|
||||
onClose={onClose}
|
||||
{...rest}
|
||||
>
|
||||
<ModalContent>
|
||||
<Body>{t("Having trouble? Help us fix it.")}</Body>
|
||||
<form onSubmit={onSubmitFeedback}>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="description"
|
||||
name="description"
|
||||
label={t("Description (optional)")}
|
||||
type="textarea"
|
||||
/>
|
||||
</FieldRow>
|
||||
<div>
|
||||
<h4 className={styles.label}>{t("Submit feedback")}</h4>
|
||||
<Body>
|
||||
{t(
|
||||
"If you are experiencing issues or simply would like to provide some feedback, please send us a short description below."
|
||||
)}
|
||||
</Body>
|
||||
<form onSubmit={onSubmitFeedback}>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
className={feedbackStyles.feedback}
|
||||
id="description"
|
||||
name="description"
|
||||
label={t("Your feedback")}
|
||||
placeholder={t("Your feedback")}
|
||||
type="textarea"
|
||||
disabled={sending || sent}
|
||||
/>
|
||||
</FieldRow>
|
||||
{sent ? (
|
||||
<Body> {t("Thanks, we received your feedback!")}</Body>
|
||||
) : (
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="sendLogs"
|
||||
@@ -96,19 +89,17 @@ export function FeedbackModal({ inCall, roomId, onClose, ...rest }: Props) {
|
||||
type="checkbox"
|
||||
defaultChecked
|
||||
/>
|
||||
</FieldRow>
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<FieldRow>
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
<Button type="submit" disabled={sending}>
|
||||
{sending ? t("Submitting feedback…") : t("Submit feedback")}
|
||||
{sending ? t("Submitting…") : t("Submit")}
|
||||
</Button>
|
||||
</FieldRow>
|
||||
</form>
|
||||
</ModalContent>
|
||||
</Modal>
|
||||
)}
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,6 +14,12 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
max-width: 350px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.avatarFieldRow {
|
||||
justify-content: center;
|
||||
}
|
||||
113
src/settings/ProfileSettingsTab.tsx
Normal file
113
src/settings/ProfileSettingsTab.tsx
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { useCallback, useEffect, useRef } from "react";
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { useProfile } from "../profile/useProfile";
|
||||
import { FieldRow, InputField, ErrorMessage } from "../input/Input";
|
||||
import { AvatarInputField } from "../input/AvatarInputField";
|
||||
import styles from "./ProfileSettingsTab.module.css";
|
||||
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
}
|
||||
export function ProfileSettingsTab({ client }: Props) {
|
||||
const { t } = useTranslation();
|
||||
const { error, displayName, avatarUrl, saveProfile } = useProfile(client);
|
||||
|
||||
const formRef = useRef<HTMLFormElement | null>(null);
|
||||
|
||||
const formChanged = useRef(false);
|
||||
const onFormChange = useCallback(() => {
|
||||
formChanged.current = true;
|
||||
}, []);
|
||||
|
||||
const removeAvatar = useRef(false);
|
||||
const onRemoveAvatar = useCallback(() => {
|
||||
removeAvatar.current = true;
|
||||
formChanged.current = true;
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const form = formRef.current!;
|
||||
// Auto-save when the user dismisses this component
|
||||
return () => {
|
||||
if (formChanged.current) {
|
||||
const data = new FormData(form);
|
||||
const displayNameDataEntry = data.get("displayName");
|
||||
const avatar = data.get("avatar");
|
||||
|
||||
const avatarSize =
|
||||
typeof avatar == "string" ? avatar.length : avatar?.size ?? 0;
|
||||
const displayName =
|
||||
typeof displayNameDataEntry == "string"
|
||||
? displayNameDataEntry
|
||||
: displayNameDataEntry?.name ?? null;
|
||||
|
||||
saveProfile({
|
||||
displayName,
|
||||
avatar: avatar && avatarSize > 0 ? avatar : undefined,
|
||||
removeAvatar: removeAvatar.current && (!avatar || avatarSize === 0),
|
||||
});
|
||||
}
|
||||
};
|
||||
}, [saveProfile]);
|
||||
|
||||
return (
|
||||
<form onChange={onFormChange} ref={formRef} className={styles.content}>
|
||||
<FieldRow className={styles.avatarFieldRow}>
|
||||
<AvatarInputField
|
||||
id="avatar"
|
||||
name="avatar"
|
||||
label={t("Avatar")}
|
||||
avatarUrl={avatarUrl}
|
||||
displayName={displayName}
|
||||
onRemoveAvatar={onRemoveAvatar}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="userId"
|
||||
name="userId"
|
||||
label={t("Username")}
|
||||
type="text"
|
||||
disabled
|
||||
value={client.getUserId()!}
|
||||
/>
|
||||
</FieldRow>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="displayName"
|
||||
name="displayName"
|
||||
label={t("Display name")}
|
||||
type="text"
|
||||
required
|
||||
autoComplete="off"
|
||||
placeholder={t("Display name")}
|
||||
defaultValue={displayName}
|
||||
data-testid="profile_displayname"
|
||||
/>
|
||||
</FieldRow>
|
||||
{error && (
|
||||
<FieldRow>
|
||||
<ErrorMessage error={error} />
|
||||
</FieldRow>
|
||||
)}
|
||||
</form>
|
||||
);
|
||||
}
|
||||
@@ -19,19 +19,14 @@ limitations under the License.
|
||||
height: 480px;
|
||||
}
|
||||
|
||||
.settingsModal p {
|
||||
color: var(--secondary-content);
|
||||
}
|
||||
|
||||
.tabContainer {
|
||||
margin: 27px 16px;
|
||||
padding: 27px 20px;
|
||||
}
|
||||
|
||||
.fieldRowText {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
This style guarantees a fixed width of the tab bar in the settings window.
|
||||
The "Developer" item in the tab bar can be toggled.
|
||||
Without a defined width activating the developer tab makes the tab container jump to the right.
|
||||
*/
|
||||
.tabLabel {
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,9 +14,10 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import React, { useCallback, useState } from "react";
|
||||
import { Item } from "@react-stately/collections";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import { MatrixClient } from "matrix-js-sdk";
|
||||
|
||||
import { Modal } from "../Modal";
|
||||
import styles from "./SettingsModal.module.css";
|
||||
@@ -25,25 +26,30 @@ import { ReactComponent as AudioIcon } from "../icons/Audio.svg";
|
||||
import { ReactComponent as VideoIcon } from "../icons/Video.svg";
|
||||
import { ReactComponent as DeveloperIcon } from "../icons/Developer.svg";
|
||||
import { ReactComponent as OverflowIcon } from "../icons/Overflow.svg";
|
||||
import { ReactComponent as UserIcon } from "../icons/User.svg";
|
||||
import { ReactComponent as FeedbackIcon } from "../icons/Feedback.svg";
|
||||
import { SelectInput } from "../input/SelectInput";
|
||||
import { useMediaHandler } from "./useMediaHandler";
|
||||
import {
|
||||
useKeyboardShortcuts,
|
||||
useSpatialAudio,
|
||||
useShowInspector,
|
||||
useOptInAnalytics,
|
||||
canEnableSpatialAudio,
|
||||
useNewGrid,
|
||||
useDeveloperSettingsTab,
|
||||
} from "./useSetting";
|
||||
import { FieldRow, InputField } from "../input/Input";
|
||||
import { Button } from "../button";
|
||||
import { useDownloadDebugLog } from "./submit-rageshake";
|
||||
import { Body } from "../typography/Typography";
|
||||
import { optInDescription } from "../analytics/AnalyticsOptInDescription";
|
||||
import { Body, Caption } from "../typography/Typography";
|
||||
import { AnalyticsNotice } from "../analytics/AnalyticsNotice";
|
||||
import { ProfileSettingsTab } from "./ProfileSettingsTab";
|
||||
import { FeedbackSettingsTab } from "./FeedbackSettingsTab";
|
||||
|
||||
interface Props {
|
||||
isOpen: boolean;
|
||||
client: MatrixClient;
|
||||
roomId?: string;
|
||||
defaultTab?: string;
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
@@ -59,18 +65,39 @@ export const SettingsModal = (props: Props) => {
|
||||
audioOutput,
|
||||
audioOutputs,
|
||||
setAudioOutput,
|
||||
useDeviceNames,
|
||||
} = useMediaHandler();
|
||||
useDeviceNames();
|
||||
|
||||
const [spatialAudio, setSpatialAudio] = useSpatialAudio();
|
||||
const [showInspector, setShowInspector] = useShowInspector();
|
||||
const [optInAnalytics, setOptInAnalytics] = useOptInAnalytics();
|
||||
const [developerSettingsTab, setDeveloperSettingsTab] =
|
||||
useDeveloperSettingsTab();
|
||||
const [keyboardShortcuts, setKeyboardShortcuts] = useKeyboardShortcuts();
|
||||
const [newGrid, setNewGrid] = useNewGrid();
|
||||
|
||||
const downloadDebugLog = useDownloadDebugLog();
|
||||
|
||||
const [selectedTab, setSelectedTab] = useState<string | undefined>();
|
||||
|
||||
const onSelectedTabChanged = useCallback(
|
||||
(tab) => {
|
||||
setSelectedTab(tab);
|
||||
},
|
||||
[setSelectedTab]
|
||||
);
|
||||
|
||||
const optInDescription = (
|
||||
<Caption>
|
||||
<Trans>
|
||||
<AnalyticsNotice />
|
||||
<br />
|
||||
You may withdraw consent by unchecking this box. If you are currently in
|
||||
a call, this setting will take effect at the end of the call.
|
||||
</Trans>
|
||||
</Caption>
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
title={t("Settings")}
|
||||
@@ -79,8 +106,13 @@ export const SettingsModal = (props: Props) => {
|
||||
className={styles.settingsModal}
|
||||
{...props}
|
||||
>
|
||||
<TabContainer className={styles.tabContainer}>
|
||||
<TabContainer
|
||||
onSelectionChange={onSelectedTabChanged}
|
||||
selectedKey={selectedTab ?? props.defaultTab ?? "audio"}
|
||||
className={styles.tabContainer}
|
||||
>
|
||||
<TabItem
|
||||
key="audio"
|
||||
title={
|
||||
<>
|
||||
<AudioIcon width={16} height={16} />
|
||||
@@ -122,21 +154,22 @@ export const SettingsModal = (props: Props) => {
|
||||
label={t("Spatial audio")}
|
||||
type="checkbox"
|
||||
checked={spatialAudio}
|
||||
disabled={!canEnableSpatialAudio()}
|
||||
disabled={setSpatialAudio === null}
|
||||
description={
|
||||
canEnableSpatialAudio()
|
||||
? t(
|
||||
setSpatialAudio === null
|
||||
? t("This feature is only supported on Firefox.")
|
||||
: t(
|
||||
"This will make a speaker's audio seem as if it is coming from where their tile is positioned on screen. (Experimental feature: this may impact the stability of audio.)"
|
||||
)
|
||||
: t("This feature is only supported on Firefox.")
|
||||
}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setSpatialAudio(event.target.checked)
|
||||
setSpatialAudio!(event.target.checked)
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
</TabItem>
|
||||
<TabItem
|
||||
key="video"
|
||||
title={
|
||||
<>
|
||||
<VideoIcon width={16} height={16} />
|
||||
@@ -159,6 +192,29 @@ export const SettingsModal = (props: Props) => {
|
||||
</SelectInput>
|
||||
</TabItem>
|
||||
<TabItem
|
||||
key="profile"
|
||||
title={
|
||||
<>
|
||||
<UserIcon width={15} height={15} />
|
||||
<span>{t("Profile")}</span>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<ProfileSettingsTab client={props.client} />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
key="feedback"
|
||||
title={
|
||||
<>
|
||||
<FeedbackIcon width={16} height={16} />
|
||||
<span>{t("Feedback")}</span>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<FeedbackSettingsTab roomId={props.roomId} />
|
||||
</TabItem>
|
||||
<TabItem
|
||||
key="more"
|
||||
title={
|
||||
<>
|
||||
<OverflowIcon width={16} height={16} />
|
||||
@@ -166,33 +222,10 @@ export const SettingsModal = (props: Props) => {
|
||||
</>
|
||||
}
|
||||
>
|
||||
<h4>Keyboard</h4>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="keyboardShortcuts"
|
||||
label={t("Single-key keyboard shortcuts")}
|
||||
type="checkbox"
|
||||
checked={keyboardShortcuts}
|
||||
description={t(
|
||||
"Whether to enable single-key keyboard shortcuts, e.g. 'm' to mute/unmute the mic."
|
||||
)}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setKeyboardShortcuts(event.target.checked)
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
<h4>Analytics</h4>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="optInAnalytics"
|
||||
type="checkbox"
|
||||
checked={optInAnalytics}
|
||||
description={optInDescription()}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setOptInAnalytics(event.target.checked)
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
<h4>Developer</h4>
|
||||
<p>
|
||||
Version: {(import.meta.env.VITE_APP_VERSION as string) || "dev"}
|
||||
</p>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="developerSettingsTab"
|
||||
@@ -207,9 +240,22 @@ export const SettingsModal = (props: Props) => {
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
<h4>Analytics</h4>
|
||||
<FieldRow>
|
||||
<InputField
|
||||
id="optInAnalytics"
|
||||
type="checkbox"
|
||||
checked={optInAnalytics}
|
||||
description={optInDescription}
|
||||
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
|
||||
setOptInAnalytics(event.target.checked)
|
||||
}
|
||||
/>
|
||||
</FieldRow>
|
||||
</TabItem>
|
||||
{developerSettingsTab && (
|
||||
<TabItem
|
||||
key="developer"
|
||||
title={
|
||||
<>
|
||||
<DeveloperIcon width={16} height={16} />
|
||||
|
||||
@@ -25,6 +25,14 @@ import { useClient } from "../ClientContext";
|
||||
import { InspectorContext } from "../room/GroupCallInspector";
|
||||
import { useModalTriggerState } from "../Modal";
|
||||
import { Config } from "../config/Config";
|
||||
import { ElementCallOpenTelemetry } from "../otel/otel";
|
||||
|
||||
const gzip = (text: string): Blob => {
|
||||
// encode as UTF-8
|
||||
const buf = new TextEncoder().encode(text);
|
||||
// compress
|
||||
return new Blob([pako.gzip(buf)]);
|
||||
};
|
||||
|
||||
interface RageShakeSubmitOptions {
|
||||
sendLogs: boolean;
|
||||
@@ -235,14 +243,15 @@ export function useSubmitRageshake(): {
|
||||
const logs = await getLogsForReport();
|
||||
|
||||
for (const entry of logs) {
|
||||
// encode as UTF-8
|
||||
let buf = new TextEncoder().encode(entry.lines);
|
||||
// compress
|
||||
buf = pako.gzip(buf);
|
||||
|
||||
body.append("compressed-log", new Blob([buf]), entry.id);
|
||||
body.append("compressed-log", gzip(entry.lines), entry.id);
|
||||
}
|
||||
|
||||
body.append(
|
||||
"file",
|
||||
gzip(ElementCallOpenTelemetry.instance.rageshakeProcessor!.dump()),
|
||||
"traces.json.gz"
|
||||
);
|
||||
|
||||
if (inspectorState) {
|
||||
body.append(
|
||||
"file",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
Copyright 2022 - 2023 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -14,25 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
/*
|
||||
Copyright 2022 New Vector Ltd
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { MatrixClient } from "matrix-js-sdk/src/client";
|
||||
import { MediaHandlerEvent } from "matrix-js-sdk/src/webrtc/mediaHandler";
|
||||
import React, {
|
||||
useState,
|
||||
useEffect,
|
||||
@@ -41,18 +23,27 @@ import React, {
|
||||
useContext,
|
||||
createContext,
|
||||
ReactNode,
|
||||
useRef,
|
||||
} from "react";
|
||||
|
||||
import { useClient } from "../ClientContext";
|
||||
import { getNamedDevices } from "../media-utils";
|
||||
|
||||
export interface MediaHandlerContextInterface {
|
||||
audioInput: string;
|
||||
audioInput: string | undefined;
|
||||
audioInputs: MediaDeviceInfo[];
|
||||
setAudioInput: (deviceId: string) => void;
|
||||
videoInput: string;
|
||||
videoInput: string | undefined;
|
||||
videoInputs: MediaDeviceInfo[];
|
||||
setVideoInput: (deviceId: string) => void;
|
||||
audioOutput: string;
|
||||
audioOutput: string | undefined;
|
||||
audioOutputs: MediaDeviceInfo[];
|
||||
setAudioOutput: (deviceId: string) => void;
|
||||
/**
|
||||
* A hook which requests for devices to be named. This requires media
|
||||
* permissions.
|
||||
*/
|
||||
useDeviceNames: () => void;
|
||||
}
|
||||
|
||||
const MediaHandlerContext =
|
||||
@@ -63,6 +54,7 @@ interface MediaPreferences {
|
||||
videoInput?: string;
|
||||
audioOutput?: string;
|
||||
}
|
||||
|
||||
function getMediaPreferences(): MediaPreferences {
|
||||
const mediaPreferences = localStorage.getItem("matrix-media-preferences");
|
||||
|
||||
@@ -70,10 +62,10 @@ function getMediaPreferences(): MediaPreferences {
|
||||
try {
|
||||
return JSON.parse(mediaPreferences);
|
||||
} catch (e) {
|
||||
return undefined;
|
||||
return {};
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,11 +80,13 @@ function updateMediaPreferences(newPreferences: MediaPreferences): void {
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
interface Props {
|
||||
client: MatrixClient;
|
||||
children: ReactNode;
|
||||
}
|
||||
export function MediaHandlerProvider({ client, children }: Props): JSX.Element {
|
||||
|
||||
export function MediaHandlerProvider({ children }: Props): JSX.Element {
|
||||
const { client } = useClient();
|
||||
const [
|
||||
{
|
||||
audioInput,
|
||||
@@ -103,118 +97,109 @@ export function MediaHandlerProvider({ client, children }: Props): JSX.Element {
|
||||
audioOutputs,
|
||||
},
|
||||
setState,
|
||||
] = useState(() => {
|
||||
const mediaPreferences = getMediaPreferences();
|
||||
const mediaHandler = client.getMediaHandler();
|
||||
] = useState(() => ({
|
||||
audioInput: undefined as string | undefined,
|
||||
videoInput: undefined as string | undefined,
|
||||
audioOutput: undefined as string | undefined,
|
||||
audioInputs: [] as MediaDeviceInfo[],
|
||||
videoInputs: [] as MediaDeviceInfo[],
|
||||
audioOutputs: [] as MediaDeviceInfo[],
|
||||
}));
|
||||
|
||||
mediaHandler.restoreMediaSettings(
|
||||
mediaPreferences?.audioInput,
|
||||
mediaPreferences?.videoInput
|
||||
);
|
||||
// A ref counting the number of components currently mounted that want
|
||||
// to know device names
|
||||
const numComponentsWantingNames = useRef(0);
|
||||
|
||||
return {
|
||||
// @ts-ignore, ignore that audioInput is a private members of mediaHandler
|
||||
audioInput: mediaHandler.audioInput,
|
||||
// @ts-ignore, ignore that videoInput is a private members of mediaHandler
|
||||
videoInput: mediaHandler.videoInput,
|
||||
audioOutput: undefined,
|
||||
audioInputs: [],
|
||||
videoInputs: [],
|
||||
audioOutputs: [],
|
||||
};
|
||||
});
|
||||
const updateDevices = useCallback(
|
||||
async (client: MatrixClient, initial: boolean) => {
|
||||
// Only request device names if components actually want them, because it
|
||||
// could trigger an extra permission pop-up
|
||||
const devices = await (numComponentsWantingNames.current > 0
|
||||
? getNamedDevices()
|
||||
: navigator.mediaDevices.enumerateDevices());
|
||||
const mediaPreferences = getMediaPreferences();
|
||||
|
||||
const audioInputs = devices.filter((d) => d.kind === "audioinput");
|
||||
const videoInputs = devices.filter((d) => d.kind === "videoinput");
|
||||
const audioOutputs = devices.filter((d) => d.kind === "audiooutput");
|
||||
|
||||
const audioInput = (
|
||||
mediaPreferences.audioInput === undefined
|
||||
? audioInputs.at(0)
|
||||
: audioInputs.find(
|
||||
(d) => d.deviceId === mediaPreferences.audioInput
|
||||
) ?? audioInputs.at(0)
|
||||
)?.deviceId;
|
||||
const videoInput = (
|
||||
mediaPreferences.videoInput === undefined
|
||||
? videoInputs.at(0)
|
||||
: videoInputs.find(
|
||||
(d) => d.deviceId === mediaPreferences.videoInput
|
||||
) ?? videoInputs.at(0)
|
||||
)?.deviceId;
|
||||
const audioOutput =
|
||||
mediaPreferences.audioOutput === undefined
|
||||
? undefined
|
||||
: audioOutputs.find(
|
||||
(d) => d.deviceId === mediaPreferences.audioOutput
|
||||
)?.deviceId;
|
||||
|
||||
updateMediaPreferences({ audioInput, videoInput, audioOutput });
|
||||
setState({
|
||||
audioInput,
|
||||
videoInput,
|
||||
audioOutput,
|
||||
audioInputs,
|
||||
videoInputs,
|
||||
audioOutputs,
|
||||
});
|
||||
|
||||
if (
|
||||
initial ||
|
||||
audioInput !== mediaPreferences.audioInput ||
|
||||
videoInput !== mediaPreferences.videoInput
|
||||
) {
|
||||
client.getMediaHandler().setMediaInputs(audioInput, videoInput);
|
||||
}
|
||||
},
|
||||
[setState]
|
||||
);
|
||||
|
||||
const useDeviceNames = useCallback(() => {
|
||||
// This is a little weird from React's perspective as it looks like a
|
||||
// dynamic hook, but it works
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
||||
useEffect(() => {
|
||||
if (client) {
|
||||
numComponentsWantingNames.current++;
|
||||
if (numComponentsWantingNames.current === 1)
|
||||
updateDevices(client, false);
|
||||
return () => void numComponentsWantingNames.current--;
|
||||
}
|
||||
}, []);
|
||||
}, [client, updateDevices]);
|
||||
|
||||
useEffect(() => {
|
||||
const mediaHandler = client.getMediaHandler();
|
||||
if (client) {
|
||||
updateDevices(client, true);
|
||||
const onDeviceChange = () => updateDevices(client, false);
|
||||
navigator.mediaDevices.addEventListener("devicechange", onDeviceChange);
|
||||
|
||||
function updateDevices(): void {
|
||||
navigator.mediaDevices.enumerateDevices().then((devices) => {
|
||||
const mediaPreferences = getMediaPreferences();
|
||||
|
||||
const audioInputs = devices.filter(
|
||||
(device) => device.kind === "audioinput"
|
||||
return () => {
|
||||
navigator.mediaDevices.removeEventListener(
|
||||
"devicechange",
|
||||
onDeviceChange
|
||||
);
|
||||
const audioConnected = audioInputs.some(
|
||||
// @ts-ignore
|
||||
(device) => device.deviceId === mediaHandler.audioInput
|
||||
);
|
||||
// @ts-ignore
|
||||
let audioInput = mediaHandler.audioInput;
|
||||
|
||||
if (!audioConnected && audioInputs.length > 0) {
|
||||
audioInput = audioInputs[0].deviceId;
|
||||
}
|
||||
|
||||
const videoInputs = devices.filter(
|
||||
(device) => device.kind === "videoinput"
|
||||
);
|
||||
const videoConnected = videoInputs.some(
|
||||
// @ts-ignore
|
||||
(device) => device.deviceId === mediaHandler.videoInput
|
||||
);
|
||||
|
||||
// @ts-ignore
|
||||
let videoInput = mediaHandler.videoInput;
|
||||
|
||||
if (!videoConnected && videoInputs.length > 0) {
|
||||
videoInput = videoInputs[0].deviceId;
|
||||
}
|
||||
|
||||
const audioOutputs = devices.filter(
|
||||
(device) => device.kind === "audiooutput"
|
||||
);
|
||||
let audioOutput = undefined;
|
||||
|
||||
if (
|
||||
mediaPreferences &&
|
||||
audioOutputs.some(
|
||||
(device) => device.deviceId === mediaPreferences.audioOutput
|
||||
)
|
||||
) {
|
||||
audioOutput = mediaPreferences.audioOutput;
|
||||
}
|
||||
|
||||
if (
|
||||
// @ts-ignore
|
||||
(mediaHandler.videoInput && mediaHandler.videoInput !== videoInput) ||
|
||||
// @ts-ignore
|
||||
mediaHandler.audioInput !== audioInput
|
||||
) {
|
||||
mediaHandler.setMediaInputs(audioInput, videoInput);
|
||||
}
|
||||
|
||||
updateMediaPreferences({ audioInput, videoInput, audioOutput });
|
||||
|
||||
setState({
|
||||
audioInput,
|
||||
videoInput,
|
||||
audioOutput,
|
||||
audioInputs,
|
||||
videoInputs,
|
||||
audioOutputs,
|
||||
});
|
||||
});
|
||||
client.getMediaHandler().stopAllStreams();
|
||||
};
|
||||
}
|
||||
updateDevices();
|
||||
|
||||
mediaHandler.on(MediaHandlerEvent.LocalStreamsChanged, updateDevices);
|
||||
navigator.mediaDevices.addEventListener("devicechange", updateDevices);
|
||||
|
||||
return () => {
|
||||
mediaHandler.removeListener(
|
||||
MediaHandlerEvent.LocalStreamsChanged,
|
||||
updateDevices
|
||||
);
|
||||
navigator.mediaDevices.removeEventListener("devicechange", updateDevices);
|
||||
mediaHandler.stopAllStreams();
|
||||
};
|
||||
}, [client]);
|
||||
}, [client, updateDevices]);
|
||||
|
||||
const setAudioInput: (deviceId: string) => void = useCallback(
|
||||
(deviceId: string) => {
|
||||
updateMediaPreferences({ audioInput: deviceId });
|
||||
setState((prevState) => ({ ...prevState, audioInput: deviceId }));
|
||||
client.getMediaHandler().setAudioInput(deviceId);
|
||||
client?.getMediaHandler().setAudioInput(deviceId);
|
||||
},
|
||||
[client]
|
||||
);
|
||||
@@ -245,6 +230,7 @@ export function MediaHandlerProvider({ client, children }: Props): JSX.Element {
|
||||
audioOutput,
|
||||
audioOutputs,
|
||||
setAudioOutput,
|
||||
useDeviceNames,
|
||||
}),
|
||||
[
|
||||
audioInput,
|
||||
@@ -256,6 +242,7 @@ export function MediaHandlerProvider({ client, children }: Props): JSX.Element {
|
||||
audioOutput,
|
||||
audioOutputs,
|
||||
setAudioOutput,
|
||||
useDeviceNames,
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@@ -17,6 +17,11 @@ limitations under the License.
|
||||
import { EventEmitter } from "events";
|
||||
import { useMemo, useState, useEffect, useCallback } from "react";
|
||||
|
||||
import { PosthogAnalytics } from "../analytics/PosthogAnalytics";
|
||||
|
||||
type Setting<T> = [T, (value: T) => void];
|
||||
type DisableableSetting<T> = [T, ((value: T) => void) | null];
|
||||
|
||||
// Bus to notify other useSetting consumers when a setting is changed
|
||||
export const settingsBus = new EventEmitter();
|
||||
|
||||
@@ -24,10 +29,7 @@ const getSettingKey = (name: string): string => {
|
||||
return `matrix-setting-${name}`;
|
||||
};
|
||||
// Like useState, but reads from and persists the value to localStorage
|
||||
const useSetting = <T>(
|
||||
name: string,
|
||||
defaultValue: T
|
||||
): [T, (value: T) => void] => {
|
||||
const useSetting = <T>(name: string, defaultValue: T): Setting<T> => {
|
||||
const key = useMemo(() => getSettingKey(name), [name]);
|
||||
|
||||
const [value, setValue] = useState<T>(() => {
|
||||
@@ -65,7 +67,7 @@ export const setSetting = <T>(name: string, newValue: T) => {
|
||||
settingsBus.emit(name, newValue);
|
||||
};
|
||||
|
||||
export const canEnableSpatialAudio = () => {
|
||||
const canEnableSpatialAudio = () => {
|
||||
const { userAgent } = navigator;
|
||||
// Spatial audio means routing audio through audio contexts. On Chrome,
|
||||
// this bypasses the AEC processor and so breaks echo cancellation.
|
||||
@@ -79,17 +81,24 @@ export const canEnableSpatialAudio = () => {
|
||||
return userAgent.includes("Firefox");
|
||||
};
|
||||
|
||||
export const useSpatialAudio = (): [boolean, (val: boolean) => void] => {
|
||||
export const useSpatialAudio = (): DisableableSetting<boolean> => {
|
||||
const settingVal = useSetting("spatial-audio", false);
|
||||
if (canEnableSpatialAudio()) return settingVal;
|
||||
|
||||
return [false, (_: boolean) => {}];
|
||||
return [false, null];
|
||||
};
|
||||
|
||||
export const useShowInspector = () => useSetting("show-inspector", false);
|
||||
export const useOptInAnalytics = () => useSetting("opt-in-analytics", false);
|
||||
export const useKeyboardShortcuts = () =>
|
||||
useSetting("keyboard-shortcuts", true);
|
||||
|
||||
// null = undecided
|
||||
export const useOptInAnalytics = (): DisableableSetting<boolean | null> => {
|
||||
const settingVal = useSetting<boolean | null>("opt-in-analytics", null);
|
||||
if (PosthogAnalytics.instance.isEnabled()) return settingVal;
|
||||
|
||||
return [false, null];
|
||||
};
|
||||
|
||||
export const useNewGrid = () => useSetting("new-grid", false);
|
||||
|
||||
export const useDeveloperSettingsTab = () =>
|
||||
useSetting("developer-settings-tab", false);
|
||||
|
||||
@@ -25,12 +25,14 @@ limitations under the License.
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0 auto 24px auto;
|
||||
gap: 16px;
|
||||
overflow: scroll;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.tab {
|
||||
max-width: 190px;
|
||||
min-width: fit-content;
|
||||
height: 32px;
|
||||
box-sizing: border-box;
|
||||
border-radius: 8px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
@@ -38,6 +40,7 @@ limitations under the License.
|
||||
padding: 0 8px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-body);
|
||||
}
|
||||
|
||||
.tab > * {
|
||||
@@ -78,22 +81,26 @@ limitations under the License.
|
||||
|
||||
@media (min-width: 800px) {
|
||||
.tab {
|
||||
width: 200px;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
.tab > * {
|
||||
margin: 0 16px 0 0;
|
||||
margin: 0 12px 0 0;
|
||||
}
|
||||
|
||||
.tabContainer {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
margin: 27px 16px;
|
||||
padding: 20px 18px;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.tabList {
|
||||
flex-direction: column;
|
||||
margin-bottom: 0;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.tabPanel {
|
||||
|
||||
@@ -14,47 +14,55 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { useCallback, useState } from "react";
|
||||
import { RefObject, useCallback, useRef } from "react";
|
||||
|
||||
import { getSetting } from "./settings/useSetting";
|
||||
import { useEventTarget } from "./useEvents";
|
||||
|
||||
/**
|
||||
* Determines whether focus is in the same part of the tree as the given
|
||||
* element (specifically, if an ancestor or descendant of it is focused).
|
||||
*/
|
||||
const mayReceiveKeyEvents = (e: HTMLElement): boolean => {
|
||||
const focusedElement = document.activeElement;
|
||||
return (
|
||||
focusedElement !== null &&
|
||||
(focusedElement.contains(e) || e.contains(focusedElement))
|
||||
);
|
||||
};
|
||||
|
||||
export function useCallViewKeyboardShortcuts(
|
||||
enabled: boolean,
|
||||
focusElement: RefObject<HTMLElement | null>,
|
||||
toggleMicrophoneMuted: () => void,
|
||||
toggleLocalVideoMuted: () => void,
|
||||
setMicrophoneMuted: (muted: boolean) => void
|
||||
) {
|
||||
const [spacebarHeld, setSpacebarHeld] = useState(false);
|
||||
const spacebarHeld = useRef(false);
|
||||
|
||||
// These event handlers are set on the window because we want users to be able
|
||||
// to trigger them without going to the trouble of focusing something
|
||||
|
||||
useEventTarget(
|
||||
window,
|
||||
"keydown",
|
||||
useCallback(
|
||||
(event: KeyboardEvent) => {
|
||||
if (!enabled) return;
|
||||
// Check if keyboard shortcuts are enabled
|
||||
const keyboardShortcuts = getSetting("keyboard-shortcuts", true);
|
||||
if (!keyboardShortcuts) {
|
||||
return;
|
||||
}
|
||||
if (focusElement.current === null) return;
|
||||
if (!mayReceiveKeyEvents(focusElement.current)) return;
|
||||
|
||||
if (event.key === "m") {
|
||||
toggleMicrophoneMuted();
|
||||
} else if (event.key == "v") {
|
||||
toggleLocalVideoMuted();
|
||||
} else if (event.key === " " && !spacebarHeld) {
|
||||
setSpacebarHeld(true);
|
||||
} else if (event.key === " " && !spacebarHeld.current) {
|
||||
spacebarHeld.current = true;
|
||||
setMicrophoneMuted(false);
|
||||
}
|
||||
},
|
||||
[
|
||||
enabled,
|
||||
spacebarHeld,
|
||||
focusElement,
|
||||
toggleLocalVideoMuted,
|
||||
toggleMicrophoneMuted,
|
||||
setMicrophoneMuted,
|
||||
setSpacebarHeld,
|
||||
]
|
||||
)
|
||||
);
|
||||
@@ -64,19 +72,15 @@ export function useCallViewKeyboardShortcuts(
|
||||
"keyup",
|
||||
useCallback(
|
||||
(event: KeyboardEvent) => {
|
||||
if (!enabled) return;
|
||||
// Check if keyboard shortcuts are enabled
|
||||
const keyboardShortcuts = getSetting("keyboard-shortcuts", true);
|
||||
if (!keyboardShortcuts) {
|
||||
return;
|
||||
}
|
||||
if (focusElement.current === null) return;
|
||||
if (!mayReceiveKeyEvents(focusElement.current)) return;
|
||||
|
||||
if (event.key === " ") {
|
||||
setSpacebarHeld(false);
|
||||
spacebarHeld.current = false;
|
||||
setMicrophoneMuted(true);
|
||||
}
|
||||
},
|
||||
[enabled, setMicrophoneMuted, setSpacebarHeld]
|
||||
[focusElement, setMicrophoneMuted]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -84,10 +88,10 @@ export function useCallViewKeyboardShortcuts(
|
||||
window,
|
||||
"blur",
|
||||
useCallback(() => {
|
||||
if (spacebarHeld) {
|
||||
setSpacebarHeld(false);
|
||||
if (spacebarHeld.current) {
|
||||
spacebarHeld.current = false;
|
||||
setMicrophoneMuted(true);
|
||||
}
|
||||
}, [setMicrophoneMuted, setSpacebarHeld, spacebarHeld])
|
||||
}, [setMicrophoneMuted, spacebarHeld])
|
||||
);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user