add virtualcam toggle

This commit is contained in:
2025-07-01 17:03:28 +01:00
parent 90bf51f363
commit 6545221ccc
6 changed files with 53 additions and 16 deletions

View File

@@ -19,6 +19,9 @@ const commands = {
},
screenshot: {
desc: 'Take a screenshot'
},
virtualcam: {
desc: 'Manage virtual camera settings'
}
}

View File

@@ -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 }

View File

@@ -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
View 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 }