From b0978c049b731039e99ca7e9573546cdcad320f6 Mon Sep 17 00:00:00 2001 From: 26thE <962961353@qq.com> Date: Mon, 24 Mar 2025 09:57:37 +0800 Subject: [PATCH 1/3] =?UTF-8?q?HMOS=E4=B8=96=E7=95=8C=E6=95=B4=E6=94=B9Sam?= =?UTF-8?q?ple=EF=BC=8C=E6=B5=81=E7=95=85=E5=88=B7=E6=96=87=E7=AB=A0?= =?UTF-8?q?=EF=BC=8CPC/2in1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.en.md | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.en.md b/README.en.md index 5444832..024e1d0 100644 --- a/README.en.md +++ b/README.en.md @@ -54,7 +54,7 @@ N/A ### Constraints -1. The sample app is supported only on Huawei phones, tablets, and 2in1 devices running the standard system. +1. The sample app is supported only on Huawei phones, tablets, and PC/2in1 devices running the standard system. 2. The HarmonyOS version must be HarmonyOS 5.0.0 Release or later. diff --git a/README.md b/README.md index 254b0cd..e52eb53 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ ### 约束与限制 -1. 本示例仅支持标准系统上运行,支持设备:phone,table,2in1。 +1. 本示例仅支持标准系统上运行,支持设备:phone,table,PC/2in1。 2. HarmonyOS系统:HarmonyOS 5.0.0 Release及以上。 -- Gitee From a49576267ff456b8fad827f2b27a009c3d426e63 Mon Sep 17 00:00:00 2001 From: 26thE <962961353@qq.com> Date: Mon, 24 Mar 2025 16:41:50 +0800 Subject: [PATCH 2/3] =?UTF-8?q?HMOS=E4=B8=96=E7=95=8C=E6=95=B4=E6=94=B9Sam?= =?UTF-8?q?ple=EF=BC=8C=E6=B5=81=E7=95=85=E5=88=B7=E6=96=87=E7=AB=A0?= =?UTF-8?q?=EF=BC=8C=E5=AE=89=E5=85=A8=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/view/SampleUnitAVPlayView.ets | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/entry/src/main/ets/view/SampleUnitAVPlayView.ets b/entry/src/main/ets/view/SampleUnitAVPlayView.ets index 9ab9ea8..abe522d 100644 --- a/entry/src/main/ets/view/SampleUnitAVPlayView.ets +++ b/entry/src/main/ets/view/SampleUnitAVPlayView.ets @@ -28,27 +28,12 @@ const SURFACE_SIZE = 1500; export default struct SampleUnitAVPlayView { @Link avPlayer: AVPlayerItem; @State xComponentWidth: string = Constants.FULL_SIZE; - @State sliderWidth: string | number = Constants.FULL_SIZE; @State xComponentHeight: string = Constants.FIFTY_SIZE; @State curTime: number = 0; private xComponentController: XComponentController = new XComponentController(); setTimeInstance: number = 1 currentSurfaceID: string = '' - aboutToAppear(): void { - if (display.getFoldStatus() === display.FoldStatus.FOLD_STATUS_EXPANDED) { - this.sliderWidth = px2vp(SURFACE_SIZE); - } - - display.on('foldStatusChange', () => { - if (display.getFoldStatus() === display.FoldStatus.FOLD_STATUS_FOLDED) { - this.sliderWidth = Constants.FULL_SIZE; - } else { - this.sliderWidth = px2vp(SURFACE_SIZE); - } - }); - } - build() { Stack({ alignContent: Alignment.Bottom }) { XComponent({ -- Gitee From 30100dfa0ccf1e8a3652900e06910aea99bf6c01 Mon Sep 17 00:00:00 2001 From: 26thE <962961353@qq.com> Date: Mon, 24 Mar 2025 16:42:37 +0800 Subject: [PATCH 3/3] =?UTF-8?q?HMOS=E4=B8=96=E7=95=8C=E6=95=B4=E6=94=B9Sam?= =?UTF-8?q?ple=EF=BC=8C=E6=B5=81=E7=95=85=E5=88=B7=E6=96=87=E7=AB=A0?= =?UTF-8?q?=EF=BC=8C=E5=AE=89=E5=85=A8=E6=89=AB=E6=8F=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/view/SampleUnitAVPlayView.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entry/src/main/ets/view/SampleUnitAVPlayView.ets b/entry/src/main/ets/view/SampleUnitAVPlayView.ets index abe522d..64b171b 100644 --- a/entry/src/main/ets/view/SampleUnitAVPlayView.ets +++ b/entry/src/main/ets/view/SampleUnitAVPlayView.ets @@ -31,8 +31,8 @@ export default struct SampleUnitAVPlayView { @State xComponentHeight: string = Constants.FIFTY_SIZE; @State curTime: number = 0; private xComponentController: XComponentController = new XComponentController(); - setTimeInstance: number = 1 - currentSurfaceID: string = '' + setTimeInstance: number = 1; + currentSurfaceID: string = ''; build() { Stack({ alignContent: Alignment.Bottom }) { -- Gitee