diff --git a/examples/images/logo-153x55.png b/examples/images/logo-153x55.png new file mode 100644 index 0000000..4a2446c Binary files /dev/null and b/examples/images/logo-153x55.png differ diff --git a/examples/images/logo.png b/examples/images/logo.png new file mode 100644 index 0000000..076ce39 Binary files /dev/null and b/examples/images/logo.png differ diff --git a/examples/live_webm.go b/examples/live_webm.go index 5c16040..8263f85 100644 --- a/examples/live_webm.go +++ b/examples/live_webm.go @@ -25,7 +25,9 @@ func (ix *Index) ServeHTTP(wr http.ResponseWriter, req *http.Request) { Live WebM video - + logo1
+
+ logo2 ` @@ -132,6 +134,10 @@ func NewWebM(width, height, fps int) *WebM { return wm } +func staticHandler(wr http.ResponseWriter, req *http.Request) { + http.ServeFile(wr, req, req.URL.Path[1:]) +} + func main() { index := &Index{384, 216} wm := NewWebM(index.width, index.height, 25) @@ -139,6 +145,7 @@ func main() { http.Handle("/", index) http.Handle("/video", wm) + http.HandleFunc("/images/", staticHandler) err := http.ListenAndServe(":8080", nil) if err != nil { log.Fatalln("http.ListenAndServe:", err)