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
王士厅
2024-08-09 17:20:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bb22b8cfb61fc543bec82adc738c6ddd6fa9f8cf
bb22b8cf
1 parent
115ff784
fix: 折叠屏--直播预告稿件详情页面,上方展示的大图被过度拉近,导致直播的文字信息展示不完整
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
4 deletions
sight_harmony/AppScope/app.json5
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/AppScope/app.json5
View file @
bb22b8c
...
...
@@ -2,8 +2,8 @@
"app"
:
{
"bundleName"
:
"com.peopledailychina.hosactivity"
,
"vendor"
:
"$string:app_vendor"
,
"versionCode"
:
7393
,
"versionName"
:
"7.3.9.3"
,
"versionCode"
:
7394
,
"versionName"
:
"7.3.9.4"
,
"icon"
:
"$media:app_icon"
,
"label"
:
"$string:app_name"
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
bb22b8c
import { ContentDetailDTO, LiveRoomItemBean } from 'wdBean/Index';
import { Logger, StringUtils } from 'wdKit/Index';
import { Logger, StringUtils
, WindowModel
} from 'wdKit/Index';
import { PlayerConstants, WDAliPlayerController, WDPlayerRenderLiveView } from 'wdPlayer/Index';
import { PlayUIComponent } from './PlayUIComponent';
import { PictureLoading } from '../../vertical/PictureLoading';
...
...
@@ -7,6 +7,7 @@ import { TrackConstants } from 'wdTracking/Index';
import { LiveDetailPageLogic } from '../../../viewModel/LiveDetailPageLogic';
import { LiveEmptyComponent, WDLiveViewDefaultType } from 'wdComponent/Index';
import { LiveMessageOptType } from 'wdBean/src/main/ets/bean/live/LiveRoomBean';
import { window } from '@kit.ArkUI';
const TAG: string = 'TopPlayComponent'
...
...
@@ -42,6 +43,11 @@ export struct TopPlayComponent {
@Prop @Watch("liveIMControlMessageChange") lastLiveControl: LiveRoomItemBean = {} as LiveRoomItemBean // IM 控制消息
///是否是手动点击暂停,手动暂停的,页面重新出现时,不自动恢复播放
manualClickPauseOrPlay: boolean = false
private windowClass?: window.Window
private screenWidth: number = 0
@State isZDP: boolean = false // 是否折叠屏 默认false
@State windowWidth: number = AppStorage.get<number>('windowWidth') || 0
pageShowChange() {
if (this.manualClickPauseOrPlay) {
return
...
...
@@ -81,6 +87,21 @@ export struct TopPlayComponent {
}
}
this.updateData()
this.windowClass = WindowModel.shared.getWindowClass(); // 获取应用主窗口
this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width
console.log('ENewspaperPageComponent this.screenWidth', this.screenWidth)
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZDP = this.screenWidth > 2000 ? true : false
this.resizeWindow()
}
resizeWindow() {
this.windowClass?.on('windowSizeChange', () => {
this.screenWidth = this.windowClass?.getWindowProperties()?.windowRect.width || this.windowWidth
// 2000折叠屏 TODO DeviceUtil 方法完善了换判断条件
this.isZDP = this.screenWidth > 2000 ? true : false
});
}
/**
...
...
@@ -242,13 +263,14 @@ export struct TopPlayComponent {
} else {
// 直播房间图
Image(this.previewUrl)
.objectFit(
ImageFit.Cover
)
.objectFit(
this.isZDP ? ImageFit.Contain : ImageFit.Fill
)
.alt($r('app.media.live_room_image_fail'))
.visibility(this.isWait || this.isEnd ? Visibility.Visible :
Visibility.None)// .contrast(this.isEnd ? 0.4 : 1)
.blur(this.isEnd ? 20 : 0)
.width('100%')
if (this.liveDetailPageLogic.showPad) {
// 有垫片
if (this.liveDetailPageLogic.padImageUri.length > 0) {
...
...
Please
register
or
login
to post a comment