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:
parent
018af55d65
commit
fe87bf1b61
2 changed files with 81 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue