From 4841435b14bc1ae2c434a5a078dba5368f48d48b Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 19 Mar 2016 22:45:39 +0800 Subject: [PATCH] fix default http port bug. --- trunk/research/players/js/winlin.utility.js | 4 ++-- trunk/research/players/srs_player.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/trunk/research/players/js/winlin.utility.js b/trunk/research/players/js/winlin.utility.js index 4c3ecccc7..2d82ecc64 100644 --- a/trunk/research/players/js/winlin.utility.js +++ b/trunk/research/players/js/winlin.utility.js @@ -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.16 + * v 1.0.17 */ /** @@ -296,7 +296,6 @@ function parse_rtmp_url(rtmp_url) { a.href = rtmp_url.replace("rtmp://", "http://"); var vhost = a.hostname; - var port = (a.port == "")? "1935":a.port; var app = a.pathname.substr(1, a.pathname.lastIndexOf("/") - 1); var stream = a.pathname.substr(a.pathname.lastIndexOf("/") + 1); @@ -328,6 +327,7 @@ function parse_rtmp_url(rtmp_url) { if (rtmp_url.indexOf("://") > 0) { schema = rtmp_url.substr(0, rtmp_url.indexOf("://")); } + var port = (a.port == "")? (schema=="http"?"80":"1935"):a.port; var ret = { url: rtmp_url, diff --git a/trunk/research/players/srs_player.html b/trunk/research/players/srs_player.html index a17394481..b2225eca1 100755 --- a/trunk/research/players/srs_player.html +++ b/trunk/research/players/srs_player.html @@ -401,10 +401,10 @@ - + - +