Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2014-04-20 15:00:34 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
dcb9941ed7835fc24cfa1d58f14112ac65a9c1d0
dcb9941e
1 parent
8bf1f4ad
add hls api to api-server
显示空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
6 行增加
和
0 行删除
trunk/research/api-server/server.py
trunk/research/api-server/server.py
查看文件 @
dcb9941
...
...
@@ -378,6 +378,11 @@ class RESTServers(object):
url
=
"http://
%
s:8080/
%
s.html"
%
(
self
.
__server_ip
,
stream
)
elif
action
==
"rtmp"
:
url
=
"../../players/srs_player.html?server=
%
s&vhost=
%
s&app=
%
s&stream=
%
s&autostart=true"
%
(
self
.
__server_ip
,
self
.
__server_ip
,
stream
.
split
(
"/"
)[
0
],
stream
.
split
(
"/"
)[
1
])
elif
action
==
"hls"
:
hls_url
=
"http://
%
s:8080/
%
s"
%
(
self
.
__server_ip
,
stream
);
if
stream
.
startswith
(
"http://"
):
hls_url
=
stream
;
return
self
.
__generate_hls
(
hls_url
.
replace
(
".m3u8.m3u8"
,
".m3u8"
))
else
:
url
=
"http://
%
s:8080/api/v1/versions"
%
(
self
.
__server_ip
)
# others, default.
...
...
@@ -582,6 +587,7 @@ class V1(object):
},
"GET id=ingest&action=play&stream=live/livestream"
:
"play the ingest HLS stream on raspberry-pi"
,
"GET id=ingest&action=rtmp&stream=live/livestream"
:
"play the ingest RTMP stream on raspberry-pi"
,
"GET id=ingest&action=hls&stream=live/livestream.m3u8"
:
"play the ingest HLS stream on raspberry-pi"
,
"GET id=ingest&action=mgmt"
:
"open the HTTP api url of raspberry-pi"
,
"GET id=meeting"
:
"redirect to local raspberry-pi meeting url(local ignored)"
,
"GET id=meeting&local=false&index=0"
:
"play the first(index=0) meeting HLS stream on demo.chnvideo.com(not local)"
,
...
...
请
注册
或
登录
后发表评论