Files
threadnet-call/vite-embedded.config.ts
T
Thore Cimbal f845d81e95 fix: Remove forced VP9 codec preference - broke calls in production
Setting video_codec: vp9 resulted in no audio/video being transmitted
in real calls (2026-07-28), despite server-side codec regression
fallback to VP8 appearing to work in LiveKit SFU logs. Root cause not
further isolated beyond this. Leaving video_codec unset (defaults to
vp8) with the same 1440p/60fps/bitrate bump confirmed working.
2026-07-28 01:46:06 +02:00

55 lines
1.7 KiB
TypeScript

/*
Copyright 2025 New Vector Ltd.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { defineConfig, mergeConfig } from "vite";
import generateFile from "vite-plugin-generate-file";
import fullConfig from "./vite.config";
const base = "./";
// Config for embedded deployments (possibly hosted under a non-root path)
export default defineConfig((env) =>
mergeConfig(
fullConfig({ ...env, packageType: "embedded" }),
defineConfig({
base, // Use relative URLs to allow the app to be hosted under any path
publicDir: false, // Don't serve the public directory which only contains the favicon
plugins: [
generateFile([
{
type: "json",
output: "./config.json",
data: {
matrix_rtc_session: {
wait_for_key_rotation_ms: 5000,
delayed_leave_event_restart_ms: 4000,
delayed_leave_event_delay_ms: 18000,
},
media_quality: {
// video_codec intentionally left unset (defaults to vp8) - setting it
// to "vp9" broke calls entirely in production (2026-07-28, no audio/video
// transmitted). Root cause not confirmed; revisit once isolated.
video: {
max_resolution: 1440,
max_bitrate: 8_000_000,
max_framerate: 60,
},
screen_share: {
max_resolution: 1440,
max_bitrate: 6_000_000,
max_framerate: 30,
},
},
},
},
]),
],
}),
),
);