Sha256: 55f2a0d53fb99c78c41348e2ce7245b5d63c73bd3896b1142d896c156a7b4166
Contents?: true
Size: 1.04 KB
Versions: 12
Compression:
Stored size: 1.04 KB
Contents
# frozen_string_literal: true module Evostream module Events # Action inStreamCreated class InStreamCreated < Event def execute super do |type_flux| klass = "Evostream::Commands::Create#{type_flux.upcase}".constantize command = send(type_flux, type_flux) @result = Evostream.send_command(klass.new(command).cmd) end end private def hls(flux) { local_stream_names: stream_name, target_folder: target_folder(flux), cleanup_destination: 1, group_name: group_name(flux), keep_alive: 1, chunk_length: 1, playlist_length: 10, playlist_type: 'rolling' } end alias dash hls def target_folder(flux) "#{Evostream::Service.web_root}#{group_name(flux)}/#{stream_name}" end def group_name(type_flux) "#{Evostream::Service.name}#{type_flux}" end def stream_name "#{Evostream::Service.name}#{id_flux}" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems