start experiment(s) / tweets
// start the experiment
if(typeof HTMLAudioElement == 'object' || typeof HTMLAudioElement == 'function') {
// start if enought data is loaded
$('#audio').bind('canplay', function() {
jQuery.ajax({
url: 'http://search.twitter.com/search.json?rpp=100&q=html5+love',
dataType: 'jsonp',
success: function (data) {
theTweets = data.results;
setTimeout(function() {
startedAt = new Date();
$('#audio').get(0).play();
$('#tweet').hide();
play = true;
}, 100);
}
});
});
} else {
// start without audio
jQuery.ajax({
url: 'http://search.twitter.com/search.json?rpp=100&q=html5+love',
dataType: 'jsonp',
success: function (data) {
theTweets = data.results;
setTimeout(function() {
startedAt = new Date();
$('#audio').hide();
$('#tweet').hide();
play = true;
}, 100);
}
});
}
}
});