mirror of
https://github.com/gen2brain/cam2ip.git
synced 2025-12-16 12:28:35 +00:00
Add option to draw images with WebGL
This commit is contained in:
@@ -24,6 +24,7 @@ type Server struct {
|
||||
Delay int
|
||||
FrameWidth float64
|
||||
FrameHeight float64
|
||||
WebGL bool
|
||||
|
||||
Camera *camera.Camera
|
||||
}
|
||||
@@ -42,7 +43,7 @@ func (s *Server) ListenAndServe() error {
|
||||
basic = auth.NewBasicAuthenticator(realm, auth.HtpasswdFileProvider(s.Htpasswd))
|
||||
}
|
||||
|
||||
http.Handle("/html", newAuthHandler(handlers.NewHTML(s.Bind, s.FrameWidth, s.FrameHeight), basic))
|
||||
http.Handle("/html", newAuthHandler(handlers.NewHTML(s.Bind, s.FrameWidth, s.FrameHeight, s.WebGL), basic))
|
||||
http.Handle("/jpeg", newAuthHandler(handlers.NewJPEG(s.Camera), basic))
|
||||
http.Handle("/mjpeg", newAuthHandler(handlers.NewMJPEG(s.Camera, s.Delay), basic))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user