<!DOCTYPE html>
<html>
<header>
</header>
<body>
<canvas id=canvas width=100px hwight=100px></canvas>
<script>
function createVideoFrame(value) {
  const init = {
    format: 'I420',
    timestamp: 1234,
    codedWidth: 4,
    codedHeight: 4,
    timestamp: 100,
    duration: 33
  };
  const data = new Uint8Array([
    value, value, value, value, value, value, value, value,  // y
    value, value, value, value, value, value, value, value,  // y
    value, value, value, value,                   // u
    value, value, value, value                    // v
  ]);
  return new VideoFrame(data, init);
}

const frame2 = createVideoFrame(0);
canvas.getContext('2d').drawImage(frame2, 0, 0);
frame2.close();
</script>
</body>
</html>
