Implementing canplaythrough in SoundManager2
I need help making an algorithm to detect that all the conditions for HA开发者_开发技巧VE_ENOUGH_DATA are met (and continuously checking until they are met) and I am stumped as to how to calculate all the necessary variables using SoundManager2's whileloading
option. I don't need code, just a general algorithm that would work (even pseudo-code is fine).
It turns out that setting the whileplaying
option is a more optimal and simple solution. This is my whileplaying solution:
function () {
aSound.options.whileplaying = null;
if (paused) {
aSound.stop();
}
onCanPlayThrough_callback_here();
}
精彩评论