mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Player: Refine code
This commit is contained in:
parent
a28f98581e
commit
08e19406ef
5 changed files with 68 additions and 162 deletions
|
@ -539,20 +539,21 @@
|
|||
|
||||
var apply_url_change = function() {
|
||||
var rtmp = parse_rtmp_url($("#txt_url").val());
|
||||
var url = "http://" + query.host + query.pathname + "?"
|
||||
var schema = window.location.protocol;
|
||||
var url = schema + "//" + query.host + query.pathname + "?"
|
||||
+ "app=" + rtmp.app + "&stream=" + rtmp.stream
|
||||
+ "&server=" + rtmp.server + "&port=" + rtmp.port
|
||||
+ "&autostart=true";
|
||||
if (query.shp_identify) {
|
||||
url += "&shp_identify=" + query.shp_identify;
|
||||
}
|
||||
if (rtmp.vhost == "__defaultVhost__") {
|
||||
if (rtmp.vhost === "__defaultVhost__") {
|
||||
url += "&vhost=" + rtmp.server;
|
||||
} else {
|
||||
url += "&vhost=" + rtmp.vhost;
|
||||
}
|
||||
if (rtmp.schema == "http") {
|
||||
url += "&schema=http";
|
||||
if (rtmp.schema !== "rtmp") {
|
||||
url += "&schema=" + rtmp.schema;
|
||||
}
|
||||
if (query.buffer) {
|
||||
url += "&buffer=" + query.buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue