igorkasyanchuk/active_storage_validations

[Validator] Add a :with_audio validator for videos

已关闭

#303 创建于 2024年11月26日

 (0 条评论) (0 个反应) (0 位负责人)Ruby (148 个派生)github user discovery
enhancementgood first issue

仓库指标

星标
 (1,179 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

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 }

贡献者指南