mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
实现hls按需拉流
This commit is contained in:
@@ -834,7 +834,7 @@ void installWebApi() {
|
||||
<< allArgs["stream"] << "?vhost="
|
||||
<< allArgs["vhost"];
|
||||
|
||||
addFFmpegSource("http://live.hkstv.hk.lxdns.com/live/hks2/playlist.m3u8",/** ffmpeg拉流支持任意编码格式任意协议 **/
|
||||
addFFmpegSource("http://hls-ott-zhibo.wasu.tv/live/272/index.m3u8",/** ffmpeg拉流支持任意编码格式任意协议 **/
|
||||
dst_url,
|
||||
(1000 * timeout_sec) - 500,
|
||||
[invoker,val,headerOut](const SockException &ex,const string &key){
|
||||
|
||||
@@ -441,7 +441,7 @@ void installWebHook(){
|
||||
//如果没有url参数,客户端又不支持cookie,那么会根据ip和端口追踪用户
|
||||
//追踪用户的目的是为了缓存上次鉴权结果,减少鉴权次数,提高性能
|
||||
NoticeCenter::Instance().addListener(nullptr,Broadcast::kBroadcastHttpAccess,[](BroadcastHttpAccessArgs){
|
||||
if(sender.get_peer_ip() == "127.0.0.1" && args._param_strs == hook_adminparams){
|
||||
if(sender.get_peer_ip() == "127.0.0.1" && parser.Params() == hook_adminparams){
|
||||
//如果是本机或超级管理员访问,那么不做访问鉴权;权限有效期1个小时
|
||||
invoker("","",60 * 60);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user