constraints to be merged with defaultVideoConstraints and to be passed to navigator.mediaDevices.getUserMedia()
Yields webcam video as sequence of ImageData frames
Manually starts webcam
Ordinary webcam is lazily started during async iteration over it.
But sometimes you may want to manually pre-start webcam e.g during parallel creation of a Player instance:
const [webcam, player] = await Promise.all([ new Webcam().start(), Player.create({ clientToken: "xxx-xxx-xxx" }), ]) player.use(webcam)
Turns off webcam
Player input from webcam video