You can change the jQuery UI slider a bit using your own background image and then changing the width to show the progress of loading ( demo ):
$(function(){
var ytplayer = $('#player')[0],
duration = ytplayer.getDuration(),
totalBytes = ytplayer.getVideoBytesTotal(),
startBytes = ytplayer.getVideoStartBytes();
$("#slider").slider({
range: "max",
min: startBytes,
max: duration,
value: 1
})
.css('background-image', 'url(http://i56.tinypic.com/fbjad2.png)');
function loop() {
var time = ytplayer.getCurrentTime(),
loaded = 100 - (ytplayer.getVideoBytesLoaded() / totalBytes) * 100;
if (loaded < 0) { loaded = 0; }
$('#slider')
.slider('option', 'value', time)
.find('.ui-widget-header').css('width', loaded + '%');
if (loaded < 0 || time < duration) {
setTimeout(loop, 500);
}
}
loop();
});
source
share