How to get the progress Url working when uploading

2019-09-12 14:03发布

问题:

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)