Module: Ddr::Streamable

Extended by:
ActiveSupport::Concern
Included in:
Component
Defined in:
app/models/concerns/ddr/streamable.rb

Instance Method Summary collapse

Instance Method Details

#streamable_media_extensionObject

This method is used in dul-hydra ‘ComponentsController’ and ddr-public ‘StreamController’



14
15
16
17
18
# File 'app/models/concerns/ddr/streamable.rb', line 14

def streamable_media_extension
  if filename = streamable_media&.original_filename
    ::File.extname(filename)
  end
end

#streamable_media_pathObject



20
21
22
# File 'app/models/concerns/ddr/streamable.rb', line 20

def streamable_media_path
  streamable_media&.file&.disk_path
end

#streamable_media_typeObject



9
10
11
# File 'app/models/concerns/ddr/streamable.rb', line 9

def streamable_media_type
  streamable_media&.media_type
end