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 }

貢獻者指南