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
张善主
2024-06-26 16:36:30 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
90f707420ca5fff214f4dc3f4d52ff4f542fcadf
90f70742
1 parent
39b55a41
fix(17088): 功能缺陷-【生产环境】播放暂停按钮-未自动隐藏--暂停不隐藏, 播放是4秒隐藏
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/WDAliPlayerController.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
90f7074
...
...
@@ -7,12 +7,15 @@ import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index';
import { DisplayDirection } from 'wdConstant/Index';
import { LiveFollowComponent, LottieView } from 'wdComponent/Index';
import { WDShare } from 'wdShare/Index';
import { faceDetector } from '@kit.CoreVisionKit';
//直播间播放器上层覆盖物
@Component
export struct PlayUIComponent {
playerController?: WDAliPlayerController;
//菜单键是否可见
@State @Watch('onChangeMenuVisible') isMenuVisible: boolean = true
private ispause:boolean = false
@Consume contentDetailData: ContentDetailDTO
@Consume liveRoomDataBean: LiveRoomDataBean
@State currentTime: string = ''
...
...
@@ -35,8 +38,11 @@ export struct PlayUIComponent {
let time: number = 0
if (this.isMenuVisible) {
setTimeout(() => {
if(this.ispause){
return
}
this.isMenuVisible = false
},
5
* 1000)
},
4
* 1000)
} else {
clearTimeout(time)
}
...
...
@@ -46,6 +52,16 @@ export struct PlayUIComponent {
this.onChangeMenuVisible()
this.initPlayerSet()
if(this.playerController){
this.playerController.onStatusChangeForPlayUIComponent = (status: number) => {
if(1 == status){
this.ispause = false
this.isMenuVisible = false
}else if(2 == status){
this.ispause = true
}
}
}
}
aboutToDisappear(): void {
...
...
@@ -271,6 +287,9 @@ export struct PlayUIComponent {
if (this.contentDetailData?.liveInfo?.liveState === 'wait') {
return
}
if(this.ispause){
return
}
this.isMenuVisible = !this.isMenuVisible
})
}
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/WDAliPlayerController.ets
View file @
90f7074
...
...
@@ -60,6 +60,7 @@ export class WDAliPlayerController {
// 准备完成,决定是否播放回调。如果不实现,则自动播放
public onCanplay?: () => void;
public onStatusChange?: (status: number) => void;
public onStatusChangeForPlayUIComponent?: (status: number) => void;
public onFirstFrameDisplay?: () => void
// 埋点字段
private creatStartTime: number = 0; //开始加载时间
...
...
@@ -513,6 +514,9 @@ export class WDAliPlayerController {
if (this.onStatusChange) {
this.onStatusChange(this.status)
}
if(this.onStatusChangeForPlayUIComponent){
this.onStatusChangeForPlayUIComponent(this.status)
}
}
...
...
Please
register
or
login
to post a comment