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
wangliang_wd
2024-08-06 13:57:27 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6fa22cd6336392eb95d91a991be06886ef0bdcef
6fa22cd6
1 parent
5dde410e
feat:增加动态详情页重播展示
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
6fa22cd
...
...
@@ -35,6 +35,7 @@ export struct WdWebLocalComponent {
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
@State isFullScreen: boolean = false;
@State isEndPlay: boolean = false;
currentChanged(){
///折叠屏转换 暂停播放器
this.controller.pause()
...
...
@@ -213,6 +214,9 @@ export struct WdWebLocalComponent {
.controls(this.isFullScreen?true:false)
.autoPlay(true)
.objectFit(ImageFit.Contain)
.onFinish(()=>{
this.isEndPlay = true
})
.onStart(() => {
this.isPause = false
})
...
...
@@ -239,6 +243,23 @@ export struct WdWebLocalComponent {
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT)
}
})
if (this.isEndPlay){
Column(){
Image($r('app.media.icon_replay')).width(40).height(40)
.onClick(() => {
this.isEndPlay = false
this.controller.start()
})
Text('重播').fontColor(Color.White).fontSize(14)
}
.backgroundColor(Color.Black)
.opacity(0.5)
.justifyContent(FlexAlign.Center)
.width(this.positionWidth)
.height(this.positionHeight)
}else {
Row() {
Image(this.isPause ? $r('app.media.icon_play') : $r('app.media.icon_pause'))
.width(24)
...
...
@@ -291,6 +312,7 @@ export struct WdWebLocalComponent {
.width("100%")
.justifyContent(FlexAlign.SpaceAround)
}
}
}
...
...
Please
register
or
login
to post a comment