From 15535184d2abf8f64879bd80b85d8cd80f533d74 Mon Sep 17 00:00:00 2001 From: lon9 <815882449@qq.com> Date: Sat, 14 Dec 2024 14:57:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BA=9F=E5=BC=83=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- features/home/src/main/ets/constants/HomeConstants.ets | 4 ---- features/home/src/main/ets/view/VideoDialog.ets | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/features/home/src/main/ets/constants/HomeConstants.ets b/features/home/src/main/ets/constants/HomeConstants.ets index 72759c3..44ae686 100644 --- a/features/home/src/main/ets/constants/HomeConstants.ets +++ b/features/home/src/main/ets/constants/HomeConstants.ets @@ -136,10 +136,6 @@ export class HomeConstants { */ static readonly PREVIOUS_VIDEO_CONTENTS_TWO: ResourceStr[] = [$r('app.string.europe'), $r('app.string.europe'), $r('app.string.europe'), $r('app.string.europe'), $r('app.string.europe'), $r('app.string.europe')]; - /** - * XComponent type. - */ - static readonly X_COMPONENT_TYPE: string = 'surface'; /** * Banner text letter space list. */ diff --git a/features/home/src/main/ets/view/VideoDialog.ets b/features/home/src/main/ets/view/VideoDialog.ets index 2f93b9d..1d5a19d 100644 --- a/features/home/src/main/ets/view/VideoDialog.ets +++ b/features/home/src/main/ets/view/VideoDialog.ets @@ -142,14 +142,11 @@ export struct VideoDialog { Column() { Column() { XComponent({ - id: '', - type: HomeConstants.X_COMPONENT_TYPE, + type: XComponentType.SURFACE, controller: this.xComponentController }) .borderRadius($r('app.float.x_component_radius')) .onLoad(() => { - this.xComponentController.setXComponentSurfaceSize({ surfaceWidth: - CommonConstants.X_COMPONENT_SURFACE_WIDTH, surfaceHeight: CommonConstants.X_COMPONENT_SURFACE_HEIGHT }); this.surfaceId = this.xComponentController.getXComponentSurfaceId(); }) .width(CommonConstants.FULL_PERCENT) @@ -178,8 +175,6 @@ export struct VideoDialog { .alignItems(HorizontalAlign.Start) } - - async createAvPlayer(): Promise { this.avPlayer = await media.createAVPlayer(); // Entering the idle state. -- Gitee