Last active
July 4, 2022 09:32
-
-
Save esimov/b22da1b25b0f64425150469112995a3d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// +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