Skip to content
websharper-samplesPublic

About

WebRTC samples for WebSharper

Resources

Stars

2 stars

Watchers

9 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebSharper WebRTC

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.

screenshot

Try it live

What it shows

  • Capturing the webcam with navigator.mediaDevices.getUserMedia and feeding a hidden <video>.
  • Drawing each frame onto a canvas and converting the pixels to ASCII on a requestAnimationFrame loop, driven by a WebSharper.UI Var<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.

Running locally

dotnet run --project src

Then open http://localhost:5592 and allow camera access.

Building

dotnet build src/WebRTC.fsproj -c Release

Deployment

Every push to master builds in Release and publishes src/wwwroot to the gh-pages branch via .github/workflows/deploy.yml.

About

WebRTC samples for WebSharper

Resources

Stars

2 stars

Watchers

9 watching

Forks

Releases

Packages

Contributors

Languages