Add VideoRenderer class for cascading video rendering with WebGPU, WebGL2, and Canvas 2D support

This commit is contained in:
seydx
2026-03-17 12:29:14 +01:00
committed by Sergey Krashevich
parent efc5eff40f
commit 30c72ff3f5
3 changed files with 530 additions and 52 deletions
+2
View File
@@ -50,12 +50,14 @@
const background = params.get('background') !== 'false';
const width = '1 0 ' + (params.get('width') || '320px');
const renderer = params.get('renderer');
for (let i = 0; i < streams.length; i++) {
/** @type {VideoStream} */
const video = document.createElement('video-stream');
video.background = background;
video.mode = modes[i] || video.mode;
if (renderer) video.renderer = renderer;
video.style.flex = width;
video.src = new URL('api/ws?src=' + encodeURIComponent(streams[i]), location.href);
document.body.appendChild(video);