支持v4l2编码,arm机器原生构建,docker镜像换archlinux,允许初始化时禁用HID

This commit is contained in:
a15355447898a
2026-01-23 17:11:19 +08:00
parent e7d8c93bff
commit 89072ad58d
9 changed files with 107 additions and 50 deletions

View File

@@ -1323,6 +1323,7 @@ onMounted(async () => {
<select id="hid-backend" v-model="config.hid_backend" class="w-full h-9 px-3 rounded-md border border-input bg-background text-sm">
<option value="ch9329">CH9329 (Serial)</option>
<option value="otg">USB OTG</option>
<option value="none">{{ t('common.disabled') }}</option>
</select>
</div>
<div v-if="config.hid_backend === 'ch9329'" class="space-y-2">

View File

@@ -319,6 +319,10 @@ watch(hidBackend, (newBackend) => {
if (newBackend === 'otg' && !otgUdc.value && devices.value.udc.length > 0) {
otgUdc.value = devices.value.udc[0]?.name || ''
}
if (newBackend === 'none') {
ch9329Port.value = ''
otgUdc.value = ''
}
})
onMounted(async () => {
@@ -341,6 +345,11 @@ onMounted(async () => {
otgUdc.value = result.udc[0].name
}
// If no HID devices exist, default to disabled to avoid blocking setup
if (result.serial.length === 0 && result.udc.length === 0) {
hidBackend.value = 'none'
}
// Auto-select audio device if available (and no video device to trigger watch)
if (result.audio.length > 0 && !audioDevice.value) {
// Prefer HDMI audio device
@@ -357,6 +366,10 @@ onMounted(async () => {
// Use defaults
}
if (devices.value.serial.length === 0 && devices.value.udc.length === 0) {
hidBackend.value = 'none'
}
// Load encoder backends
try {
const codecsResult = await streamApi.getCodecs()
@@ -864,6 +877,7 @@ const stepIcons = [User, Video, Keyboard, Puzzle]
CH9329 ({{ t('setup.serialHid') }})
</SelectItem>
<SelectItem value="otg">USB OTG</SelectItem>
<SelectItem value="none">{{ t('setup.disableHid') }}</SelectItem>
</SelectContent>
</Select>
</div>
@@ -931,6 +945,10 @@ const stepIcons = [User, Video, Keyboard, Puzzle]
</p>
</div>
</div>
<p v-if="hidBackend === 'none'" class="text-xs text-muted-foreground">
{{ t('setup.hidDisabledHint') }}
</p>
</div>
<!-- Step 4: Extensions Settings -->