zhyz-cloudrender-v5 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cloudRender.es.js CHANGED
@@ -21126,7 +21126,7 @@ function styleInject(css, ref) {
21126
21126
  }
21127
21127
  }
21128
21128
 
21129
- var css_248z = "\r\nbody {\r\n margin: 0;\r\n padding:0;\r\n width: 100%;\r\n height: 100%;\r\n overflow:hidden;\r\n }\r\n html{\r\n height: 100vh;\r\n }\r\n #index-module_app__Lihl8{\r\n height: 100%;\r\n }\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url('https://minio.smartyunzhou.com/public/loadingGif2.gif');\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: 'FontName';\r\n font-size: 15px;\r\n color: #EA913E;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url('../image/tip.svg');\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: 'Nunito Sans';\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #FFFFFF;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #F2F3F5;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #EA913E;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ{\r\n width: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077; \r\n }\r\n .index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: '请求云渲染中...';\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n }\r\n\r\n .index-module_notSupport__cGA2B{\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n }\r\n\r\n\r\n";
21129
+ var css_248z = "body {\r\n margin: 0;\r\n padding: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\nhtml {\r\n height: 100vh;\r\n}\r\n#index-module_app__Lihl8 {\r\n height: 100%;\r\n}\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url(\"https://minio.smartyunzhou.com/public/loadingGif2.gif\");\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: \"FontName\";\r\n font-size: 15px;\r\n color: #ea913e;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url(\"../image/tip.svg\");\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: \"Nunito Sans\";\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #ffffff;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #f2f3f5;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #ea913e;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ {\r\n width: 100%;\r\n height: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077;\r\n}\r\n.index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: \"请求云渲染中...\";\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n}\r\n\r\n.index-module_notSupport__cGA2B {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n}\r\n";
21130
21130
  var style = {"app":"index-module_app__Lihl8","progress_bar":"index-module_progress_bar__plqyh","process":"index-module_process__ODoW8","progress_bar__outer":"index-module_progress_bar__outer__rPAtx","tip":"index-module_tip__Wl6-9","box":"index-module_box__INJYU","loadingText":"index-module_loadingText__33IIf","fail":"index-module_fail__ohdIh","success":"index-module_success__hMF8Z","tip1":"index-module_tip1__OjcWh","loadFailTitle":"index-module_loadFailTitle__8aKST","loadFailText":"index-module_loadFailText__oedDA","logout":"index-module_logout__OQjzv","reload":"index-module_reload__vRmQ4","btnGroup":"index-module_btnGroup__BnLL6","zhyzPayBox":"index-module_zhyzPayBox__hHgOJ","preload":"index-module_preload__eawHG","notSupport":"index-module_notSupport__cGA2B"};
21131
21131
  styleInject(css_248z);
21132
21132
 
@@ -28819,6 +28819,7 @@ class CloudRender extends DefaultApi {
28819
28819
  this.p2pWs = null;
28820
28820
  this.renderWidth = 0;
28821
28821
  this.renderHeight = 0;
28822
+ this.isWss = url.includes("https");
28822
28823
  this.webscoketCallback = () => {};
28823
28824
  const init = (async () => {
28824
28825
  initBaseInfo({
@@ -29119,7 +29120,7 @@ class CloudRender extends DefaultApi {
29119
29120
  myhostname: myhostname,
29120
29121
  protooPort: protooPort,
29121
29122
  displayName: this.username,
29122
- ishttps: this.url.includes("https"),
29123
+ ishttps: this.isWss,
29123
29124
  setRenderStatus: this.setRenderStatus
29124
29125
  });
29125
29126
  this.room = room;
@@ -29151,7 +29152,7 @@ class CloudRender extends DefaultApi {
29151
29152
  console.log("客户端渲染");
29152
29153
  createWebGLContext(ele, this.renderWidth, this.renderHeight);
29153
29154
  }
29154
- let socketUrl1 = `ws://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29155
+ let socketUrl1 = `${isWss ? 'wss' : 'ws'}://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29155
29156
  let webscoket1 = new WebSocket(socketUrl1);
29156
29157
  this.serveScoket = webscoket1;
29157
29158
  webscoket1.onmessage = info => {
package/cloudRender.js CHANGED
@@ -21131,7 +21131,7 @@ Expected function or array of functions, received type ${typeof value}.`
21131
21131
  }
21132
21132
  }
21133
21133
 
21134
- var css_248z = "\r\nbody {\r\n margin: 0;\r\n padding:0;\r\n width: 100%;\r\n height: 100%;\r\n overflow:hidden;\r\n }\r\n html{\r\n height: 100vh;\r\n }\r\n #index-module_app__Lihl8{\r\n height: 100%;\r\n }\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url('https://minio.smartyunzhou.com/public/loadingGif2.gif');\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: 'FontName';\r\n font-size: 15px;\r\n color: #EA913E;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url('../image/tip.svg');\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: 'Nunito Sans';\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #FFFFFF;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #F2F3F5;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #EA913E;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ{\r\n width: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077; \r\n }\r\n .index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: '请求云渲染中...';\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n }\r\n\r\n .index-module_notSupport__cGA2B{\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n }\r\n\r\n\r\n";
21134
+ var css_248z = "body {\r\n margin: 0;\r\n padding: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\nhtml {\r\n height: 100vh;\r\n}\r\n#index-module_app__Lihl8 {\r\n height: 100%;\r\n}\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url(\"https://minio.smartyunzhou.com/public/loadingGif2.gif\");\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: \"FontName\";\r\n font-size: 15px;\r\n color: #ea913e;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url(\"../image/tip.svg\");\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: \"Nunito Sans\";\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #ffffff;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #f2f3f5;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #ea913e;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ {\r\n width: 100%;\r\n height: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077;\r\n}\r\n.index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: \"请求云渲染中...\";\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n}\r\n\r\n.index-module_notSupport__cGA2B {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n}\r\n";
21135
21135
  var style = {"app":"index-module_app__Lihl8","progress_bar":"index-module_progress_bar__plqyh","process":"index-module_process__ODoW8","progress_bar__outer":"index-module_progress_bar__outer__rPAtx","tip":"index-module_tip__Wl6-9","box":"index-module_box__INJYU","loadingText":"index-module_loadingText__33IIf","fail":"index-module_fail__ohdIh","success":"index-module_success__hMF8Z","tip1":"index-module_tip1__OjcWh","loadFailTitle":"index-module_loadFailTitle__8aKST","loadFailText":"index-module_loadFailText__oedDA","logout":"index-module_logout__OQjzv","reload":"index-module_reload__vRmQ4","btnGroup":"index-module_btnGroup__BnLL6","zhyzPayBox":"index-module_zhyzPayBox__hHgOJ","preload":"index-module_preload__eawHG","notSupport":"index-module_notSupport__cGA2B"};
21136
21136
  styleInject(css_248z);
21137
21137
 
@@ -28824,6 +28824,7 @@ Expected function or array of functions, received type ${typeof value}.`
28824
28824
  this.p2pWs = null;
28825
28825
  this.renderWidth = 0;
28826
28826
  this.renderHeight = 0;
28827
+ this.isWss = url.includes("https");
28827
28828
  this.webscoketCallback = () => {};
28828
28829
  const init = (async () => {
28829
28830
  initBaseInfo({
@@ -29124,7 +29125,7 @@ Expected function or array of functions, received type ${typeof value}.`
29124
29125
  myhostname: myhostname,
29125
29126
  protooPort: protooPort,
29126
29127
  displayName: this.username,
29127
- ishttps: this.url.includes("https"),
29128
+ ishttps: this.isWss,
29128
29129
  setRenderStatus: this.setRenderStatus
29129
29130
  });
29130
29131
  this.room = room;
@@ -29156,7 +29157,7 @@ Expected function or array of functions, received type ${typeof value}.`
29156
29157
  console.log("客户端渲染");
29157
29158
  createWebGLContext(ele, this.renderWidth, this.renderHeight);
29158
29159
  }
29159
- let socketUrl1 = `ws://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29160
+ let socketUrl1 = `${isWss ? 'wss' : 'ws'}://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29160
29161
  let webscoket1 = new WebSocket(socketUrl1);
29161
29162
  this.serveScoket = webscoket1;
29162
29163
  webscoket1.onmessage = info => {
@@ -21132,7 +21132,7 @@ Expected function or array of functions, received type ${typeof value}.`
21132
21132
  }
21133
21133
  }
21134
21134
 
21135
- var css_248z = "\r\nbody {\r\n margin: 0;\r\n padding:0;\r\n width: 100%;\r\n height: 100%;\r\n overflow:hidden;\r\n }\r\n html{\r\n height: 100vh;\r\n }\r\n #index-module_app__Lihl8{\r\n height: 100%;\r\n }\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url('https://minio.smartyunzhou.com/public/loadingGif2.gif');\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: 'FontName';\r\n font-size: 15px;\r\n color: #EA913E;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url('../image/tip.svg');\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: 'PingFang SC';\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: 'Nunito Sans';\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #FFFFFF;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #F2F3F5;\r\n color: #1D2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #EA913E;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ{\r\n width: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG{\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077; \r\n }\r\n .index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: '请求云渲染中...';\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n }\r\n\r\n .index-module_notSupport__cGA2B{\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n }\r\n\r\n\r\n";
21135
+ var css_248z = "body {\r\n margin: 0;\r\n padding: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: hidden;\r\n}\r\nhtml {\r\n height: 100vh;\r\n}\r\n#index-module_app__Lihl8 {\r\n height: 100%;\r\n}\r\n.index-module_progress_bar__plqyh {\r\n display: inline-block;\r\n width: 300px;\r\n}\r\n\r\n.index-module_process__ODoW8 {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n}\r\n\r\n.index-module_progress_bar__outer__rPAtx {\r\n background: url(\"https://minio.smartyunzhou.com/public/loadingGif2.gif\");\r\n background-size: 100% 100%;\r\n background-repeat: no-repeat;\r\n width: 270px;\r\n height: 250px;\r\n padding: 5px;\r\n display: inline-block;\r\n}\r\n\r\n.index-module_tip__Wl6-9 {\r\n margin-top: 20px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 21px;\r\n text-align: center;\r\n letter-spacing: 0.02em;\r\n font-family: \"FontName\";\r\n font-size: 15px;\r\n color: #ea913e;\r\n letter-spacing: 4px;\r\n}\r\n\r\n.index-module_box__INJYU {\r\n text-align: center;\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n z-index: 1;\r\n top: 0;\r\n /* height: 100vh; */\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_loadingText__33IIf {\r\n font-size: 32px;\r\n color: rgb(2, 95, 116);\r\n text-transform: uppercase;\r\n letter-spacing: 8px;\r\n width: 600px;\r\n height: 200px;\r\n text-align: center;\r\n background: #fff;\r\n border-radius: 4px;\r\n padding-top: 30px;\r\n}\r\n\r\n.index-module_fail__ohdIh {\r\n z-index: 1;\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n background: rgba(0, 0, 0, 0.6);\r\n}\r\n\r\n.index-module_success__hMF8Z {\r\n width: 100%;\r\n object-fit: fill;\r\n width: 100%;\r\n height: 100%;\r\n /* position: absolute; */\r\n top: 0;\r\n z-index: 0;\r\n}\r\n\r\n.index-module_tip1__OjcWh {\r\n width: 45px;\r\n height: 45px;\r\n display: inline-block;\r\n background-image: url(\"../image/tip.svg\");\r\n}\r\n\r\n.index-module_loadFailTitle__8aKST {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 14px;\r\n line-height: 22px;\r\n /* or 157% */\r\n\r\n text-align: center;\r\n\r\n /* Neutral/10强调、正文标题 */\r\n\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_loadFailText__oedDA {\r\n font-family: \"PingFang SC\";\r\n font-style: normal;\r\n font-weight: 600;\r\n font-size: 12px;\r\n line-height: 22px;\r\n text-align: center;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_logout__OQjzv,\r\n.index-module_reload__vRmQ4 {\r\n width: 68px;\r\n height: 36px;\r\n font-family: \"Nunito Sans\";\r\n font-style: normal;\r\n font-weight: 400;\r\n font-size: 14px;\r\n line-height: 22px;\r\n color: #ffffff;\r\n padding: 8px 20px;\r\n margin-top: 20px;\r\n cursor: pointer;\r\n}\r\n\r\n.index-module_logout__OQjzv {\r\n background: #f2f3f5;\r\n color: #1d2129;\r\n}\r\n\r\n.index-module_reload__vRmQ4 {\r\n background: #ea913e;\r\n}\r\n\r\n.index-module_btnGroup__BnLL6 {\r\n margin-top: 30px;\r\n}\r\n.index-module_zhyzPayBox__hHgOJ {\r\n width: 100%;\r\n height: 100%;\r\n flex: 1;\r\n position: relative;\r\n}\r\n\r\n.index-module_preload__eawHG {\r\n position: absolute;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n right: 0;\r\n left: 0;\r\n bottom: 0;\r\n background-color: #6e7077;\r\n}\r\n.index-module_preload__eawHG:before {\r\n border-radius: 10px;\r\n font-size: 50px;\r\n color: #fff;\r\n content: \"请求云渲染中...\";\r\n width: 400px;\r\n display: block;\r\n position: absolute;\r\n top: 50%;\r\n left: calc(50% - 200px);\r\n}\r\n\r\n.index-module_notSupport__cGA2B {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n height: 100%;\r\n font-size: 24px;\r\n color: rgb(32, 32, 189);\r\n}\r\n";
21136
21136
  var style = {"app":"index-module_app__Lihl8","progress_bar":"index-module_progress_bar__plqyh","process":"index-module_process__ODoW8","progress_bar__outer":"index-module_progress_bar__outer__rPAtx","tip":"index-module_tip__Wl6-9","box":"index-module_box__INJYU","loadingText":"index-module_loadingText__33IIf","fail":"index-module_fail__ohdIh","success":"index-module_success__hMF8Z","tip1":"index-module_tip1__OjcWh","loadFailTitle":"index-module_loadFailTitle__8aKST","loadFailText":"index-module_loadFailText__oedDA","logout":"index-module_logout__OQjzv","reload":"index-module_reload__vRmQ4","btnGroup":"index-module_btnGroup__BnLL6","zhyzPayBox":"index-module_zhyzPayBox__hHgOJ","preload":"index-module_preload__eawHG","notSupport":"index-module_notSupport__cGA2B"};
21137
21137
  styleInject(css_248z);
21138
21138
 
@@ -28825,6 +28825,7 @@ Expected function or array of functions, received type ${typeof value}.`
28825
28825
  this.p2pWs = null;
28826
28826
  this.renderWidth = 0;
28827
28827
  this.renderHeight = 0;
28828
+ this.isWss = url.includes("https");
28828
28829
  this.webscoketCallback = () => {};
28829
28830
  const init = (async () => {
28830
28831
  initBaseInfo({
@@ -29125,7 +29126,7 @@ Expected function or array of functions, received type ${typeof value}.`
29125
29126
  myhostname: myhostname,
29126
29127
  protooPort: protooPort,
29127
29128
  displayName: this.username,
29128
- ishttps: this.url.includes("https"),
29129
+ ishttps: this.isWss,
29129
29130
  setRenderStatus: this.setRenderStatus
29130
29131
  });
29131
29132
  this.room = room;
@@ -29157,7 +29158,7 @@ Expected function or array of functions, received type ${typeof value}.`
29157
29158
  console.log("客户端渲染");
29158
29159
  createWebGLContext(ele, this.renderWidth, this.renderHeight);
29159
29160
  }
29160
- let socketUrl1 = `ws://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29161
+ let socketUrl1 = `${isWss ? 'wss' : 'ws'}://${this.url.split("://")[1]}websocket/${this.appliId + v4$2()}`;
29161
29162
  let webscoket1 = new WebSocket(socketUrl1);
29162
29163
  this.serveScoket = webscoket1;
29163
29164
  webscoket1.onmessage = info => {
package/package.json CHANGED
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "name": "zhyz-cloudrender-v5",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "cloudrender zhyz",
5
5
  "main": "cloudRender.es.js",
6
6
  "scripts": {
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "author": "",
10
- "license": "ISC",
11
- "__npminstall_done": true,
12
- "_from": "zhyz-cloudrender-v4@1.0.0",
13
- "_resolved": "https://registry.npmmirror.com/zhyz-cloudrender-v4/-/zhyz-cloudrender-v4-1.3.87.tgz"
14
- }
10
+ "license": "ISC"
11
+ }
package/tip.png ADDED
Binary file
@@ -0,0 +1,98 @@
1
+ // websocket-worker.js
2
+ let ws = null;
3
+ let time = 2000;
4
+ let replayCount = 0;
5
+ let maxReplayCount = 100;
6
+ let lockReconnect = false;
7
+ let replayFn = null;
8
+
9
+ // 监听主线程发来的消息
10
+ self.onmessage = function(e) {
11
+ const { type, data } = e.data;
12
+
13
+ switch(type) {
14
+ case 'init':
15
+ initWebSocket(data);
16
+ break;
17
+ case 'mouseEvent':
18
+ case 'keyEvent':
19
+ case 'wheelEvent':
20
+ sendMessage(type, data);
21
+ break;
22
+ case 'close':
23
+ closeWebSocket();
24
+ break;
25
+ }
26
+ };
27
+
28
+ function initWebSocket({ remoteIp, wsPort, streamId, isClient }) {
29
+ const ishttps = 'https:' === self.location.protocol;
30
+ const url = isClient
31
+ ? `${ishttps ? 'wss' : 'ws'}://${remoteIp}:${wsPort}/websocket/request/`
32
+ : `${ishttps ? 'wss' : 'ws'}://${remoteIp}:${wsPort}/cloudRenderInput/proxy/${streamId}`;
33
+
34
+ ws = new WebSocket(url);
35
+
36
+
37
+ ws.onopen = function() {
38
+ console.log('WebSocket connection opened');
39
+ self.postMessage({ type: 'status', status: 'open' });
40
+ };
41
+
42
+ ws.onclose = function() {
43
+ console.log('WebSocket connection closed');
44
+ self.postMessage({ type: 'status', status: 'close' });
45
+ };
46
+
47
+ ws.onerror = function(error) {
48
+ console.log('websocket已断开', error);
49
+
50
+ if (lockReconnect) return;
51
+
52
+ if (replayFn) clearTimeout(replayFn);
53
+ lockReconnect = true;
54
+
55
+ if (ws && ws.readyState === WebSocket.OPEN) {
56
+ ws.close();
57
+ }
58
+
59
+ replayFn = setTimeout(() => {
60
+ if (replayCount < maxReplayCount) {
61
+ self.postMessage({
62
+ type: 'status',
63
+ status: 'reconnecting',
64
+ count: replayCount,
65
+ nextTime: time
66
+ });
67
+
68
+ initWebSocket({ remoteIp, wsPort, streamId, isClient });
69
+ time = time * 2;
70
+ replayCount++;
71
+ }
72
+ }, time);
73
+
74
+ self.postMessage({ type: 'error', error: error.toString() });
75
+ };
76
+ }
77
+
78
+ function sendMessage(eventType, data) {
79
+ if (ws && ws.readyState === WebSocket.OPEN) {
80
+ ws.send(JSON.stringify(data));
81
+ } else {
82
+ self.postMessage({
83
+ type: 'warning',
84
+ message: 'WebSocket未连接,消息未发送',
85
+ eventType,
86
+ data
87
+ });
88
+ }
89
+ }
90
+
91
+ function closeWebSocket() {
92
+ if (ws) {
93
+ ws.close();
94
+ }
95
+ if (replayFn) {
96
+ clearTimeout(replayFn);
97
+ }
98
+ }