obsws 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/obsws/event.rb +19 -27
- data/lib/obsws/req.rb +8 -2
- data/lib/obsws/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ac01e29c9776d0288fc46118847ca4054596a940173b68aec224fb888a7d6ed
|
4
|
+
data.tar.gz: baef83a80ef328743d2579a74d31d7e9b6bc46203f6a5e0af4072dfa08a26ed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71f5a718e0dfaec48b05f4f8a1e49637f0d60a20f56d8870987588cfe4ae1938b67d04043fae20cc612d1f61d8d48b22cff3a908ffe045fb0b1bbf432736f00a
|
7
|
+
data.tar.gz: 7a95faceaa4022bab0c8045b7068bca4ceee6a86a4e21c303e34a589cbc80d45b358ba2f12a365c8c45abed5c2eae4a5b49ae4ea97ac45c06bcf743ab8a796a4
|
data/lib/obsws/event.rb
CHANGED
@@ -7,38 +7,30 @@ module OBSWS
|
|
7
7
|
module Events
|
8
8
|
module SUBS
|
9
9
|
NONE = 0
|
10
|
-
GENERAL =
|
11
|
-
CONFIG =
|
12
|
-
SCENES =
|
13
|
-
INPUTS =
|
14
|
-
TRANSITIONS =
|
15
|
-
FILTERS =
|
16
|
-
OUTPUTS =
|
17
|
-
SCENEITEMS =
|
18
|
-
MEDIAINPUTS =
|
19
|
-
VENDORS =
|
20
|
-
UI =
|
10
|
+
GENERAL = 1 << 0
|
11
|
+
CONFIG = 1 << 1
|
12
|
+
SCENES = 1 << 2
|
13
|
+
INPUTS = 1 << 3
|
14
|
+
TRANSITIONS = 1 << 4
|
15
|
+
FILTERS = 1 << 5
|
16
|
+
OUTPUTS = 1 << 6
|
17
|
+
SCENEITEMS = 1 << 7
|
18
|
+
MEDIAINPUTS = 1 << 8
|
19
|
+
VENDORS = 1 << 9
|
20
|
+
UI = 1 << 10
|
21
21
|
|
22
|
-
|
23
|
-
GENERAL | CONFIG | SCENES | INPUTS | TRANSITIONS | FILTERS | OUTPUTS |
|
22
|
+
LOW_VOLUME = GENERAL | CONFIG | SCENES | INPUTS | TRANSITIONS | FILTERS | OUTPUTS |
|
24
23
|
SCENEITEMS | MEDIAINPUTS | VENDORS | UI
|
25
|
-
end
|
26
24
|
|
27
|
-
INPUTVOLUMEMETERS =
|
28
|
-
INPUTACTIVESTATECHANGED =
|
29
|
-
INPUTSHOWSTATECHANGED =
|
30
|
-
SCENEITEMTRANSFORMCHANGED =
|
25
|
+
INPUTVOLUMEMETERS = 1 << 16
|
26
|
+
INPUTACTIVESTATECHANGED = 1 << 17
|
27
|
+
INPUTSHOWSTATECHANGED = 1 << 18
|
28
|
+
SCENEITEMTRANSFORMCHANGED = 1 << 19
|
31
29
|
|
32
|
-
|
33
|
-
INPUTVOLUMEMETERS | INPUTACTIVESTATECHANGED | INPUTSHOWSTATECHANGED |
|
30
|
+
HIGH_VOLUME = INPUTVOLUMEMETERS | INPUTACTIVESTATECHANGED | INPUTSHOWSTATECHANGED |
|
34
31
|
SCENEITEMTRANSFORMCHANGED
|
35
|
-
end
|
36
|
-
|
37
|
-
def all
|
38
|
-
low_volume | high_volume
|
39
|
-
end
|
40
32
|
|
41
|
-
|
33
|
+
ALL = LOW_VOLUME | HIGH_VOLUME
|
42
34
|
end
|
43
35
|
|
44
36
|
module Callbacks
|
@@ -75,7 +67,7 @@ module OBSWS
|
|
75
67
|
include Mixin::OPCodes
|
76
68
|
|
77
69
|
def initialize(**kwargs)
|
78
|
-
kwargs[:subs]
|
70
|
+
kwargs[:subs] ||= SUBS::LOW_VOLUME
|
79
71
|
@base_client = Base.new(**kwargs)
|
80
72
|
LOGGER.info("#{self} succesfully identified with server")
|
81
73
|
@base_client.add_observer(self)
|
data/lib/obsws/req.rb
CHANGED
@@ -77,7 +77,10 @@ module OBSWS
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def call_vendor_request(name, type_, data = nil)
|
80
|
-
|
80
|
+
payload = { vendorName: name, requestType: type_ }
|
81
|
+
payload[:requestData] = data if data
|
82
|
+
resp = call("CallVendorRequest", payload)
|
83
|
+
Mixin::Response.new(resp, resp.keys)
|
81
84
|
end
|
82
85
|
|
83
86
|
def get_hotkey_list
|
@@ -261,7 +264,7 @@ module OBSWS
|
|
261
264
|
end
|
262
265
|
|
263
266
|
def get_group_list
|
264
|
-
resp = call("
|
267
|
+
resp = call("GetGroupList")
|
265
268
|
Mixin::Response.new(resp, resp.keys)
|
266
269
|
end
|
267
270
|
|
@@ -329,6 +332,7 @@ module OBSWS
|
|
329
332
|
|
330
333
|
def get_special_inputs
|
331
334
|
resp = call("GetSpecialInputs")
|
335
|
+
Mixin::Response.new(resp, resp.keys)
|
332
336
|
end
|
333
337
|
|
334
338
|
def create_input(
|
@@ -346,6 +350,7 @@ module OBSWS
|
|
346
350
|
sceneItemEnabled: scene_item_enabled
|
347
351
|
}
|
348
352
|
resp = call("CreateInput", payload)
|
353
|
+
Mixin::Response.new(resp, resp.keys)
|
349
354
|
end
|
350
355
|
|
351
356
|
def remove_input(name)
|
@@ -828,6 +833,7 @@ module OBSWS
|
|
828
833
|
|
829
834
|
def stop_record
|
830
835
|
resp = call("StopRecord")
|
836
|
+
Mixin::Response.new(resp, resp.keys)
|
831
837
|
end
|
832
838
|
|
833
839
|
def toggle_record_pause
|
data/lib/obsws/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obsws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- onyx_online
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: observer
|