I have desperately looked for information on how to take the zencoder progress JSON response, convert the "progress" variable from the response into a javascript variable and use it to populate the number in a css width value.
More information on the Zencoder JSON response can be found here: https://app.zencoder.com/docs/api/jobs/progress
The typical output is as follows:
{
"state": "processing",
"progress": 32.34567345,
"input": {
"id": 1234,
"state": "finished"
},
"outputs": [
{
"id": 4567,
"state": "processing",
"current_event": "Transcoding",
"current_event_progress": 25.0323,
"progress": 35.23532
},
{
"id": 4568,
"state": "processing",
"current_event": "Uploading",
"current_event_progress": 82.32,
"progress": 95.3223
}
]
}
I want to get the updated "progress" value every half a second or so and use it to populate the width value in Twitter Boostraps progress bar:
<div class="progress progress-striped active">
<div class="bar" style="width: 40%;"></div>
</div>
Any help would be enormously appreciated!