igorkasyanchuk/active_storage_validations

[Validator] Add a :with_audio validator for videos

Fermée

#303 ouverte le 26 nov. 2024

 (0 commentaire) (0 réaction) (0 personne assignée)Ruby (148 forks)github user discovery
enhancementgood first issue

Métriques du dépôt

Stars
 (1 179 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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 }

Guide contributeur