igorkasyanchuk/active_storage_validations

[Validator] Add a :with_audio validator for videos

Chiusa

#303 aperta il 26 nov 2024

 (0 commenti) (0 reazioni) (0 assegnatari)Ruby (148 fork)github user discovery
enhancementgood first issue

Metriche repository

Star
 (1179 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Thanks to our video metadata extraction, we are able to validate if a video has audio or not:

ActiveStorageValidations::Analyzer::VideoAnalyzer.new(attachable).metadata
# => { width: 640.0, height: 480.0, duration: 5.0, angle: 0, audio: true, video: true }

Guida contributor