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 aupload_url
and aprogress_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) andpublishing_progress
(https://developer.dailymotion.com/api#video-publishing_progress-field)