Skip to content

Commit

Permalink
fix: 🐛 Resolve default recording error
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Oct 29, 2024
1 parent f60245b commit 358064e
Showing 1 changed file with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { openFloatControl } from '$/utils/device/index.js'
const recordModel = {
default: {
excludes: '',
command: '',
excludes: [],
commands: [],
extname: config => config['--record-format'] || 'mp4',
},
audio: {
Expand Down Expand Up @@ -64,17 +64,21 @@ export default {
isRecord: ['default', 'audio'].includes(this.recordType),
isCamera: ['camera'].includes(this.recordType),
excludes: [
'--otg',
'--mouse=aoa',
'--keyboard=aoa',
'--show-touches',
...this.activeModel.excludes,
...new Set([
'--otg',
'--mouse=aoa',
'--keyboard=aoa',
'--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 {
const recording = this.$scrcpy.record(row.id, {
Expand Down

0 comments on commit 358064e

Please sign in to comment.