aboutsummaryrefslogtreecommitdiff
path: root/QSCapturaPlugin/Commands/StartRecordingCommand.m
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-09-15 11:25:11 +0200
committerRuben Beltran del Rio <git@r.bdr.sh>2025-09-15 11:25:11 +0200
commit07195976ce0106a17ed57b08d2fb10d0c3020edb (patch)
tree654e52561e0ca2795a6fde7961822289ef616146 /QSCapturaPlugin/Commands/StartRecordingCommand.m
Initial commitHEADmain
Diffstat (limited to 'QSCapturaPlugin/Commands/StartRecordingCommand.m')
-rw-r--r--QSCapturaPlugin/Commands/StartRecordingCommand.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/QSCapturaPlugin/Commands/StartRecordingCommand.m b/QSCapturaPlugin/Commands/StartRecordingCommand.m
new file mode 100644
index 0000000..4a3f1f3
--- /dev/null
+++ b/QSCapturaPlugin/Commands/StartRecordingCommand.m
@@ -0,0 +1,23 @@
+#import "StartRecordingCommand.h"
+#import <ApplicationServices/ApplicationServices.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation StartRecordingCommand
+
+- (QSObject *)startRecording:(QSObject *)directObject
+{
+ NSString *capturaURL = @"captura:?action=record";
+ NSURL *url = [NSURL URLWithString:capturaURL];
+ if (url) {
+ [[NSWorkspace sharedWorkspace] openURL:url];
+ } else {
+ NSLog(@"Failed to create valid URL");
+ }
+
+ return directObject;
+}
+
+@end
+
+NS_ASSUME_NONNULL_END