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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4442e6cfe70b5849e144634d20819ab5b807911a
4
- data.tar.gz: 1d7a808a28f4f02621f11f5bc24e5870eb522b05
3
+ metadata.gz: eda18342b09bcd7ccef205aca0b19f9631e9766a
4
+ data.tar.gz: 35c4113bbc26c928d114d5fafbd8ceedfaece862
5
5
  SHA512:
6
- metadata.gz: 243ed337cf2fd115dca62301b556a1a47c0089a85c939aa3ed45fdb13ddf02fa2e6a6693e7c8398d09f38c61ed7a6ac3017d01c5782d332d1016d091f0e195be
7
- data.tar.gz: fd60aeb4aa64da37dd9ad5c4e190c45ba3b5a29f6befe73aecce132281a23794d9c2bd14de8a1f628a9fea4fb3b6b4962287560aa138fc6144dabd90ae6df117
6
+ metadata.gz: 874e9c94038bf62c8ce70e4b3f0ef6b5be94699cb0ceb8f216ef1ae1dafc6ca397da87e0b1235ef991ab729300d849a38cac74367e09b04fda53b4742a2b4ed3
7
+ data.tar.gz: 63ef22c43d45871454ed386c010fe048e56cb98d2567906edd25e2d812386b13a1f20c1fb6a53bf59dc9c08b7cb6d7cd04cea3ba7b56fc3b51ceec53921349fa
data/lib/rrj/info.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  # Define constant to gem.
4
4
  module RubyRabbitmqJanus
5
5
  # Define version to gem
6
- VERSION = '1.1.3'
6
+ VERSION = '1.1.4'
7
7
 
8
8
  # Define a summary description to gem
9
9
  SUMMARY = 'Ruby RabbitMQ Janus'
@@ -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
- end
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')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_rabbitmq_janus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - VAILLANT Jeremy