|
@@ -59,7 +59,6 @@
|
|
|
|
|
|
Show.prototype.add = function(file, delay, latency) {
|
|
Show.prototype.add = function(file, delay, latency) {
|
|
let o = new ShowFile(file, delay, latency);
|
|
let o = new ShowFile(file, delay, latency);
|
|
- // let o = {file: file, delay: delay, latency: latency};
|
|
|
|
this.list.push(o);
|
|
this.list.push(o);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -114,7 +113,7 @@
|
|
let el = new Image();
|
|
let el = new Image();
|
|
if (o.file.endsWith('.mp4') || o.file.endsWith('.webm') || o.file.endsWith('.ogg')) {
|
|
if (o.file.endsWith('.mp4') || o.file.endsWith('.webm') || o.file.endsWith('.ogg')) {
|
|
el = document.createElement('video');
|
|
el = document.createElement('video');
|
|
- el.addEventListener('canplay', () => { o.latency = (isNaN(o.delay) ? 1 : o.delay) * Math.trunc(el.duration * 1000); }, {once: true});
|
|
|
|
|
|
+ el.addEventListener('canplay', () => { o.latency = Math.trunc(el.duration * 1000); }, {once: true});
|
|
el.muted = true;
|
|
el.muted = true;
|
|
el.loop = true;
|
|
el.loop = true;
|
|
} else if (o.file.endsWith('.gif')) {
|
|
} else if (o.file.endsWith('.gif')) {
|