转码问题

courseware
daiao 5 years ago
parent 7055c2f885
commit c2eadb39bc

@ -22,7 +22,7 @@ class Videos::DispatchCallbackService < ApplicationService
play_url = result['PlayInfoList']['PlayInfo'][0]['PlayURL'] if result play_url = result['PlayInfoList']['PlayInfo'][0]['PlayURL'] if result
video.update!(cover_url: params['CoverUrl'], play_url: play_url) video.update!(cover_url: params['CoverUrl'], play_url: play_url)
when 'StreamTranscodeComplete' then # 转码完成 when 'StreamTranscodeComplete' then # 转码完成
return if video.play_url.present? #return if video.play_url.present?
video.update!(play_url: params['FileUrl'], transcoded: true) video.update!(play_url: params['FileUrl'], transcoded: true)
when 'DeleteMediaComplete' #完成云端视频删除 when 'DeleteMediaComplete' #完成云端视频删除
video.update_column(:delete_state, Video::FINISH_DELETE) video.update_column(:delete_state, Video::FINISH_DELETE)

Loading…
Cancel
Save