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-09-04 14:52:08 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
a69953841e00bab8a793a87739c1a985d04f1d88
a6995384
2 parents
2f295599
6adc7344
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
a699538
...
...
@@ -93,12 +93,14 @@ export struct DetailPlayShortVideoPage {
async videoStatusChange() {
if (this.currentIndex === this.index) {
if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) {
await this.playerController.play()
// await this.playerController.play()
this.playerController?.switchPlayOrPause();
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
} else {
this.playerController.stop()
// this.playerController.stop()
this.playerController.pause()
}
}
}
...
...
@@ -246,7 +248,8 @@ export struct DetailPlayShortVideoPage {
async aboutToDisappear(): Promise<void> {
console.log(TAG, 'aboutToDisappear', this.index)
await this.playerController?.pause()
await this.playerController?.release();
// await this.playerController?.stop()
// await this.playerController?.release();
}
/**
...
...
@@ -266,6 +269,7 @@ export struct DetailPlayShortVideoPage {
// height = rect.width
// }
// 视频宽高比屏幕大,则宽度撑满
//console.log(`cj2024 ratio = ${this.ratio} width / height = ${width / height}`)
if (this.ratio > width / height) {
this.playerWidth = '100%'
this.playerHeight = px2vp(width / this.ratio)
...
...
@@ -274,7 +278,7 @@ export struct DetailPlayShortVideoPage {
this.playerHeight = '100%'
this.playerWidth = px2vp(height * this.ratio)
}
console.log('calculatePlayerRect=====', width, h
eight)
//console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerH
eight)
}
...
...
@@ -321,6 +325,7 @@ export struct DetailPlayShortVideoPage {
}
}
// .backgroundColor(Color.Green)
.width('100%')
.layoutWeight(1)
.onClick(() => {
...
...
@@ -467,6 +472,8 @@ export struct DetailPlayShortVideoPage {
}
.width('100%')
.height('100%')
// .backgroundColor(Color.Orange)
// .opacity(0.2)
}
...
...
Please
register
or
login
to post a comment