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

refine code for link generation from rtmp url.

This commit is contained in:
winlin 2015-08-20 16:18:32 +08:00
parent fe87bf1b61
commit fcd2d3d445
2 changed files with 2 additions and 2 deletions

View file

@ -213,7 +213,7 @@ function parse_query_string(){
function parse_rtmp_url(rtmp_url) {
// @see: http://stackoverflow.com/questions/10469575/how-to-use-location-object-to-parse-url-without-redirecting-the-page-in-javascri
var a = document.createElement("a");
a.href = rtmp_url.replace("rtmp://", "http://");
a.href = rtmp_url.replace("rtmp://", "http://").replace("?", "...").replace("=", "...");
var vhost = a.hostname;
var port = (a.port == "")? "1935":a.port;