Optional
videoConstraints: MediaTrackConstraintsconstraints to be merged with defaultVideoConstraints and to be passed to navigator.mediaDevices.getUserMedia()
Specifies if the webcam is currently active.
The webcam is considered active if it has been started and has not been stopped afterwards
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)
Player input from webcam video