Class: Awslive::AdMarkerScheduledAction
- Inherits:
-
Object
- Object
- Awslive::AdMarkerScheduledAction
- Defined in:
- lib/awslive-scheduler/ad_marker_scheduled_action.rb
Constant Summary collapse
- FOLLOW_HASH =
{ action_name: "f1", schedule_action_start_settings: { follow_mode_schedule_action_start_settings: { reference_action_name: "imm", follow_point: "END" } }, schedule_action_settings: { :scte_35_splice_insert_settings => { :duration => 1, :splice_event_id => 1 } } }
- IMMEDIATE_HASH =
{ :action_name => "action_name", :schedule_action_start_settings => { :immediate_mode_schedule_action_start_settings => {} }, :schedule_action_settings => { :scte_35_splice_insert_settings => { :duration => 1, :splice_event_id => 1 } } }
Instance Method Summary collapse
- #get_action_id ⇒ Object
- #get_follow_schedule_action(follow_input, ad_duration) ⇒ Object
- #get_immediate_schedule_action(ad_duration) ⇒ Object
Instance Method Details
#get_action_id ⇒ Object
49 50 51 |
# File 'lib/awslive-scheduler/ad_marker_scheduled_action.rb', line 49 def get_action_id Time.now.to_i end |
#get_follow_schedule_action(follow_input, ad_duration) ⇒ Object
40 41 42 43 44 45 46 47 |
# File 'lib/awslive-scheduler/ad_marker_scheduled_action.rb', line 40 def get_follow_schedule_action(follow_input, ad_duration) action_hash = FOLLOW_HASH.clone action_hash[:action_name] = "#{get_action_id}-ad" action_hash[:schedule_action_start_settings][:follow_mode_schedule_action_start_settings][:reference_action_name] = "#{follow_input}" action_hash[:schedule_action_settings][:scte_35_splice_insert_settings][:duration] = ad_duration * 90000 action_hash[:schedule_action_settings][:scte_35_splice_insert_settings][:splice_event_id] = get_action_id action_hash end |
#get_immediate_schedule_action(ad_duration) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/awslive-scheduler/ad_marker_scheduled_action.rb', line 32 def get_immediate_schedule_action( ad_duration ) action_hash = IMMEDIATE_HASH.clone action_hash[:action_name] = "#{get_action_id}-ad" action_hash[:schedule_action_settings][:scte_35_splice_insert_settings][:duration] = ad_duration * 90000 action_hash[:schedule_action_settings][:scte_35_splice_insert_settings][:splice_event_id] = get_action_id action_hash end |