mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
fix the rtmp url parse bug.
This commit is contained in:
parent
82aa9d120c
commit
a3038b1274
1 changed files with 8 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
|||
* depends: jquery1.10
|
||||
* https://code.csdn.net/snippets/147103
|
||||
* @see: http://blog.csdn.net/win_lin/article/details/17994347
|
||||
* v 1.0.14
|
||||
* v 1.0.15
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -306,10 +306,16 @@ function parse_rtmp_url(rtmp_url) {
|
|||
vhost = "__defaultVhost__";
|
||||
}
|
||||
}
|
||||
|
||||
// parse the schema
|
||||
var schema = "rtmp";
|
||||
if (rtmp_url.indexOf("://") > 0) {
|
||||
schema = rtmp_url.substr(0, rtmp_url.indexOf("://"));
|
||||
}
|
||||
|
||||
var ret = {
|
||||
url: rtmp_url,
|
||||
schema: a.protocol.replace(":", ""),
|
||||
schema: schema,
|
||||
server: a.hostname, port: port,
|
||||
vhost: vhost, app: app, stream: stream
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue