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

support generate link page for rtmp url

This commit is contained in:
winlin 2015-08-20 16:11:17 +08:00
parent 018af55d65
commit fe87bf1b61
2 changed files with 81 additions and 1 deletions

View file

@ -234,6 +234,15 @@ function parse_rtmp_url(rtmp_url) {
}
}
// when vhost equals to server, and server is ip,
// the vhost is __defaultVhost__
if (a.hostname == vhost) {
var re = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/;
if (re.test(a.hostname)) {
vhost = "__defaultVhost__";
}
}
var ret = {
server: a.hostname, port: port,
vhost: vhost, app: app, stream: stream