mirror of
https://github.com/onyx-and-iris/meld-cli.git
synced 2026-04-09 02:43:35 +00:00
add virtualcam toggle
This commit is contained in:
@@ -19,6 +19,9 @@ const commands = {
|
||||
},
|
||||
screenshot: {
|
||||
desc: 'Take a screenshot'
|
||||
},
|
||||
virtualcam: {
|
||||
desc: 'Manage virtual camera settings'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ const clipHelp = meowHelp({
|
||||
defaults: false
|
||||
})
|
||||
|
||||
async function saveClip (channel) {
|
||||
async function clipSave (channel) {
|
||||
await channel.objects.meld.sendCommand('meld.recordClip')
|
||||
return 'Clip command sent successfully.'
|
||||
return 'Clip saved successfully.'
|
||||
}
|
||||
|
||||
export { clipHelp, saveClip }
|
||||
export { clipHelp, clipSave }
|
||||
|
||||
@@ -18,9 +18,9 @@ const screenshotHelp = meowHelp({
|
||||
defaults: false
|
||||
})
|
||||
|
||||
async function takeScreenshot (channel) {
|
||||
async function screenshotTake (channel) {
|
||||
await channel.objects.meld.sendCommand('meld.screenshot')
|
||||
return 'Screenshot command sent successfully.'
|
||||
return 'Screenshot taken successfully.'
|
||||
}
|
||||
|
||||
export { screenshotHelp, takeScreenshot }
|
||||
export { screenshotHelp, screenshotTake }
|
||||
|
||||
30
utils/virtualcam.js
Normal file
30
utils/virtualcam.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import meowHelp from 'cli-meow-help'
|
||||
|
||||
const commands = {
|
||||
toggle: {
|
||||
desc: 'Toggle the virtual camera on or off'
|
||||
}
|
||||
}
|
||||
|
||||
const flags = {
|
||||
help: {
|
||||
type: 'boolean',
|
||||
shortFlag: 'h',
|
||||
desc: 'Display help information'
|
||||
}
|
||||
}
|
||||
|
||||
const virtualcamHelp = meowHelp({
|
||||
name: 'virtualcam',
|
||||
flags,
|
||||
commands,
|
||||
desc: 'Manage virtual camera settings in Meld',
|
||||
defaults: false
|
||||
})
|
||||
|
||||
async function virtualcamToggle (channel) {
|
||||
await channel.objects.meld.sendCommand('meld.toggleVirtualCameraAction')
|
||||
return 'Virtual camera toggled successfully.'
|
||||
}
|
||||
|
||||
export { virtualcamHelp, virtualcamToggle }
|
||||
Reference in New Issue
Block a user