]>
Commit | Line | Data |
---|---|---|
377442f2 RBR |
1 | import Foundation |
2 | ||
153f3309 | 3 | @objc(ScriptedPreferences) |
377442f2 RBR |
4 | class ScriptedPreferences: NSObject { |
5 | @objc dynamic var fps: Int { | |
6 | get { | |
7 | CapturaSettings.frameRate | |
8 | } | |
9 | set { | |
10 | CapturaSettings.frameRate = newValue | |
11 | } | |
12 | } | |
13 | @objc dynamic var outputs: String { | |
14 | get { | |
15 | CapturaSettings.outputFormats.toString() | |
16 | } | |
17 | set { | |
18 | CapturaSettings.outputFormats = OutputFormatSetting(newValue) ?? .gifOnly | |
19 | } | |
20 | } | |
21 | ||
22 | @objc dynamic var backend: String { | |
23 | get { | |
24 | CapturaSettings.backend?.absoluteString ?? "" | |
25 | } | |
26 | set { | |
27 | CapturaSettings.backend = URL(string: newValue) | |
28 | } | |
29 | } | |
30 | ||
31 | @objc dynamic var backend_output: String { | |
32 | get { | |
33 | CapturaSettings.backendFormat.toString() | |
34 | } | |
35 | set { | |
36 | CapturaSettings.backendFormat = OutputFormatSetting(newValue) ?? .gifOnly | |
37 | } | |
38 | } | |
39 | ||
40 | @objc dynamic var keep_local_files: Bool { | |
41 | get { | |
42 | CapturaSettings.shouldKeepLocalFiles | |
43 | } | |
44 | set { | |
45 | CapturaSettings.shouldKeepLocalFiles = newValue | |
46 | } | |
47 | } | |
48 | } |