aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/resource
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-11-25 20:59:54 +0100
committermetamuffin <metamuffin@disroot.org>2024-11-25 20:59:54 +0100
commit440c12ac024e84f166eaa4115ef6715c39de2eea (patch)
tree11f4a32e3478d6babee7fb30349c47d7f7983168 /client-web/source/resource
parent55f58e1d7017ef0038840e2a9d506cfaf85e8ea8 (diff)
downloadkeks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar
keks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar.bz2
keks-meet-440c12ac024e84f166eaa4115ef6715c39de2eea.tar.zst
replace window usage with globalThis
Diffstat (limited to 'client-web/source/resource')
-rw-r--r--client-web/source/resource/track.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client-web/source/resource/track.ts b/client-web/source/resource/track.ts
index 56c2b30..e2af5e9 100644
--- a/client-web/source/resource/track.ts
+++ b/client-web/source/resource/track.ts
@@ -211,7 +211,7 @@ function check_volume(stream: MediaStream, cb: (vol: number) => void) {
export async function create_camera_res() {
log("media", "requesting user media (camera)")
- const user_media = await window.navigator.mediaDevices.getUserMedia({
+ const user_media = await globalThis.navigator.mediaDevices.getUserMedia({
video: {
facingMode: { ideal: PREFS.camera_facing_mode },
frameRate: { ideal: PREFS.video_fps },
@@ -223,7 +223,7 @@ export async function create_camera_res() {
export async function create_screencast_res() {
log("media", "requesting user media (screen)")
- const user_media = await window.navigator.mediaDevices.getDisplayMedia({
+ const user_media = await globalThis.navigator.mediaDevices.getDisplayMedia({
video: {
frameRate: { ideal: PREFS.video_fps },
width: { ideal: PREFS.video_resolution }
@@ -235,7 +235,7 @@ export async function create_screencast_res() {
export async function create_mic_res() {
log("media", "requesting user media (audio)")
- const user_media = await window.navigator.mediaDevices.getUserMedia({
+ const user_media = await globalThis.navigator.mediaDevices.getUserMedia({
audio: {
channelCount: { ideal: 1 },
noiseSuppression: { ideal: PREFS.rnnoise ? false : PREFS.native_noise_suppression },