1
0
Fork 0
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:
winlin 2016-03-10 12:16:51 +08:00
parent 82aa9d120c
commit a3038b1274

View file

@ -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
};