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 +4 -4
- data/lib/awslive-inputlooper/input_looper.rb +30 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed26af04f57ad183a67cdee97e5da139914ca29a61e609e09f7235deea0771a1
|
4
|
+
data.tar.gz: 14efef21028363eccae0bd686546d29714f2ae4aed6582bd185f24e8692ec1c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
216
|
-
|
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
|
|