获取视频播放地址

dev_video
cxt 5 years ago
parent b1a9a5c0e8
commit f342ad6cd4

@ -46,7 +46,9 @@ namespace :video do
task :get_play_url => :environment do
Video.all.each do |video|
result = AliyunVod::Service.get_play_info(video.uuid)
play_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL')
puts result
play_url = data[:PlayInfoList][:PlayInfo][:PlayURL]
# play_url = (result.dig('PlayInfoList', 'PlayInfo') || []).first&.[]('PlayURL')
video.update!(play_url: play_url) if play_url.present?
end

Loading…
Cancel
Save