diff --git a/features/home/src/main/ets/constants/HomeConstants.ets b/features/home/src/main/ets/constants/HomeConstants.ets index 72759c33ecc9a31e28cca617cffcaa371ae05522..44ae6863fff64eb8a2e8686362f51d177773aba4 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 2f93b9d5e4cb67615a4d686e0ed73efba0ee28b3..1d5a19d5dad128c71feac118838403621b44771d 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.