Optional
crop?: ((frameWidth, frameHeight) => [cropX: number, cropY: number, cropWidth: number, cropHeight: number])Crops the source frame
player.use(
new Webcam(),
{
// renders square frames
crop: (width, height) => [(width - height) / 2, 0, height, height],
},
)
Optional
horizontalMirrors the source frames by X axis
player.use(
new MediaStream(
await navigator.mediaDevices.getUserMedia({ video: true }),
),
{
horizontalFlip: true,
},
)
Customizes production of Input frames