diff --git a/docs/index.md b/docs/index.md index 700a077..7695b7c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -104,6 +104,7 @@ const sponsors = { { image: '/sponsors/mux.jpg', name: 'Mux', url: 'https://www.mux.com/' }, ], individual: [ + { image: 'https://avatars.githubusercontent.com/u/197597', name: 'Christopher Chedeau', url: 'https://github.com/vjeux' }, { image: 'https://avatars.githubusercontent.com/u/84167135', name: 'Memenome', url: 'https://github.com/memenome' }, { image: 'https://avatars.githubusercontent.com/u/5913254', name: 'Brandon McConnell', url: 'https://github.com/brandonmcconnell' }, { image: 'https://avatars.githubusercontent.com/u/9549394', name: 'studnitz', url: 'https://github.com/studnitz' }, diff --git a/test/browser/transparency.test.ts b/test/browser/transparency.test.ts index 7b7f40b..e460e55 100644 --- a/test/browser/transparency.test.ts +++ b/test/browser/transparency.test.ts @@ -139,11 +139,12 @@ test('Can encode transparent video', async () => { probeContext.drawImage(video, 0, 0); let imageData = probeContext.getImageData(0, 0, probeCanvas.width, probeCanvas.height); - const index1 = (100 + 100 * probeCanvas.width) * 4; + const pos1 = { x: 100, y: 100 }; + const index1 = (pos1.x + pos1.y * probeCanvas.width) * 4; expect(imageData.data[index1 + 3]).toBe(0); // Transparent - const pos = { x: 300, y: 300 }; // Dead center in the red square - const index2 = (pos.x + pos.y * probeCanvas.width) * 4; + const pos2 = { x: 300, y: 300 }; // Dead center in the red square + const index2 = (pos2.x + pos2.y * probeCanvas.width) * 4; // Red (within error) expect(imageData.data[index2 + 0]).greaterThanOrEqual(253);