1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +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 * depends: jquery1.10
* https://code.csdn.net/snippets/147103 * https://code.csdn.net/snippets/147103
* @see: http://blog.csdn.net/win_lin/article/details/17994347 * @see: http://blog.csdn.net/win_lin/article/details/17994347
* v 1.0.14 * v 1.0.15
*/ */
/** /**
@ -307,9 +307,15 @@ function parse_rtmp_url(rtmp_url) {
} }
} }
// parse the schema
var schema = "rtmp";
if (rtmp_url.indexOf("://") > 0) {
schema = rtmp_url.substr(0, rtmp_url.indexOf("://"));
}
var ret = { var ret = {
url: rtmp_url, url: rtmp_url,
schema: a.protocol.replace(":", ""), schema: schema,
server: a.hostname, port: port, server: a.hostname, port: port,
vhost: vhost, app: app, stream: stream vhost: vhost, app: app, stream: stream
}; };