How to get the progress Url working when uploading?

℡╲_俬逩灬. 提交于 2019-12-25 05:44:31

问题


I am wondering how to implement the progress bar/url function? I have only found limited info about it, and cant see how to get this working.Thanks.


回答1:


For making a progress bar, you will need:

  • information of progress, you can find this using dailymotion API. See paragraph below.
  • displaying the progress. I have no recommendation but a simple google search will help. For example, the HTML5 progress element is a good start: https://developer.mozilla.org/en/docs/Web/HTML/Element/Progress I've never tried it but you can also test something such as http://api.jqueryui.com/progressbar/

For information of progress, you can have:

  • download video progress: requesting https://api.dailymotion.com/file/upload provides you with both a upload_url and a progress_url that provides info on the progress of current upload (cf https://developer.dailymotion.com/api#file_upload-fields)
  • encoding progress: there are two interesting fields on the video object: encoding_progress (https://developer.dailymotion.com/api#video-encoding_progress-field) and publishing_progress (https://developer.dailymotion.com/api#video-publishing_progress-field)


来源:https://stackoverflow.com/questions/31978053/how-to-get-the-progress-url-working-when-uploading

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!