Yes, you can gauge the connection speed.
Create a new Date
object, then use the DOM to download an image of a fixed size, with a random number appended on the end so the client doesn't cache it. The image's onload
event should subtract the time before the image was downloaded from the current time, therefore giving you the number of milliseconds it took to download.
var imageurl='http://www.google.com/intl/en_ALL/images/srpr/logo1w.png';
var image=document.createElement('image');
image.src=imageurl+'?'+Math.round(Math.random()*1000);
document.body.appendChild(image);
var imagetook=0;
var date=new Date();
image.onload=function(){
imagetook=getMilliseconds();
startmovie();
}