Small adjustments

This commit is contained in:
Vanilagy
2025-09-25 14:49:09 +02:00
parent 537119357d
commit 3f03eb8fbb
2 changed files with 16 additions and 7 deletions
+8 -3
View File
@@ -34,8 +34,8 @@
}
const canvas = document.createElement('canvas');
canvas.width = 640;
canvas.height = 480;
canvas.width = 1920;
canvas.height = 1080;
const context = canvas.getContext('2d');
let format = new Mediabunny.MkvOutputFormat({ streamable: false });
@@ -193,12 +193,17 @@ Testing... <00:17.350>One... <00:18.125>Two...
//subtitleSource.add(simpleWebvttFile);
//subtitleSource.close();
const p = document.createElement('p');
document.body.append(p);
for (let i = 0; i < 100; i++) {
context.fillStyle = ['red', 'green', 'blue', 'yellow'][i % 4];
context.fillRect(canvas.width * Math.random(), canvas.height * Math.random(), canvas.width * Math.random(), canvas.height * Math.random());
await videoSource.add(i / 10, 1 / 10);
p.textContent = i;
}
let audioContext = new AudioContext();
@@ -211,5 +216,5 @@ Testing... <00:17.350>One... <00:18.125>Two...
await output.finalize();
console.log(target);
download(new Blob([target.buffer]), 'test' + format.fileExtension);
//download(new Blob([target.buffer]), 'test' + format.fileExtension);
</script>