A webcam-to-ASCII demo built with WebSharper and the WebSharper.WebRTC bindings: grant camera access and watch your feed rendered as ASCII art on a hidden canvas.
- Capturing the webcam with
navigator.mediaDevices.getUserMediaand feeding a hidden<video>. - Drawing each frame onto a canvas and converting the pixels to ASCII on a
requestAnimationFrameloop, driven by a WebSharper.UIVar<string>.
Note: the WebSharper.WebRTC binding still wraps the legacy, removed
navigator.getUserMedia API, so src/Client.fs calls the modern promise-based
API through a small inline instead. The original samples that depended on
WebSharper.WebAudio (which has no WebSharper 10 binding) are not part of this
rewrite.
dotnet run --project src
Then open http://localhost:5592 and allow camera access.
dotnet build src/WebRTC.fsproj -c Release
Every push to master builds in Release and publishes src/wwwroot to the
gh-pages branch via .github/workflows/deploy.yml.
