igorkasyanchuk/active_storage_validations

[Validator] Add a :with_audio validator for videos

Open

#303 opened on Nov 26, 2024

 (0 comments) (0 reactions) (0 assignees)Ruby (148 forks)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (1,179 stars)
PR merge metrics
 (No merged PRs in 30d)

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 }

Contributor guide