Skip to content

Instantly share code, notes, and snippets.

@esimov
Last active July 4, 2022 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esimov/b22da1b25b0f64425150469112995a3d to your computer and use it in GitHub Desktop.
Save esimov/b22da1b25b0f64425150469112995a3d to your computer and use it in GitHub Desktop.
// +build js,wasm
package main
import (
"fmt"
"github.com/esimov/pigo/wasm/canvas"
)
func main() {
c := canvas.NewCanvas()
webcam, err := c.StartWebcam()
if err != nil {
c.Alert("Webcam not detected!")
} else {
err := webcam.Render()
if err != nil {
c.Log(fmt.Sprint(err))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment