开发者

Implementing canplaythrough in SoundManager2

开发者 https://www.devze.com 2022-12-08 09:33 出处:网络
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

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();
}
0

精彩评论

暂无评论...
验证码 换一张
取 消