正在显示
1 个修改的文件
包含
3 行增加
和
0 行删除
@@ -376,6 +376,8 @@ class RESTServers(object): | @@ -376,6 +376,8 @@ class RESTServers(object): | ||
376 | elif id == "ingest" or id == "pi": | 376 | elif id == "ingest" or id == "pi": |
377 | if action == "play": | 377 | if action == "play": |
378 | url = "http://%s:8080/%s.html"%(self.__server_ip, stream) | 378 | url = "http://%s:8080/%s.html"%(self.__server_ip, stream) |
379 | + elif action == "rtmp": | ||
380 | + 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]) | ||
379 | else: | 381 | else: |
380 | url = "http://%s:8080/api/v1/versions"%(self.__server_ip) | 382 | url = "http://%s:8080/api/v1/versions"%(self.__server_ip) |
381 | # others, default. | 383 | # others, default. |
@@ -579,6 +581,7 @@ class V1(object): | @@ -579,6 +581,7 @@ class V1(object): | ||
579 | "body": "the new raspberry-pi server ip." | 581 | "body": "the new raspberry-pi server ip." |
580 | }, | 582 | }, |
581 | "GET id=ingest&action=play&stream=live/livestream": "play the ingest HLS stream on raspberry-pi", | 583 | "GET id=ingest&action=play&stream=live/livestream": "play the ingest HLS stream on raspberry-pi", |
584 | + "GET id=ingest&action=rtmp&stream=live/livestream": "play the ingest RTMP stream on raspberry-pi", | ||
582 | "GET id=ingest&action=mgmt": "open the HTTP api url of raspberry-pi", | 585 | "GET id=ingest&action=mgmt": "open the HTTP api url of raspberry-pi", |
583 | "GET id=meeting": "redirect to local raspberry-pi meeting url(local ignored)", | 586 | "GET id=meeting": "redirect to local raspberry-pi meeting url(local ignored)", |
584 | "GET id=meeting&local=false&index=0": "play the first(index=0) meeting HLS stream on demo.chnvideo.com(not local)", | 587 | "GET id=meeting&local=false&index=0": "play the first(index=0) meeting HLS stream on demo.chnvideo.com(not local)", |
-
请 注册 或 登录 后发表评论