Module: Ddr::Streamable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Component
- Defined in:
- app/models/concerns/ddr/streamable.rb
Instance Method Summary collapse
-
#streamable_media_extension ⇒ Object
This method is used in dul-hydra ‘ComponentsController’ and ddr-public ‘StreamController’.
- #streamable_media_path ⇒ Object
- #streamable_media_type ⇒ Object
Instance Method Details
#streamable_media_extension ⇒ Object
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_path ⇒ Object
20 21 22 |
# File 'app/models/concerns/ddr/streamable.rb', line 20 def streamable_media_path streamable_media&.file&.disk_path end |
#streamable_media_type ⇒ Object
9 10 11 |
# File 'app/models/concerns/ddr/streamable.rb', line 9 def streamable_media_type streamable_media&.media_type end |