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
liyubing
2024-06-20 14:30:33 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
5341a2ab43cc04edb6e87b432063c98ea17895f4
5341a2ab
2 parents
5650a0de
67132589
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
5341a2a
...
...
@@ -68,7 +68,9 @@ export struct DetailPlayShortVideoPage {
this.queryNewsInfoOfUser()
if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) {
await this.playerController.play()
this.imageVisible = false
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
...
...
@@ -81,7 +83,9 @@ export struct DetailPlayShortVideoPage {
if (this.currentIndex === this.index) {
if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) {
await this.playerController.play()
this.imageVisible = false
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
} else {
this.playerController.pause()
}
...
...
@@ -106,14 +110,18 @@ export struct DetailPlayShortVideoPage {
this.playerController.onCanplay = async () => {
this.ratio = this.playerController.videoWidth / this.playerController.videoHeight
await this.playerController.play()
this.imageVisible = false
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
} else {
if (!this.onlyWifiLoadVideo) {
await this.playerController.pause()
} else {
await this.playerController.play()
this.imageVisible = false
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
...
...
@@ -186,7 +194,9 @@ export struct DetailPlayShortVideoPage {
await this.playerController.pause()
} else {
await this.playerController.play()
this.imageVisible = false
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
...
...
@@ -363,7 +373,9 @@ export struct DetailPlayShortVideoPage {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.imageVisible = false
this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
})
}
.width('100%')
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
View file @
5341a2a
...
...
@@ -250,6 +250,13 @@ export class WDPlayerController {
this.avPlayer?.play();
}
async startRenderFrame(cb: Function) {
this.avPlayer?.on('startRenderFrame', () => {
cb && cb();
console.info('startRenderFrame success')
})
}
async stop() {
// if (this.avPlayer == null) {
// await this.initPromise;
...
...
Please
register
or
login
to post a comment