张善主

fix(沉浸式): 进度条处理

1 import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index' 1 import { DateFormatUtil, WDAliPlayerController } from 'wdPlayer/Index'
2 -import { LiveRoomDataBean } from 'wdBean/Index' 2 +import { ContentDetailDTO, LiveRoomDataBean } from 'wdBean/Index'
3 import { WindowModel } from 'wdKit/Index' 3 import { WindowModel } from 'wdKit/Index'
4 import { window } from '@kit.ArkUI' 4 import { window } from '@kit.ArkUI'
5 import { DisplayDirection } from 'wdConstant/Index' 5 import { DisplayDirection } from 'wdConstant/Index'
@@ -15,7 +15,7 @@ export struct PlayerVideoControlComponent { @@ -15,7 +15,7 @@ export struct PlayerVideoControlComponent {
15 //是否处于播放状态中 15 //是否处于播放状态中
16 @State isPlayStatus: boolean = true 16 @State isPlayStatus: boolean = true
17 @Consume displayDirection: DisplayDirection 17 @Consume displayDirection: DisplayDirection
18 - 18 + @Consume contentDetailData: ContentDetailDTO
19 19
20 aboutToAppear(): void { 20 aboutToAppear(): void {
21 if (this.playerController) { 21 if (this.playerController) {
@@ -39,23 +39,26 @@ export struct PlayerVideoControlComponent { @@ -39,23 +39,26 @@ export struct PlayerVideoControlComponent {
39 getBottomUIComponent() { 39 getBottomUIComponent() {
40 Row() { 40 Row() {
41 this.playOrPauseBtn() 41 this.playOrPauseBtn()
42 - Text(this.currentTime)  
43 - .fontColor(Color.White)  
44 - .fontWeight(600)  
45 - .fontSize('12fp')  
46 - .margin({  
47 - left: 16  
48 - })  
49 -  
50 - this.playProgressView()  
51 42
52 - Text(this.totalTime)  
53 - .fontColor(Color.White)  
54 - .fontWeight(600)  
55 - .fontSize('12fp')  
56 - .margin({  
57 - right: 16  
58 - }) 43 + if(this.contentDetailData.liveInfo?.liveState == 'running'){
  44 + Blank().layoutWeight(1)
  45 + }else{
  46 + Text(this.currentTime)
  47 + .fontColor(Color.White)
  48 + .fontWeight(600)
  49 + .fontSize('12fp')
  50 + .margin({
  51 + left: 16
  52 + })
  53 + this.playProgressView()
  54 + Text(this.totalTime)
  55 + .fontColor(Color.White)
  56 + .fontWeight(600)
  57 + .fontSize('12fp')
  58 + .margin({
  59 + right: 16
  60 + })
  61 + }
59 //全屏按钮 62 //全屏按钮
60 Image($r('app.media.icon_live_player_full_screen')) 63 Image($r('app.media.icon_live_player_full_screen'))
61 .height(32) 64 .height(32)