mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-03-15 07:26:44 +08:00
支持v4l2编码,arm机器原生构建,docker镜像换archlinux,允许初始化时禁用HID
This commit is contained in:
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user