From 3f39441d45da2b82c69ed2e8f1936561dffe9b1d Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 14:29:47 +0800 Subject: [PATCH 1/9] 1 --- sdk/src/DirectionHandler.js | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/src/DirectionHandler.js b/sdk/src/DirectionHandler.js index 25fd1d1..c74c3b3 100644 --- a/sdk/src/DirectionHandler.js +++ b/sdk/src/DirectionHandler.js @@ -801,7 +801,6 @@ class DirectionHandler { playerHeight = height; playerWidth = height * CLOUD_PHONE_RATIO; } else if ([PROTOCOL_CONFIG.ORIENTATION[8], PROTOCOL_CONFIG.ORIENTATION[24]].includes(this.orientation)) { - console.log(4) if (this.options.keepRatio) { playerHeight = width; playerWidth = width * CLOUD_PHONE_RATIO; -- Gitee From 6f296f56f3ee308a9150c44f3671898fde8f4911 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 15:34:40 +0800 Subject: [PATCH 2/9] 1 (cherry picked from commit 70b8cb8cffd878dbd7325139550dc246209c7a09) --- sdk/demo/demo.html | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html index c75a266..80b5dda 100644 --- a/sdk/demo/demo.html +++ b/sdk/demo/demo.html @@ -833,15 +833,6 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. buttonModalEle.style.display = 'none'; } - function setResolution() { - var dom = document.getElementById('resolution'); - if (!dom) { - return; - } - var resolution = dom.options[dom.selectedIndex || 0].value; - cloudapp.setResolution(CloudApp.RESOLUTIONS[resolution]); - } - function encodeUTF8(textStr) { var encodedStr = encodeURIComponent(textStr); var encodedArray = []; -- Gitee From c27aa44ee2bd19cca32461ceeb45f9cd5a7df9f0 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 16:14:42 +0800 Subject: [PATCH 3/9] 1 --- sdk/src/AppController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/src/AppController.js b/sdk/src/AppController.js index 151a231..aa89543 100644 --- a/sdk/src/AppController.js +++ b/sdk/src/AppController.js @@ -1289,10 +1289,10 @@ class AppController { media_config: config }); arrayBuf && this.send(arrayBuf); - if (config.stream_width && config.stream_height) { + if (config.physical_width && config.physical_height) { this.nextResolution = { - width: config.stream_width, - height: config.stream_height + width: config.physical_width, + height: config.physical_height }; } } -- Gitee From 149f62236df57378fce446bf9a3a87c3c890deb7 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 16:29:29 +0800 Subject: [PATCH 4/9] 1 --- sdk/src/CPHCloudApp.js | 2 -- sdk/src/StartScreenPrint.js | 2 -- sdk/src/config/protocolConfig.js | 18 ------------------ 3 files changed, 22 deletions(-) diff --git a/sdk/src/CPHCloudApp.js b/sdk/src/CPHCloudApp.js index f309b68..4b73719 100644 --- a/sdk/src/CPHCloudApp.js +++ b/sdk/src/CPHCloudApp.js @@ -409,6 +409,4 @@ class CPHCloudApp { } } -CPHCloudApp.RESOLUTIONS = {...PROTOCOL_CONFIG.RESOLUTIONS}; - export default CPHCloudApp; diff --git a/sdk/src/StartScreenPrint.js b/sdk/src/StartScreenPrint.js index 305ded6..c1fd733 100644 --- a/sdk/src/StartScreenPrint.js +++ b/sdk/src/StartScreenPrint.js @@ -344,6 +344,4 @@ class StartScreenPrint { } } -StartScreenPrint.RESOLUTIONS = { ...PROTOCOL_CONFIG.RESOLUTIONS }; - export default StartScreenPrint; diff --git a/sdk/src/config/protocolConfig.js b/sdk/src/config/protocolConfig.js index b988289..eb622e1 100644 --- a/sdk/src/config/protocolConfig.js +++ b/sdk/src/config/protocolConfig.js @@ -120,24 +120,6 @@ const PROTOCOL_CONFIG = { 24: 'LANDSCAPE', 16: 'REVERSE_PORTRAIT' }, - RESOLUTIONS: { - DISPLAY_480P: { - width: 480, - height: 848 - }, - DISPLAY_540P: { - width: 544, - height: 960 - }, - DISPLAY_720P: { - width: 720, - height: 1280 - }, - DISPLAY_1080P: { - width: 1080, - height: 1920 - } - }, 'UHD': { stream_width: 1080, stream_height: 1920 -- Gitee From e2111ba05740015eb7223c8f2962d30da8384624 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 17:04:25 +0800 Subject: [PATCH 5/9] Revert "1" This reverts commit c27aa44ee2bd19cca32461ceeb45f9cd5a7df9f0. --- sdk/src/AppController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/src/AppController.js b/sdk/src/AppController.js index aa89543..151a231 100644 --- a/sdk/src/AppController.js +++ b/sdk/src/AppController.js @@ -1289,10 +1289,10 @@ class AppController { media_config: config }); arrayBuf && this.send(arrayBuf); - if (config.physical_width && config.physical_height) { + if (config.stream_width && config.stream_height) { this.nextResolution = { - width: config.physical_width, - height: config.physical_height + width: config.stream_width, + height: config.stream_height }; } } -- Gitee From bcb1935aab10dc550499534d3410aa3dd798878f Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Thu, 16 Jan 2025 17:06:15 +0800 Subject: [PATCH 6/9] 1 --- sdk/src/AppController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/src/AppController.js b/sdk/src/AppController.js index 151a231..aa89543 100644 --- a/sdk/src/AppController.js +++ b/sdk/src/AppController.js @@ -1289,10 +1289,10 @@ class AppController { media_config: config }); arrayBuf && this.send(arrayBuf); - if (config.stream_width && config.stream_height) { + if (config.physical_width && config.physical_height) { this.nextResolution = { - width: config.stream_width, - height: config.stream_height + width: config.physical_width, + height: config.physical_height }; } } -- Gitee From 708ba851b9d9cdfbedd331c43a1c5788fb079092 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Fri, 17 Jan 2025 17:26:12 +0800 Subject: [PATCH 7/9] 1 --- sdk/demo/demo.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html index 80b5dda..1ad258c 100644 --- a/sdk/demo/demo.html +++ b/sdk/demo/demo.html @@ -575,7 +575,7 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. ...cloudPhoneParams, channelType: channelType, ticket: '256random'.padStart(256, '0'), - aes_key: '7f3545e9bd914d93a18409e6370dff33', + aes_key: '', auth_ts: new Date().getTime(), _debug: true, auto_rotate: true, -- Gitee From 538ed0c841dbd6687e8aa16908b5ebddaef27cc0 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Mon, 20 Jan 2025 14:24:52 +0800 Subject: [PATCH 8/9] 1 --- sdk/src/AppController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sdk/src/AppController.js b/sdk/src/AppController.js index aa89543..b686eb8 100644 --- a/sdk/src/AppController.js +++ b/sdk/src/AppController.js @@ -261,6 +261,9 @@ class AppController { }; this.send = data => { + if (this.reconnection.reconnecting) { + return; + } this.socketWorker.postMessage({cmd: 'sendReq', data: data}); }; -- Gitee From 48a5f09d5b00f74d251cff384c8646f735c1f237 Mon Sep 17 00:00:00 2001 From: Yuan <294065614@qq.com> Date: Tue, 21 Jan 2025 20:18:29 +0800 Subject: [PATCH 9/9] 1 --- sdk/demo/demo.html | 8 ++++++-- sdk/src/AppController.js | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sdk/demo/demo.html b/sdk/demo/demo.html index 1ad258c..ab07452 100644 --- a/sdk/demo/demo.html +++ b/sdk/demo/demo.html @@ -451,9 +451,9 @@ Copyright 2022 Huawei Cloud Computing Technology Co., Ltd. - +