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-10-24 17:41:35 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5bfc66a219b1c91254dc8751de13ae9a4648a300
5bfc66a2
1 parent
8fcc0f95
feat:优化文章详情页视频播放
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
9 deletions
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
sight_harmony/commons/wdWebComponent/src/main/ets/pages/WdWebLocalComponent.ets
View file @
5bfc66a
...
...
@@ -126,8 +126,20 @@ export struct WdWebLocalComponent {
if (this.videoUrl) {
Stack({ alignContent: Alignment.Bottom }) {
ForEach([this.videoUrl], (compIndex: number) => {
///解决播放器复用问题,后期优化(第二段视频播放器会先闪现第一段视频的画面)
ListItem() {
this.videoComp()
}
.onClick(() => {
if (this.progressOpacity <= 0) {
this.progressOpacity = 1
} else {
this.progressOpacity = 0
}
})
})
}
.width(this.positionWidth)
.height(this.positionHeight)
.alignRules({
...
...
@@ -281,15 +293,6 @@ export struct WdWebLocalComponent {
WindowModel.shared.setPreferredOrientation(window.Orientation.PORTRAIT)
}
})
.onClick(() => {
// animateTo({duration: 1000}, () => {
if (this.progressOpacity <= 0) {
this.progressOpacity = 1
} else {
this.progressOpacity = 0
}
// })
})
if (this.isEndPlay){
Column(){
...
...
@@ -307,6 +310,7 @@ export struct WdWebLocalComponent {
.width(this.positionWidth)
.height(this.positionHeight)
}else {
Column(){
Row() {
Image(this.isPause ? $r('app.media.icon_play') : $r('app.media.icon_pause'))
.interpolation(ImageInterpolation.Medium)
...
...
@@ -346,6 +350,7 @@ export struct WdWebLocalComponent {
this.controller.setCurrentTime(value);
if (mode == SliderChangeMode.End) {
if (this.isPause) {
this.progressTimerNumber = 0
this.startPlay()
} else {
this.startProgressTimer()
...
...
@@ -376,6 +381,10 @@ export struct WdWebLocalComponent {
.padding({left:16})
.alignItems(VerticalAlign.Center)
}
.justifyContent(FlexAlign.End)
.width(this.positionWidth)
.height(this.positionHeight)
}
}
}
...
...
Please
register
or
login
to post a comment