fix: 🐛 Resolve default recording error

This commit is contained in:
viarotel 2024-10-29 09:05:23 +08:00
parent f60245b11d
commit 358064ecd4

View File

@ -8,8 +8,8 @@ import { openFloatControl } from '$/utils/device/index.js'
const recordModel = { const recordModel = {
default: { default: {
excludes: '', excludes: [],
command: '', commands: [],
extname: config => config['--record-format'] || 'mp4', extname: config => config['--record-format'] || 'mp4',
}, },
audio: { audio: {
@ -64,17 +64,21 @@ export default {
isRecord: ['default', 'audio'].includes(this.recordType), isRecord: ['default', 'audio'].includes(this.recordType),
isCamera: ['camera'].includes(this.recordType), isCamera: ['camera'].includes(this.recordType),
excludes: [ excludes: [
'--otg', ...new Set([
'--mouse=aoa', '--otg',
'--keyboard=aoa', '--mouse=aoa',
'--show-touches', '--keyboard=aoa',
...this.activeModel.excludes, '--show-touches',
...this.activeModel.excludes,
]),
], ],
}) })
args += ` ${this.activeModel.commands.join(' ')}` const commands = this.activeModel.commands || []
console.log('args', args) if (commands.length) {
args += ` ${commands.join(' ')}`
}
try { try {
const recording = this.$scrcpy.record(row.id, { const recording = this.$scrcpy.record(row.id, {