Class: HLS::Railtie
- Inherits:
-
Rails::Railtie
- Object
- Rails::Railtie
- HLS::Railtie
- Defined in:
- lib/hls/railtie.rb
Overview
Railtie that wires HLS into a host Rails app.
-
Registers ‘app/videos` as an autoload + eager-load path so that profile classes like `app/videos/course_video.rb` are picked up by Zeitwerk.
-
Lazily loads HLS::EncodeJob when ActiveJob is loaded.
That’s it. There is intentionally no Rails.application.config.hls config bag and no load hook to subscribe to. Configure profile classes directly:
class ApplicationVideo < HLS::ApplicationVideo
def self.storage = HLS::Storage::S3.new(
bucket_name: ENV.fetch("VIDEO_S3_BUCKET_NAME"),
signing_ttl: 1.hour
)
segment_duration 4
end
Zeitwerk reloads the class in dev so the settings re-apply automatically; no special hook needed.