Add WebRTC support using libdatachannel
The WebRTC is exposed via `/video.html` endpoint and enabled by default as long as h264 stream is available.
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
|
||||
#include "http.h"
|
||||
|
||||
static void http_write_response(
|
||||
void http_write_response(
|
||||
FILE *stream,
|
||||
const char *status,
|
||||
const char *content_type,
|
||||
@ -46,6 +46,11 @@ void http_200(FILE *stream, const char *data)
|
||||
http_write_response(stream, "200 OK", NULL, data ? data : "Nothing here.\n", 0);
|
||||
}
|
||||
|
||||
void http_400(FILE *stream, const char *data)
|
||||
{
|
||||
http_write_response(stream, "400 Bad Request", NULL, data ? data : "Nothing here.\n", 0);
|
||||
}
|
||||
|
||||
void http_404(FILE *stream, const char *data)
|
||||
{
|
||||
http_write_response(stream, "404 Not Found", NULL, data ? data : "Nothing here.\n", 0);
|
||||
|
Reference in New Issue
Block a user