l1npengtul / nokhwa

Cross Platform Rust Library for Powerful Webcam/Camera Capture
Apache License 2.0
531 stars 137 forks source link

[Web] Update `jscam` example to function correctly in the latest version #168

Open yunho-c opened 7 months ago

yunho-c commented 7 months ago

Hi, I see that there have been breaking changes in v0.10.0 for web/wasm support.

You can still use nokhwa in the browser, you just can't use it from JS. (0.10.0 release notes)

Currently, the jscam example does not compile, and I am lost on how to configure and test using nokhwa in a browser, since there are some backend-specific code involved (i.e., do I detect platform and invoke the right backend and decoding in the runtime? how do I setup the build and feature activation in cargo.toml?)

I would like to see the examples to be in line with the current API.

I am willing to work to create a PR (likely with some help), but still created this issue so we can track progress.

l1npengtul commented 1 month ago

The entire JSCam backend is being reworked to properly fit the standard Camera API in 0.11, please be patient, I will try my best to get it released this year.