ume05rw / umvalidator Goto Github PK
View Code? Open in Web Editor NEWValidator, Minimum Eclipse-Plugin
Validator, Minimum Eclipse-Plugin
I found timer-probrem, and fix it.
For example, When HTTP-Header's failure, audio.js element's "loadTimer" cannot clearInterval.
http://dobes.jp/timer_cannot_clear/error
↓
http://dobes.jp/timer_cannot_clear/fixed/
trackLoadProgress: function(audio) {
// If `preload` has been set to `none`, then we don't want to start loading the track yet.
if (!audio.settings.preload) return;
var readyTimer,
loadTimer,
audio = audio,
ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
// Use timers here rather than the official `progress` event, as Chrome has issues calling `progress` when loading mp3 files from cache.
readyTimer = setInterval(function() {
if (audio.element.readyState > -1) {
// iOS doesn't start preloading the mp3 until the user interacts manually, so this stops the loader being displayed prematurely.
if (!ios) audio.init.apply(audio);
}
if (audio.element.readyState > 1) {
if (audio.settings.autoplay) audio.play.apply(audio);
clearInterval(readyTimer);
// Once we have data, start tracking the load progress.
loadTimer = setInterval(function() {
// ########## add console out ##########
app.log("waiting load complete.");
audio.loadProgress.apply(audio);
if (audio.loadedPercent >= 1) clearInterval(loadTimer);
}, 200);
}
}, 200);
audio.readyTimer = readyTimer;
audio.loadTimer = loadTimer;
},
trackLoadProgress: function(audio) {
// If `preload` has been set to `none`, then we don't want to start loading the track yet.
if (!audio.settings.preload) return;
var // readyTimer, // ########## remove.
// loadTimer, // ########## remove.
audio = audio,
ios = (/(ipod|iphone|ipad)/i).test(navigator.userAgent);
// Use timers here rather than the official `progress` event, as Chrome has issues calling `progress` when loading mp3 files from cache.
// ########## set timer handle to audio's member direct. ##########
audio.readyTimer = setInterval(function() {
if (audio.element.readyState > -1) {
// iOS doesn't start preloading the mp3 until the user interacts manually, so this stops the loader being displayed prematurely.
if (!ios) audio.init.apply(audio);
}
if (audio.element.readyState > 1) {
if (audio.settings.autoplay) audio.play.apply(audio);
clearInterval(audio.readyTimer); // handle -> audio's member
// Once we have data, start tracking the load progress.
// ########## set timer handle to audio's member direct. ##########
audio.loadTimer = setInterval(function() {
// ########## add logging ##########
app.log("waiting load complete.");
audio.loadProgress.apply(audio);
if (audio.loadedPercent >= 1) clearInterval(loadTimer);
}, 200);
}
}, 200);
//audio.readyTimer = readyTimer; // ########## remove.
//audio.loadTimer = loadTimer; // ########## remove.
},
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.