Skip to content

Commit

Permalink
fix default http port bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Mar 19, 2016
1 parent a2d235f commit 4841435
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions trunk/research/players/js/winlin.utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

/**
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions trunk/research/players/srs_player.html
Original file line number Diff line number Diff line change
Expand Up @@ -401,10 +401,10 @@ <h3><a href="https://github.com/ossrs/srs">SrsPlayer</a></h3>
<script type="text/javascript" src="js/json2.js"></script>
<script type="text/javascript" src="js/srs.page.js"></script>
<script type="text/javascript" src="js/srs.log.js"></script>
<script type="text/javascript" src="js/srs.player.js?v=1.29"></script>
<script type="text/javascript" src="js/srs.player.js"></script>
<script type="text/javascript" src="js/srs.publisher.js"></script>
<script type="text/javascript" src="js/srs.utility.js"></script>
<script type="text/javascript" src="js/winlin.utility.js?v=1.0.16"></script>
<script type="text/javascript" src="js/winlin.utility.js"></script>
<script type="text/javascript">
var srs_player = null;
var url = null;
Expand Down

0 comments on commit 4841435

Please sign in to comment.