mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
for #136, update the config for ram hls.
This commit is contained in:
parent
a23191497f
commit
dba983d124
4 changed files with 29 additions and 7 deletions
|
@ -461,6 +461,12 @@ vhost with-hls.srs.com {
|
|||
# @see https://github.com/winlinvip/simple-rtmp-server/issues/264
|
||||
# default: ignore
|
||||
hls_on_error ignore;
|
||||
# the hls storage: disk, ram or both.
|
||||
# disk, to write hls m3u8/ts to disk.
|
||||
# ram, serve m3u8/ts in memory, which use embeded http server to delivery.
|
||||
# both, disk and ram.
|
||||
# default: disk
|
||||
hls_storage disk;
|
||||
# the hls output path.
|
||||
# the app dir is auto created under the hls_path.
|
||||
# for example, for rtmp stream:
|
||||
|
@ -473,12 +479,6 @@ vhost with-hls.srs.com {
|
|||
# in a word, the hls_path is for vhost.
|
||||
# default: ./objs/nginx/html
|
||||
hls_path ./objs/nginx/html;
|
||||
# the hls storage: disk, ram or both.
|
||||
# disk, to write hls m3u8/ts to disk.
|
||||
# ram, serve m3u8/ts in memory, which use embeded http server to delivery.
|
||||
# both, disk and ram.
|
||||
# default: disk
|
||||
hls_storage disk;
|
||||
# the hls mount for hls_storage ram,
|
||||
# which use srs embeded http server to delivery HLS,
|
||||
# where the mount specifies the HTTP url to mount.
|
||||
|
|
20
trunk/conf/ram.hls.conf
Normal file
20
trunk/conf/ram.hls.conf
Normal file
|
@ -0,0 +1,20 @@
|
|||
# the config for srs to delivery hls
|
||||
# @see https://github.com/winlinvip/simple-rtmp-server/wiki/v1_CN_SampleHLS
|
||||
# @see full.conf for detail config.
|
||||
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 8080;
|
||||
dir ./objs/nginx/html;
|
||||
}
|
||||
vhost __defaultVhost__ {
|
||||
hls {
|
||||
enabled on;
|
||||
hls_fragment 10;
|
||||
hls_window 60;
|
||||
hls_storage ram;
|
||||
hls_mount /[app]/[stream].m3u8;
|
||||
}
|
||||
}
|
|
@ -175,6 +175,7 @@ private:
|
|||
std::string m3u8;
|
||||
private:
|
||||
ISrsHlsHandler* handler;
|
||||
// TODO: FIXME: supports reload.
|
||||
bool should_write_cache;
|
||||
bool should_write_file;
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue