feat(web-client): allow users to pick screen share bitrate limit

Add a bitrate select to the screen share settings dialog (auto by
resolution, or a fixed 1.5/3/5/8/12 Mbps cap), persist the choice in
localStorage, and pass it through ScreenShareOutputSettings.maxBitrate
so configureScreenShareVideoSender applies the user-chosen budget
instead of only the height-scaled default.
This commit is contained in:
LainHE authored and illusia committed 2026-10-12 13:51:49 +08:00
1 parent 458f95c2dc
commit d919dbd82a
4 files changed
+107 -9

No files matched your search

@@ -61,6 +61,19 @@
></select
></label
>
<label
><span>{{ t("screenShareBitrate") }}</span
><select
v-model="screenShareBitratePreset"
:aria-label="t('screenShareBitrate')"
><option
v-for="option in screenShareBitrateOptions"
:key="option.value"
:value="option.value"
>{{ t(option.label) }}</option
></select
></label
>
</div>
<p
class="screen-share-settings-note"
@@ -95,8 +108,8 @@ import { ref } from "vue";
import Icon from "../Icon.vue";
import { useDialogFocus } from "../../composables/useDialogFocus.js";
import type { useWebClientScreenShare } from "../../composables/useWebClientScreenShare.js";
const props = defineProps<{ model: Pick<ReturnType<typeof useWebClientScreenShare>, "resolutionOptions" | "frameRateOptions" | "resolutionPreset" | "frameRate" | "startWithSettings">; t: (key: string) => string }>();
const { resolutionOptions: screenShareResolutionOptions, frameRateOptions: screenShareFrameRateOptions, resolutionPreset: screenShareResolutionPreset, frameRate: screenShareFrameRate, startWithSettings: startScreenShareWithSettings } = props.model;
const props = defineProps<{ model: Pick<ReturnType<typeof useWebClientScreenShare>, "resolutionOptions" | "frameRateOptions" | "bitrateOptions" | "resolutionPreset" | "frameRate" | "bitratePreset" | "startWithSettings">; t: (key: string) => string }>();
const { resolutionOptions: screenShareResolutionOptions, frameRateOptions: screenShareFrameRateOptions, bitrateOptions: screenShareBitrateOptions, resolutionPreset: screenShareResolutionPreset, frameRate: screenShareFrameRate, bitratePreset: screenShareBitratePreset, startWithSettings: startScreenShareWithSettings } = props.model;
const emit = defineEmits<{ close: [] }>();
const dialog = ref<HTMLElement | null>(null);
const { onDialogKeydown } = useDialogFocus(dialog, () => emit("close"));