func (s *Stream) Serve(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", s.mimeType)
	w.WriteHeader(http.StatusOK)

	logger.Infof("[stream] transcoding video file to %s", s.mimeType)

	// process killing should be handled by command context

	_, err := io.Copy(w, s.Stdout)
	if err != nil {
		logger.Errorf("[stream] error serving transcoded video file: %s", err.Error())
	}
}
// Serve is an http handler function that serves the stream.
Serve is an http handler function that serves the stream.
// Serve is an http handler function that serves the stream .
func (s *Stream) Serve(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", s.mimeType)
	w.WriteHeader(http.StatusOK)
	logger.Infof("[stream] transcoding video file to %s", s.mimeType)
	_, err := io.Copy(w, s.Stdout)
	if err != nil {
		logger.Errorf("[stream] error serving transcoded video file: %s", err.Error())
	}
}
func ( s * Stream ) Serve ( w http . ResponseWriter , r * http . Request ) { w . Header ( ) . Set ( " " , s . mimeType ) w . WriteHeader ( http . StatusOK ) logger . Infof ( " " , s . mimeType ) _ , err := io . Copy ( w , s . Stdout ) if err != nil { logger . Errorf ( " " , err . Error ( ) ) } }
Serve is an http handler function that serves the stream.
Serve is an http handler function that serves the stream .
// process killing should be handled by command context