Showing
1 changed file
with
7 additions
and
4 deletions
| 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,6 +39,10 @@ export struct PlayerVideoControlComponent { | @@ -39,6 +39,10 @@ export struct PlayerVideoControlComponent { | ||
| 39 | getBottomUIComponent() { | 39 | getBottomUIComponent() { |
| 40 | Row() { | 40 | Row() { |
| 41 | this.playOrPauseBtn() | 41 | this.playOrPauseBtn() |
| 42 | + | ||
| 43 | + if(this.contentDetailData.liveInfo?.liveState == 'running'){ | ||
| 44 | + Blank().layoutWeight(1) | ||
| 45 | + }else{ | ||
| 42 | Text(this.currentTime) | 46 | Text(this.currentTime) |
| 43 | .fontColor(Color.White) | 47 | .fontColor(Color.White) |
| 44 | .fontWeight(600) | 48 | .fontWeight(600) |
| @@ -46,9 +50,7 @@ export struct PlayerVideoControlComponent { | @@ -46,9 +50,7 @@ export struct PlayerVideoControlComponent { | ||
| 46 | .margin({ | 50 | .margin({ |
| 47 | left: 16 | 51 | left: 16 |
| 48 | }) | 52 | }) |
| 49 | - | ||
| 50 | this.playProgressView() | 53 | this.playProgressView() |
| 51 | - | ||
| 52 | Text(this.totalTime) | 54 | Text(this.totalTime) |
| 53 | .fontColor(Color.White) | 55 | .fontColor(Color.White) |
| 54 | .fontWeight(600) | 56 | .fontWeight(600) |
| @@ -56,6 +58,7 @@ export struct PlayerVideoControlComponent { | @@ -56,6 +58,7 @@ export struct PlayerVideoControlComponent { | ||
| 56 | .margin({ | 58 | .margin({ |
| 57 | right: 16 | 59 | right: 16 |
| 58 | }) | 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) |
-
Please register or login to post a comment