igorkasyanchuk/active_storage_validations

[Validator] Add a :with_audio validator for videos

クローズ

#303 opened on 2024/11/26

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Ruby (148 件のフォーク)github user discovery
enhancementgood first issue

Repository metrics

Stars
 (1,179 個のスター)
PR merge metrics
 (30d に merged 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 }

コントリビューターガイド