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
yanlu
2024-05-09 14:33:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4a9a311f3d349d8d730eab8f7873a90d057d3b2a
4a9a311f
1 parent
db053809
fix: 16727 功能缺陷--预约图片和android 显示不一致
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
sight_harmony/features/wdBean/src/main/ets/bean/live/LiveDetailsBean.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdBean/src/main/ets/bean/live/LiveDetailsBean.ets
View file @
4a9a311
...
...
@@ -180,6 +180,8 @@ export interface LiveInfo {
liveStyle: number;
vlive: Array<Vlive>
mlive: MLive
// 背景图片先取这个?
previewUrl: string
}
export interface MLive {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
4a9a311
...
...
@@ -4,9 +4,11 @@ import { WDPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { PlayUIComponent } from './PlayUIComponent';
import { Logger } from 'wdKit/Index';
const TAG: string = 'TopPlayComponent'
@Component
export struct TopPlayComponent {
TAG: string = 'TopPlayComponent'
@Consume @Watch('updateData') liveDetailsBean: LiveDetailsBean
playerController?: WDPlayerController
@State imgUrl: string = ''
...
...
@@ -25,8 +27,13 @@ export struct TopPlayComponent {
updateData() {
//直播新闻-直播状态 wait待开播running直播中end已结束cancel已取消paused暂停
if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
if (this.liveDetailsBean.liveInfo && this.liveDetailsBean.liveInfo.previewUrl && this.liveDetailsBean.liveInfo.previewUrl.length > 0) {
this.imgUrl = this.liveDetailsBean.liveInfo.previewUrl
Logger.debug(TAG, 'ok+' + `${this.imgUrl}`)
}
else if (this.liveDetailsBean.fullColumnImgUrls && this.liveDetailsBean.fullColumnImgUrls.length > 0) {
this.imgUrl = this.liveDetailsBean.fullColumnImgUrls[0].url
Logger.debug(TAG, 'ok-' + `${this.imgUrl}`)
}
this.isWait = this.liveDetailsBean?.liveInfo?.liveState == 'wait'
this.isEnd = this.liveDetailsBean?.liveInfo?.liveState === 'end' &&
...
...
@@ -40,7 +47,7 @@ export struct TopPlayComponent {
}
// this.playerController?.firstPlay('https://rmrbcmsonline.peopleapp.com/upload/rmh/video/mp4/202404/1713752415708fb81d0b8f137b.mp4');
if (StringUtils.isNotEmpty(playUrl)) {
Logger.debug(
'TopPlayComponent'
, `${playUrl}`)
Logger.debug(
TAG
, `${playUrl}`)
this.playerController?.firstPlay(playUrl);
}
}
...
...
@@ -57,9 +64,10 @@ export struct TopPlayComponent {
.width('100%')
.visibility(this.isWait ? Visibility.None : Visibility.Visible)
Image(this.imgUrl)
.objectFit(ImageFit.Co
ntain
)
.objectFit(ImageFit.Co
ver
)
.visibility(this.isWait || this.isEnd ? Visibility.Visible : Visibility.None)
.contrast(this.isEnd ? 0.2 : 1)
.width('100%')
PlayUIComponent({ playerController: this.playerController })
Text('直播已结束')
.fontSize('20fp')
...
...
Please
register
or
login
to post a comment