Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wuyanan
2024-09-24 15:10:04 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ab8ea3fa489cd1ca2ede193738bc5c3e0e26dc1
4ab8ea3f
1 parent
12ef6b2d
ref |> 修复缺陷 19128-进入热点-大图卡-姜尚竖屏直播,向右滑动,点击清屏按钮,返回卡顿,清屏按钮没立马消失
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
4ab8ea3
...
...
@@ -41,6 +41,8 @@ export struct DetailPlayVLivePage {
@Consume @Watch('closeFullScreen') pageHide: number
@Consume contentId: string
@State swiperIndex: number = 1
///是否展示清屏按钮
@State showClearButton: boolean = false
@Consume liveDetailPageLogic: LiveDetailPageLogic
@Provide lastInputedComment: LiveRoomItemBean = {} as LiveRoomItemBean // 上次输入的消息
//播放错误
...
...
@@ -198,6 +200,7 @@ export struct DetailPlayVLivePage {
playerController: this.playerController,
swiperController: this.swiperController,
swiperIndex: $swiperIndex,
showClearButton: $showClearButton
})
// 直播资源加载失败
...
...
@@ -241,7 +244,7 @@ export struct DetailPlayVLivePage {
Image($r('app.media.icon_live_more'))
.width(40)
.aspectRatio(1)
.visibility(this.s
wiperIndex === 0
? Visibility.Visible : Visibility.Hidden)
.visibility(this.s
howClearButton
? Visibility.Visible : Visibility.Hidden)
.position({ x: '100%', y: '100%' })
.markAnchor({ x: 56, y: this.bottomSafeHeight })
.onClick(() => {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerInfoComponent.ets
View file @
4ab8ea3
...
...
@@ -10,9 +10,9 @@ export struct PlayerInfoComponent {
@Consume liveState: string
@Consume isShowControl: boolean
@Link swiperIndex: number
@Link showClearButton: boolean
@Provide isFullScreen: boolean = false // 判断是否全屏,全屏状态下swiper禁止切换
build() {
Column() {
Swiper(this.swiperController) {
...
...
@@ -35,12 +35,23 @@ export struct PlayerInfoComponent {
this.isShowControl = !this.isShowControl
}
})
.onChange((index) => {
this.swiperIndex = index
.onGestureSwipe((index: number, extraInfo: SwiperAnimationEvent) => {
this.dealShowClearButton(index,extraInfo.currentOffset)
})
.onAnimationEnd((index: number, extraInfo: SwiperAnimationEvent) => {
this.dealShowClearButton(index,extraInfo.currentOffset)
})
.disableSwipe(this.isFullScreen)
}
.height('100%')
.width('100%')
}
dealShowClearButton(index:number, currentOffset: number) {
this.swiperIndex = index
if (index == 0) {
this.showClearButton = currentOffset >= 0;
}else if (index == 1) {
this.showClearButton = false
}
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment