Available on crate feature
input-jscam
only.Expand description
A camera that uses native browser APIs meant for WASM applications. This contains all the code for using webcams in the browser.
Anything starting with js
is meant as a binding, a.k.a. not meant for consumption.
This assumes that you are running a modern browser on the desktop.
Structs
- A wrapper around a
MediaStream
- Constraints to create a
JSCamera
- A builder that builds a
JSCameraConstraints
that is used to construct aJSCamera
. See More:Constraints MDN
,Properties of Media Tracks MDN
Enums
- The Facing Mode of the camera
- Whether the browser can crop and/or scale to match the requested resolution.
- The enum describing the possible constraints for video in the browser.
Functions
- Queries Cameras using
MediaDevices::enumerate_devices()
MDN - Queries the browser’s supported constraints using
navigator.mediaDevices.getSupportedConstraints()
- Queries the browser’s supported constraints using
navigator.mediaDevices.getSupportedConstraints()
- Requests Webcam permissions from the browser using
MediaDevices::get_user_media()
MDN