Class: Hls::Generators::VideoGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Hls::Generators::VideoGenerator
- Defined in:
- lib/generators/hls/video/video_generator.rb
Overview
Scaffolds a new video profile under app/videos/.
bin/rails g hls:video Course
# => app/videos/course_video.rb
The generated file inherits from ‘ApplicationVideo` and ships with a sensible default rendition ladder, a hero poster, and inline comments for the common knobs (alternative codecs, bitrate tuning, additional posters). Edit the file to tune.
Instance Method Summary collapse
Instance Method Details
#create_video_profile ⇒ Object
19 20 21 |
# File 'lib/generators/hls/video/video_generator.rb', line 19 def create_video_profile template "video.rb", File.join("app/videos", "#{file_name}_video.rb") end |