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-07-23 14:46:11 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
23945831909f680d1db1a8f7718d6859d8a1e26e
23945831
1 parent
98762801
fix: 进入视频详情,点击全屏按钮,进入全屏,拖动精度条。拖动的数和底部的精度不一样
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerFullScreenView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerFullScreenView.ets
View file @
2394583
...
...
@@ -10,13 +10,15 @@ import { window } from '@kit.ArkUI'
export struct PlayerFullScreenView {
private playerController?: WDPlayerController;
@Consume contentDetailData: ContentDetailDTO
@Consume progressVal: number;
@Consume
@Watch("updateProgress")
progressVal: number;
@Consume status: number
@Consume displayDirection: DisplayDirection
@Consume isDragging: boolean
@State videoDuration: number = this.contentDetailData?.videoInfo?.[0]?.videoDuration || 1
@State showOperator: boolean = true
private timer: number = -1
@State upProVal: string = ''
@State duration: string = DateTimeUtils.secondToTime(this.videoDuration)
getTitle() {
return this.contentDetailData?.newsTitle
...
...
@@ -27,11 +29,17 @@ export struct PlayerFullScreenView {
WDShare.shareContent(this.contentDetailData)
}
updateProgress() {
this.upProVal = DateTimeUtils.secondToTime(Math.floor((this.progressVal / 100 * this.videoDuration)))
}
aboutToAppear(): void {
WindowModel.shared.setWindowSystemBarEnable([])
this.timer = setInterval(() => {
this.showOperator = false
}, 5000)
// 初始显示
this.updateProgress()
}
aboutToDisappear(): void {
...
...
@@ -108,14 +116,15 @@ export struct PlayerFullScreenView {
})
}
@Builder
bottomBuilder() {
Column() {
Text() {
Span(
DateTimeUtils.secondToTime(Math.floor(this.progressVal / 100 * this.videoDuration))
)
Span(
this.upProVal
)
Span(' / ')
Span(
DateTimeUtils.secondToTime(this.videoDuration)
)
Span(
this.duration
)
}
.fontSize(24)
.fontColor(Color.White)
...
...
@@ -135,7 +144,7 @@ export struct PlayerFullScreenView {
this.playerController?.switchPlayOrPause()
})
Text(
DateTimeUtils.secondToTime(Math.ceil((this.progressVal / 100 * this.videoDuration)))
)
Text(
this.upProVal
)
.fontSize(12)
.fontWeight(600)
.fontColor(Color.White)
...
...
@@ -153,7 +162,7 @@ export struct PlayerFullScreenView {
}
})
Text(
DateTimeUtils.secondToTime(this.videoDuration)
)
Text(
this.duration
)
.fontSize(12)
.fontWeight(600)
.fontColor(Color.White)
...
...
Please
register
or
login
to post a comment