wangliang_wd

Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main

* 'main' of http://192.168.1.42/developOne/harmonyPool:
  fix: 进入视频详情,点击全屏按钮,进入全屏,拖动精度条。拖动的数和底部的精度不一样
  app_nam默认改为人民日报
  fix: 视频播放,标题+导读 展示4行,鸿蒙实际展示3行并折行。
... ... @@ -2,7 +2,7 @@
"string": [
{
"name": "app_name",
"value": "Sight"
"value": "人民日报"
},
{
"name": "app_desc",
... ...
... ... @@ -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)
... ...
... ... @@ -161,7 +161,7 @@ export struct PlayerTitleView {
} else {
if(this.summary) {
Text() {
Span(this.clipText(this.summary, 14, 2, this.windowWidth - 150 - vp2px(50)))
Span(this.clipText(this.summary, 14, 3, this.windowWidth - 150 - vp2px(50)))
.fontSize(14)
.fontColor(Color.White)
.lineHeight(21)
... ...