awslive-inputlooper 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d97ce105a8307ed569150d6cca5a6ec60a257b2be60243c536001ffa9e2598fd
4
- data.tar.gz: 572cfb98b2e9bbbe5303d14e114e84871fa3b1db68564166d1fc38af605ea33d
3
+ metadata.gz: ed26af04f57ad183a67cdee97e5da139914ca29a61e609e09f7235deea0771a1
4
+ data.tar.gz: 14efef21028363eccae0bd686546d29714f2ae4aed6582bd185f24e8692ec1c4
5
5
  SHA512:
6
- metadata.gz: 7d6cc25df8c282b650f2440bde6d46e1b4fee7d81e8b5b0833a4a68578ac944b5a11406c1254a1da2f6c7fba234fba816a136a588495083cb63ea7dc2d3df89c
7
- data.tar.gz: 5dae98930e529b8b2a55056bfac4108051ffe48267e2dd502fa45792f62a6fa72e53a281df34c00f01bccbfedd1011e23b75e44c761c34aa284b8803cd66206c
6
+ metadata.gz: 5b98379cf405200a59ffec8f013e948b00b66ffabd168bebd3b5996fb8fa99ec289f2a69f34afaa32b531d8fbedd7241d8acc0dc4107749a0041a7ed69c80fb9
7
+ data.tar.gz: c42363a9151b169cc02a5dbcd6e30cb0c75020f5de3f73aaadc38e78aa456a7881eb547ad09d505129e7624f19dcba30366133fcd757bf40572bf041017699e3
@@ -187,6 +187,25 @@ module Awslive
187
187
  return static_input, dynamic_input
188
188
  end
189
189
 
190
+ def get_input_id(inputs, input_name)
191
+ input_id = nil
192
+ inputs.each do | input |
193
+ if input[:input_attachment_name] == input_name
194
+ input_id = input[:input_id]
195
+ break;
196
+ end
197
+ end
198
+ input_id
199
+ end
200
+
201
+ def get_input_url(input_id)
202
+ input_url = []
203
+ input_info = @medialiveclient.describe_input({ :input_id => "#{input_id}" })
204
+ input_info[:sources].each do | source_info |
205
+ input_url << source_info[:url]
206
+ end
207
+ input_url
208
+ end
190
209
 
191
210
  def get_channel_info
192
211
  @medialiveclient.describe_channel({ :channel_id => "#{@channel_id}" })
@@ -211,9 +230,18 @@ module Awslive
211
230
  end
212
231
 
213
232
  def get_current_input_url(channel_info = nil)
233
+ current_url = []
214
234
  channel_info = get_channel_info if channel_info.nil?
215
- current_input_action_name = get_current_input_name(channel_info)
216
- current_url = @scheduler.get_action_url(@channel_id, current_input_action_name)
235
+ #puts channel_info
236
+ current_input_action_name = get_current_action(channel_info)
237
+ puts current_input_action_name
238
+ if current_input_action_name == INITAL_INPUT_ACTION_NAME
239
+ attachement_name = get_current_input_name(channel_info)
240
+ input_id = get_input_id(channel_info[:input_attachments], attachement_name )
241
+ current_url = get_input_url(input_id)
242
+ else
243
+ current_url << @scheduler.get_action_url(@channel_id, current_input_action_name)
244
+ end
217
245
  current_url
218
246
  end
219
247
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awslive-inputlooper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maheshwaran G