Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Stream ¶
Stream represents a single video feed.
Example ¶
// Stream objects implement the http.Handler interface, // allowing to use them with the net/http package like so: strm := NewStream() http.Handle("/camera", strm) // Then push new JPEG frames to the connected clients using stream.UpdateJPEG(). go log.Fatal(http.ListenAndServe(":8080", nil)) //UpdateJPEG(somethingImage)
Output:
func (*Stream) ServeHTTP ¶
func (s *Stream) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP responds to HTTP requests with the MJPEG stream, implementing the http.Handler interface.
func (*Stream) UpdateJPEG ¶
UpdateJPEG pushes a new JPEG frame onto the clients.
Click to show internal directories.
Click to hide internal directories.