mirror of
https://gitee.com/viarotel-org/escrcpy.git
synced 2024-12-02 03:07:35 +08:00
perf: ♻️ Optimize recording
This commit is contained in:
parent
0f7209064b
commit
f4dfb2ca98
@ -176,6 +176,8 @@
|
||||
"preferences.window.disable-screen-saver.placeholder": "Disable computer screensaver",
|
||||
"preferences.record.name": "Recording",
|
||||
"preferences.record.format.name": "Format",
|
||||
"preferences.record.time-limit.name": "Recording Time Limit",
|
||||
"preferences.record.time-limit.placeholder": "Default No time limit",
|
||||
"preferences.record.format.placeholder": "Default *.mp4",
|
||||
"preferences.record.lock-video-orientation.name": "Video Direction",
|
||||
"preferences.record.lock-video-orientation.placeholder": "Default Device Orientation",
|
||||
|
@ -177,6 +177,8 @@
|
||||
"preferences.record.name": "音视频录制",
|
||||
"preferences.record.format.name": "录制视频格式",
|
||||
"preferences.record.format.placeholder": "默认为 *.mp4 格式",
|
||||
"preferences.record.time-limit.name": "录制时长",
|
||||
"preferences.record.time-limit.placeholder": "默认不限时长",
|
||||
"preferences.record.lock-video-orientation.name": "录制视频方向",
|
||||
"preferences.record.lock-video-orientation.placeholder": "默认为设备默认方向",
|
||||
"preferences.record.disable-video.name": "禁用视频录制",
|
||||
|
@ -22,6 +22,10 @@ export const usePreferenceStore = defineStore({
|
||||
window.appStore.get('scrcpy.deviceScope') || 'global',
|
||||
)
|
||||
|
||||
const recordKeys = Object.values(model?.record?.children || {}).map(
|
||||
item => item.field,
|
||||
)
|
||||
|
||||
return {
|
||||
model: cloneDeep(model),
|
||||
data: { ...getDefaultData() },
|
||||
@ -31,14 +35,7 @@ export const usePreferenceStore = defineStore({
|
||||
'--audio-code',
|
||||
...getOtherFields('scrcpy'),
|
||||
],
|
||||
recordKeys: [
|
||||
'--record-format',
|
||||
'--lock-video-orientation',
|
||||
'--no-video',
|
||||
'--no-audio',
|
||||
'--no-video-playback',
|
||||
'--no-audio-playback',
|
||||
],
|
||||
recordKeys,
|
||||
}
|
||||
},
|
||||
getters: {},
|
||||
|
@ -19,6 +19,14 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
timeLimit: {
|
||||
label: 'preferences.record.time-limit.name',
|
||||
field: '--time-limit',
|
||||
type: 'Input.number',
|
||||
value: '',
|
||||
placeholder: 'preferences.record.time-limit.placeholder',
|
||||
append: 's',
|
||||
},
|
||||
lockVideoOrientation: {
|
||||
label: 'preferences.record.lock-video-orientation.name',
|
||||
field: '--lock-video-orientation',
|
||||
@ -32,13 +40,13 @@ export default {
|
||||
{ label: '90°', value: '3' },
|
||||
],
|
||||
},
|
||||
// noVideo: {
|
||||
// label: 'preferences.record.disable-video.name',
|
||||
// field: '--no-video',
|
||||
// type: 'Switch',
|
||||
// value: null,
|
||||
// placeholder: 'preferences.record.disable-video.placeholder',
|
||||
// },
|
||||
noVideo: {
|
||||
label: 'preferences.record.disable-video.name',
|
||||
field: '--no-video',
|
||||
type: 'Switch',
|
||||
value: null,
|
||||
placeholder: 'preferences.record.disable-video.placeholder',
|
||||
},
|
||||
noAudio: {
|
||||
label: 'preferences.record.disable-audio.name',
|
||||
field: '--no-audio',
|
||||
@ -46,14 +54,14 @@ export default {
|
||||
value: null,
|
||||
placeholder: 'preferences.record.disable-audio.placeholder',
|
||||
},
|
||||
// noVideoPlayback: {
|
||||
// label: 'preferences.record.no-video-playback.name',
|
||||
// field: '--no-video-playback',
|
||||
// type: 'Switch',
|
||||
// value: null,
|
||||
// placeholder: 'preferences.record.no-video-playback.placeholder',
|
||||
// tips: 'preferences.record.no-video-playback.tips',
|
||||
// },
|
||||
noVideoPlayback: {
|
||||
label: 'preferences.record.no-video-playback.name',
|
||||
field: '--no-video-playback',
|
||||
type: 'Switch',
|
||||
value: null,
|
||||
placeholder: 'preferences.record.no-video-playback.placeholder',
|
||||
tips: 'preferences.record.no-video-playback.tips',
|
||||
},
|
||||
noAudioPlayback: {
|
||||
label: 'preferences.record.no-audio-playback.name',
|
||||
field: '--no-audio-playback',
|
||||
|
Loading…
Reference in New Issue
Block a user