Skip to content

Media files (Audio Video)

Petr Mlčoch edited this page Jun 9, 2023 · 1 revision

Folio includes concerns Folio::JwPlayer::FileProcessing and Folio::Mux::FileProcessing which should go to Folio::File ascendant classes.

They will automagically post file content to selected services and creates full media (private) and preview (public) versions, offering then methods on instance #remote_full_url, #remote_signed_full_url(expires_at = 2.hours.from_now), #remote_preview_url, #remote_signed_full_url(expires_at = 2.hours.from_now).

Remote services data, including remote processing state are stored in file.remote_services_data. State of remote processing can be accessed by file.processing_state ( allowed states in order are [enqueued, full_media_processing, full_media_processed, preview_media_processing, preview_media_processed]) There is Folio::Files::RestartProcessingMediaJob which is usefull to restart procesiing for media, which looses they queued processing job on deploy.