// Update streaming progress every 100ms
setInterval(function() {
var streamingPercent = ge.getStreamingPercent();
var progressBar = document.getElementById('progress-bar');
if (streamingPercent == 100) {
// streaming complete, hide the progress bar
progressBar.style.backgroundColor = '#0a0';
progressBar.style.width = '250px';
} else {
// show the progress bar, max width is 250 as per the stylesheet
progressBar.style.backgroundColor = '#00f';
progressBar.style.width = (250 * streamingPercent / 100) + 'px';
}
}, 100); <style type="text/css">
#progress-container {
width: 250px;
height: 10px;
border: 1px solid #ccc;
}
#progress-bar {
width: 0;
height: 10px;
}
</style>
Data Streaming Progress:
<div id="progress-container">
<div id="progress-bar"></div>
</div>