ruby_rabbitmq_janus 1.1.3 → 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rrj/info.rb +1 -1
- data/lib/rrj/tools/replaces/replace.rb +17 -0
- data/lib/rrj/tools/replaces/standard.rb +8 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eda18342b09bcd7ccef205aca0b19f9631e9766a
|
4
|
+
data.tar.gz: 35c4113bbc26c928d114d5fafbd8ceedfaece862
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874e9c94038bf62c8ce70e4b3f0ef6b5be94699cb0ceb8f216ef1ae1dafc6ca397da87e0b1235ef991ab729300d849a38cac74367e09b04fda53b4742a2b4ed3
|
7
|
+
data.tar.gz: 63ef22c43d45871454ed386c010fe048e56cb98d2567906edd25e2d812386b13a1f20c1fb6a53bf59dc9c08b7cb6d7cd04cea3ba7b56fc3b51ceec53921349fa
|
data/lib/rrj/info.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
module RubyRabbitmqJanus
|
4
4
|
module Tools
|
5
|
+
# Tools for replace elements in request
|
5
6
|
module Replaces
|
6
7
|
# Tools for replace elements in request sending to Rabbitmq
|
7
8
|
# @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
|
@@ -31,6 +32,8 @@ module RubyRabbitmqJanus
|
|
31
32
|
# Replace basic elements
|
32
33
|
def replace_classic
|
33
34
|
replace_transaction if @request.key?('transaction')
|
35
|
+
replace_session if @request.key?('session_id')
|
36
|
+
replace_plugin if @request.key?('plugin')
|
34
37
|
end
|
35
38
|
|
36
39
|
# Create an transaction string and replace in request field with an String format
|
@@ -39,6 +42,20 @@ module RubyRabbitmqJanus
|
|
39
42
|
rescue => message
|
40
43
|
Tools::Log.instance.warn "Error transaction replace : #{message}"
|
41
44
|
end
|
45
|
+
|
46
|
+
# Read option session and replace in request
|
47
|
+
def replace_session
|
48
|
+
@request['session_id'] = @opts['session_id']
|
49
|
+
rescue => message
|
50
|
+
Tools::Log.instance.warn "Error session replace : #{message}"
|
51
|
+
end
|
52
|
+
|
53
|
+
# Replace plugin string
|
54
|
+
def replace_plugin
|
55
|
+
@request['plugin'] = Tools::Config.instance.options['janus']['plugins'][0]
|
56
|
+
rescue => message
|
57
|
+
Tools::Log.instance.warn "Error plugin replace : #{message}"
|
58
|
+
end
|
42
59
|
end
|
43
60
|
end
|
44
61
|
end
|
@@ -11,24 +11,9 @@ module RubyRabbitmqJanus
|
|
11
11
|
# Replace classic elements
|
12
12
|
def replace_classic
|
13
13
|
super
|
14
|
-
replace_session if request.key?('session_id')
|
15
|
-
replace_plugin if request.key?('plugin')
|
16
14
|
replace_handle if request.key?('handle_id')
|
17
15
|
replace_candidate if request.key?('candidate')
|
18
|
-
|
19
|
-
|
20
|
-
# Read option session and replace in request
|
21
|
-
def replace_session
|
22
|
-
request['session_id'] = opts['session_id']
|
23
|
-
rescue => message
|
24
|
-
Tools::Log.instance.warn "Error session replace : #{message}"
|
25
|
-
end
|
26
|
-
|
27
|
-
# Replace plugin string
|
28
|
-
def replace_plugin
|
29
|
-
request['plugin'] = Tools::Config.instance.options['janus']['plugins'][0]
|
30
|
-
rescue => message
|
31
|
-
Tools::Log.instance.warn "Error plugin replace : #{message}"
|
16
|
+
replace_sdp if request.key?('jsep')
|
32
17
|
end
|
33
18
|
|
34
19
|
# Replace handle integer
|
@@ -45,6 +30,13 @@ module RubyRabbitmqJanus
|
|
45
30
|
Tools::Log.instance.warn "Error candidate replace : #{message}"
|
46
31
|
end
|
47
32
|
|
33
|
+
# Replace sdp in request
|
34
|
+
def replace_sdp
|
35
|
+
request['jsep']['sdp'] = opts['sdp']
|
36
|
+
rescue => message
|
37
|
+
Tools::Log.instance.warn "Error sdp replace : #{message}"
|
38
|
+
end
|
39
|
+
|
48
40
|
# Save candidate or candidates in request
|
49
41
|
def save_candidate(value)
|
50
42
|
if opts.key?('candidates')
|