Sha256: 8473c2756f98543c03d8dfe1fd2fa5acce58348b32fbd8a0e2f53c7ecfb0da2e

Contents?: true

Size: 705 Bytes

Versions: 15

Compression:

Stored size: 705 Bytes

Contents

module Pageflow
  class TextTrackFile < ApplicationRecord
    include HostedFile
    include ProcessedFileStateMachine

    def attachment_styles(_attachment)
      {
        vtt: {
          format: 'vtt',
          processors: [:pageflow_vtt],
          s3_headers: {
            'Content-Type' => 'text/vtt'
          }
        }
      }
    end

    # used in paperclip initializer to interpolate the storage path
    # needs to be "processed_attachments" for text tracks for legacy reasons
    def attachments_path_name
      'processed_attachments'
    end

    def meta_data_attributes=(attributes)
      self.attributes = attributes.symbolize_keys.slice(:label, :kind, :srclang)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pageflow-14.5.2 app/models/pageflow/text_track_file.rb
pageflow-14.5.1 app/models/pageflow/text_track_file.rb
pageflow-14.5.0 app/models/pageflow/text_track_file.rb
pageflow-14.4.0 app/models/pageflow/text_track_file.rb
pageflow-14.3.0 app/models/pageflow/text_track_file.rb
pageflow-14.2.1 app/models/pageflow/text_track_file.rb
pageflow-14.2.0 app/models/pageflow/text_track_file.rb
pageflow-14.1.1 app/models/pageflow/text_track_file.rb
pageflow-14.1.0 app/models/pageflow/text_track_file.rb
pageflow-14.0.0 app/models/pageflow/text_track_file.rb
pageflow-14.0.0.rc2 app/models/pageflow/text_track_file.rb
pageflow-14.0.0.rc1 app/models/pageflow/text_track_file.rb
pageflow-14.0.0.beta3 app/models/pageflow/text_track_file.rb
pageflow-14.0.0.beta2 app/models/pageflow/text_track_file.rb
pageflow-14.0.0.beta1 app/models/pageflow/text_track_file.rb