Class: ApplicationVideo

Inherits:
HLS::ApplicationVideo show all
Defined in:
lib/generators/hls/install/templates/application_video.rb

Overview

Base class for every video profile in this app. Defaults set here flow down to subclasses unless overridden. Per-profile classes live alongside this file at app/videos/<name>_video.rb — generate one with:

bin/rails g hls:video Course

Constant Summary

Constants inherited from HLS::ApplicationVideo

HLS::ApplicationVideo::BITS_PER_PIXEL, HLS::ApplicationVideo::PLAYLIST

Instance Attribute Summary

Attributes inherited from HLS::ApplicationVideo

#input, #key_prefix, #output

Class Method Summary collapse

Methods inherited from HLS::ApplicationVideo

class_setting, #command, #config_digest, #downscaleable_renditions, #encode!, #exist?, #initialize, #input_digest, manifest, poster, #poster!, #poster_command, posters, #process, rendition, renditions, #renditions, reset_posters!, reset_renditions!, storage_or_raise, variant_uri, #verify_encode!

Constructor Details

This class inherits a constructor from HLS::ApplicationVideo

Class Method Details

.storageObject

The storage backend. Defaulted to an S3 bucket configured from env vars; signing TTL controls how long pre-signed URLs stay valid. Override ‘storage` per-subclass to point at a different bucket, swap in a different adapter, etc.



15
16
17
18
# File 'lib/generators/hls/install/templates/application_video.rb', line 15

def self.storage = HLS::Storage::S3.new(
  bucket_name: ENV.fetch("VIDEO_S3_BUCKET_NAME"),
  signing_ttl: 1.hour
)