From d444acda4c7700401920031cf2a532105f9a8efc Mon Sep 17 00:00:00 2001 From: guangda Date: Sun, 28 Sep 2025 20:18:10 +0800 Subject: [PATCH] add tips --- features/home/src/main/ets/view/VideoDaily.ets | 4 ++++ features/videoDetail/src/main/ets/view/VideoPlayer.ets | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/features/home/src/main/ets/view/VideoDaily.ets b/features/home/src/main/ets/view/VideoDaily.ets index d8d11c4..f8b6200 100644 --- a/features/home/src/main/ets/view/VideoDaily.ets +++ b/features/home/src/main/ets/view/VideoDaily.ets @@ -138,6 +138,7 @@ export struct DailyVideo { // [End dd_palace_grid_layout] // [Start jh_xcomponent] + // [Start keyevent_interaction] XComponent({ id: '', type: 'surface', controller: this.xComponentController }) .onKeyEvent((event?: KeyEvent) => { // If the button type is pressed, the subsequent code will not be executed; the specific button logic will be executed upon release. @@ -148,6 +149,7 @@ export struct DailyVideo { if (event.keyCode === KeyCode.KEYCODE_SPACE) { this.avPlayerUtil!.playerStateControl(); } + // [StartExclude keyevent_interaction] // ESC key exits full screen if (event.keyCode === KeyCode.KEYCODE_ESCAPE) { this.windowUtil!.recover(); @@ -160,8 +162,10 @@ export struct DailyVideo { if (event.keyCode === KeyCode.KEYCODE_DPAD_LEFT) { this.avPlayerUtil!.rewind(); } + // [EndExclude keyevent_interaction] }) // [End jh_xcomponent] + // [End keyevent_interaction] } } diff --git a/features/videoDetail/src/main/ets/view/VideoPlayer.ets b/features/videoDetail/src/main/ets/view/VideoPlayer.ets index a4129da..fcd41ae 100644 --- a/features/videoDetail/src/main/ets/view/VideoPlayer.ets +++ b/features/videoDetail/src/main/ets/view/VideoPlayer.ets @@ -86,15 +86,18 @@ export struct VideoPlayer { Flex({ // [StartExclude stack_isfullscreen] // [StartExclude stack_aligncontent] + // [StartExclude click_interaction] direction: FlexDirection.Column, justifyContent: this.isHalfFolded ? FlexAlign.Start : FlexAlign.Center, alignItems: ItemAlign.Start // [EndExclude stack_isfullscreen] // [EndExclude stack_aligncontent] + // [EndExclude click_interaction] }) { Column() { // [StartExclude stack_isfullscreen] // [StartExclude stack_aligncontent] + // [StartExclude click_interaction] XComponent({ id: 'home', type: XComponentType.SURFACE, @@ -108,21 +111,26 @@ export struct VideoPlayer { .aspectRatio(1.78) // [EndExclude stack_aligncontent] // [EndExclude stack_isfullscreen] + // [EndExclude click_interaction] } .justifyContent(FlexAlign.Center) .height(this.isHalfFolded ? this.creaseRegion[0] : (this.isFullScreen ? '100%' : 'auto')) .width('100%') // [StartExclude stack_isfullscreen] + // [EndExclude click_interaction] } .width('100%') .onClick(() => { + // [StartExclude click_interaction] if (this.isShowingSideBar) { this.isShowingSideBar = false; } else { this.avPlayerUtil?.playerStateControl(); } + // [EndExclude click_interaction] }) + // [End click_interaction] .priorityGesture( TapGesture({ count: 2 }) .onAction((event: GestureEvent) => { -- Gitee