X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxynt-streaming.js;h=13eeb7b0027ad069e1d00b328aff103cd7a15017;hb=db5d6355c39327ba7f8052f360f1e846ba4ad01c;hp=3db25a1104f0b0b4ff50a29e4114a24d65a75467;hpb=b5dae179f26df4000dc48a09acb49d5098265d25;p=brisk.git diff --git a/web/xynt-streaming.js b/web/xynt-streaming.js index 3db25a1..13eeb7b 100644 --- a/web/xynt-streaming.js +++ b/web/xynt-streaming.js @@ -544,6 +544,8 @@ xynt_streaming.prototype = { win: null, transp_type: null, transp_port: 80, + transp_type_cur: null, + transp_port_cur: 80, transp_fback: 0, transp: null, console: null, @@ -633,14 +635,24 @@ xynt_streaming.prototype = { // DEFAULT TRANSPORT PROTOCOL HERE websocketsec, websocket if (this.transp_fback > 0) { - transp_type = "websocketsec"; - transp_port = (this.transp_fback == 2 ? 80 : 8080); + if (location.protocol == 'https:') { + transp_type = "websocketsec"; + transp_port = 443; + } + else { + transp_type = "websocket"; + transp_port = (this.transp_fback == 2 ? 80 : 8080); + } + } else { transp_type = this.transp_type; transp_port = this.transp_port; } + this.transp_type_cur = transp_type; + this.transp_port_cur = transp_port; + if (transp_type == "websocket" || transp_type == "websocketsec") { var end_proto, first_slash, newpage; @@ -901,6 +913,10 @@ xynt_streaming.prototype = { // alert("SINGLE: ["+singlecomm+"]"); // window.console.log("["+singlecomm+"]"); this.cmdproc(singlecomm); + if (this.transp_type_cur) { + this.transp_type = this.transp_type_cur; + this.transp_port = this.transp_port_cur; + } again = 1; } } while (again);