wangyujian_wd

Merge remote-tracking branch 'origin/main'

... ... @@ -13,6 +13,7 @@ export struct PlayerComponent {
@State imgUrl: string = ''
@State isWait: boolean = false
@State liveStreamType: number | null = -1
@State playUrl: string = ''
aboutToAppear(): void {
if (this.playerController) {
... ... @@ -48,8 +49,10 @@ export struct PlayerComponent {
playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri
liveStreamType = this.liveDetailsBean.liveInfo.vlive[0].liveStreamType
}
this.liveStreamType = liveStreamType
this.playerController?.firstPlay(playUrl);
this.playUrl = playUrl
}
}
... ... @@ -60,12 +63,14 @@ export struct PlayerComponent {
.height('100%')
.width('100%')
.blur(100)
.renderFit(RenderFit.RESIZE_COVER)
// TODO:判断横竖屏,liveStreamType=1竖屏铺满屏幕,liveStreamType=0横屏正常展示
if (this.liveStreamType == null) {
WDPlayerRenderVLiveView({
playerController: this.playerController,
onLoad: () => {
this.playerController?.firstPlay(this.playUrl);
}
}).height('100%')
.width('100%')
... ... @@ -73,6 +78,7 @@ export struct PlayerComponent {
WDPlayerRenderView({
playerController: this.playerController,
onLoad: () => {
this.playerController?.firstPlay(this.playUrl);
}
}).padding({ top: 195 })
}
... ...
... ... @@ -33,6 +33,7 @@ export struct PlayerTitleComponent {
@Builder
getLiveStatusView() {
if (this.liveDetailsBean.rmhInfo?.rmhName) {
Row() {
Image(this.liveDetailsBean.rmhInfo?.rmhHeadUrl || '')
.width(24)
... ... @@ -53,6 +54,8 @@ export struct PlayerTitleComponent {
.backgroundColor('#4D000000')
.borderRadius(2)
.margin({ right: 8 })
}
Row() {
if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
... ...
... ... @@ -92,6 +92,7 @@ export struct WDPlayerRenderVLiveView {
// .height(this.selfSize.height)
.height('100%')
.width('100%')
.renderFit(RenderFit.RESIZE_COVER)
}
.id(this.insId)
.onAreaChange(() => {
... ... @@ -100,6 +101,7 @@ export struct WDPlayerRenderVLiveView {
.backgroundColor("#000000")
.height('100%')
.width('100%')
.renderFit(RenderFit.RESIZE_COVER)
}
updateLayout() {
... ...