1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

update server, add rtmp pc url

This commit is contained in:
winlin 2014-04-17 10:08:04 +08:00
parent f5ff9c7241
commit 9ef7a83415

View file

@ -376,6 +376,8 @@ class RESTServers(object):
elif id == "ingest" or id == "pi": elif id == "ingest" or id == "pi":
if action == "play": if action == "play":
url = "http://%s:8080/%s.html"%(self.__server_ip, stream) 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])
else: else:
url = "http://%s:8080/api/v1/versions"%(self.__server_ip) url = "http://%s:8080/api/v1/versions"%(self.__server_ip)
# others, default. # others, default.
@ -579,6 +581,7 @@ class V1(object):
"body": "the new raspberry-pi server ip." "body": "the new raspberry-pi server ip."
}, },
"GET id=ingest&action=play&stream=live/livestream": "play the ingest HLS stream on raspberry-pi", "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=mgmt": "open the HTTP api url of 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": "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)", "GET id=meeting&local=false&index=0": "play the first(index=0) meeting HLS stream on demo.chnvideo.com(not local)",