mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +00:00
add pdf of hls rfc, corrent the content type.
This commit is contained in:
parent
fa4d3cd82c
commit
81ea6d34ce
3 changed files with 8 additions and 7 deletions
BIN
trunk/doc/hls-m3u8-draft-pantos-http-live-streaming-12.pdf
Normal file
BIN
trunk/doc/hls-m3u8-draft-pantos-http-live-streaming-12.pdf
Normal file
Binary file not shown.
|
@ -564,7 +564,7 @@ int SrsHlsMuxer::_refresh_m3u8(string m3u8_file)
|
|||
|
||||
// "#EXTINF:4294967295.208,\n"
|
||||
char ext_info[25]; // 14+10+1
|
||||
len = snprintf(ext_info, sizeof(ext_info), "#EXTINF:%.3f\n", segment->duration);
|
||||
len = snprintf(ext_info, sizeof(ext_info), "#EXTINF:%.3f,\n", segment->duration);
|
||||
if ((ret = writer.write(ext_info, len, NULL)) != ERROR_SUCCESS) {
|
||||
srs_error("write m3u8 segment info failed. ret=%d", ret);
|
||||
return ret;
|
||||
|
|
|
@ -56,7 +56,7 @@ using namespace std;
|
|||
int srs_go_http_response_json(ISrsGoHttpResponseWriter* w, string data)
|
||||
{
|
||||
w->header()->set_content_length(data.length());
|
||||
w->header()->set_content_type("application/json;charset=utf-8");
|
||||
w->header()->set_content_type("application/json");
|
||||
|
||||
return w->write((char*)data.data(), data.length());
|
||||
}
|
||||
|
@ -344,17 +344,18 @@ int SrsGoHttpFileServer::serve_file(ISrsGoHttpResponseWriter* w, SrsHttpMessage*
|
|||
_mime[".mp3"] = "audio/mpeg";
|
||||
_mime[".m4a"] = "audio/x-m4a";
|
||||
_mime[".ogg"] = "audio/ogg";
|
||||
_mime[".m3u8"] = "application/x-mpegURL;charset=utf-8";
|
||||
// @see hls-m3u8-draft-pantos-http-live-streaming-12.pdf, page 5.
|
||||
_mime[".m3u8"] = "application/vnd.apple.mpegurl"; // application/x-mpegURL
|
||||
_mime[".rss"] = "application/rss+xml";
|
||||
_mime[".json"] = "application/json;charset=utf-8";
|
||||
_mime[".json"] = "application/json";
|
||||
_mime[".swf"] = "application/x-shockwave-flash";
|
||||
_mime[".doc"] = "application/msword";
|
||||
_mime[".zip"] = "application/zip";
|
||||
_mime[".rar"] = "application/x-rar-compressed";
|
||||
_mime[".xml"] = "text/xml;charset=utf-8";
|
||||
_mime[".html"] = "text/html;charset=utf-8";
|
||||
_mime[".xml"] = "text/xml";
|
||||
_mime[".html"] = "text/html";
|
||||
_mime[".js"] = "text/javascript";
|
||||
_mime[".css"] = "text/css;charset=utf-8";
|
||||
_mime[".css"] = "text/css";
|
||||
_mime[".ico"] = "image/x-icon";
|
||||
_mime[".png"] = "image/png";
|
||||
_mime[".jpeg"] = "image/jpeg";
|
||||
|
|
Loading…
Reference in a new issue