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
wangyujian_wd
2024-04-18 19:01:45 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
bd2222604d26b8824e2d33af59cff1f546249179
bd222260
2 parents
e3053ac5
a6d274a7
Merge remote-tracking branch 'origin/main'
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
20 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderVLiveView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
View file @
bd22226
...
...
@@ -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 })
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
bd22226
...
...
@@ -33,26 +33,29 @@ export struct PlayerTitleComponent {
@Builder
getLiveStatusView() {
Row() {
Image(this.liveDetailsBean.rmhInfo?.rmhHeadUrl || '')
.width(24)
.aspectRatio(1)
.borderRadius('50%')
.fillColor(Color.Transparent)
Text(this.liveDetailsBean.rmhInfo?.rmhName || '')
.fontSize(12)
.fontWeight(500)
.fontColor(Color.White)
.padding({
top: 2,
right: 8,
left: 4,
bottom: 2
})
if (this.liveDetailsBean.rmhInfo?.rmhName) {
Row() {
Image(this.liveDetailsBean.rmhInfo?.rmhHeadUrl || '')
.width(24)
.aspectRatio(1)
.borderRadius('50%')
.fillColor(Color.Transparent)
Text(this.liveDetailsBean.rmhInfo?.rmhName || '')
.fontSize(12)
.fontWeight(500)
.fontColor(Color.White)
.padding({
top: 2,
right: 8,
left: 4,
bottom: 2
})
}
.backgroundColor('#4D000000')
.borderRadius(2)
.margin({ right: 8 })
}
.backgroundColor('#4D000000')
.borderRadius(2)
.margin({ right: 8 })
Row() {
if (this.liveDetailsBean.liveInfo?.liveState == 'running') {
...
...
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderVLiveView.ets
View file @
bd22226
...
...
@@ -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() {
...
...
Please
register
or
login
to post a comment