get video progress

AlexanderUlitin edited this page Mar 2, 2011 · 1 revision

Getting the video upload & conversion progress

If you would like to programmatically get the upload progress, you should append the X-Progress-ID parameter to the /api/videos/upload URL with the unique value which should depend on the current microtime.
http://videobam.com/api/videos/upload?X-Progress-ID=ee27d32c7ce155874bfcc1ccfcad38ee

Getting upload progress

GET http://videobam.com/progress?X-Progress-ID=ee27d32c7ce155874bfcc1ccfcad38ee
where X-Progress-ID should be appropriate to the one passed to the upload action

Response example

  new Object({
    'state': 'uploading',
    'received' : 268736,
    'size' : 471859408
  })
  • state — "starting", "uploading", "done" or "error"
  • received — what the server has received so far (bytes)
  • size — total size of the upload (bytes)

Getting conversion progress

Please read the API function: Getting the particular video.