Class: Helios::Videos::Video
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Helios::Videos::Video
- Defined in:
- app/models/helios/videos/video.rb
Instance Method Summary collapse
- #check_for_processing! ⇒ Object
- #download_and_store_thumbnail!(time: "3s") ⇒ Object
- #playback_url(signed: false, expiration: 4.hours) ⇒ Object
- #player_component(muted: false, expiration: 4.hours) ⇒ Object
- #requires_signed_urls? ⇒ Boolean
- #signed_url(expiration: 4.hours) ⇒ Object
- #thumbnail_url(time: "4s") ⇒ Object
Instance Method Details
#check_for_processing! ⇒ Object
41 42 43 |
# File 'app/models/helios/videos/video.rb', line 41 def check_for_processing! Helios::Videos.processor.ingest!(self) end |
#download_and_store_thumbnail!(time: "3s") ⇒ Object
29 30 31 |
# File 'app/models/helios/videos/video.rb', line 29 def download_and_store_thumbnail!(time: "3s") Helios::Videos.processor.download_thumbnail!(self, time: time) end |
#playback_url(signed: false, expiration: 4.hours) ⇒ Object
21 22 23 |
# File 'app/models/helios/videos/video.rb', line 21 def playback_url(signed: false, expiration: 4.hours) Helios::Videos.processor.playback_url(self, signed: signed, expiration: expiration) end |
#player_component(muted: false, expiration: 4.hours) ⇒ Object
17 18 19 |
# File 'app/models/helios/videos/video.rb', line 17 def player_component(muted: false, expiration: 4.hours) Helios::Videos.processor.player_component(self, muted: muted, expiration: expiration) end |
#requires_signed_urls? ⇒ Boolean
37 38 39 |
# File 'app/models/helios/videos/video.rb', line 37 def requires_signed_urls? respond_to?(:requires_signed_urls) ? requires_signed_urls : false end |
#signed_url(expiration: 4.hours) ⇒ Object
25 26 27 |
# File 'app/models/helios/videos/video.rb', line 25 def signed_url(expiration: 4.hours) playback_url(signed: true, expiration: expiration) end |
#thumbnail_url(time: "4s") ⇒ Object
33 34 35 |
# File 'app/models/helios/videos/video.rb', line 33 def thumbnail_url(time: "4s") thumbnail_image.attached? ? thumbnail_image : nil end |