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
wangliang_wd
2024-11-07 15:49:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
1ee7be64de1ecccf65ea2bf647628cd881ed5b65
1ee7be64
1 parent
c716adb7
feat:优化视频详情页,折叠屏展示问题
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderView.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
1ee7be6
...
...
@@ -466,7 +466,7 @@ export struct PlayUIComponent {
let timer = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0)
clearTimeout(timer)
},
1
00)
},
2
00)
let timer1 = setTimeout(() => {
EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0)
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
1ee7be6
...
...
@@ -51,6 +51,7 @@ export struct DetailPlayShortVideoPage {
// @Consume windowHeight: number
@State windowHeight: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.height
@Consume topSafeHeight: number
@Consume bottomSafeHeight: number
@Consume showComment: boolean // 是否显示底部评论,首页视频频道传false
@State imageVisible: boolean = true
@State ratio: number = 16 / 9
...
...
@@ -316,8 +317,8 @@ export struct DetailPlayShortVideoPage {
this.playerHeight = px2vp(width / this.ratio)
} else {
// 否则高度撑满
this.playerHeight = px2vp(height)
this.playerWidth = px2vp(height * this.ratio)
this.playerHeight = px2vp(height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0))
this.playerWidth = px2vp((height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)) * this.ratio)
}
// console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight)
...
...
sight_harmony/features/wdPlayer/src/main/ets/pages/WDPlayerRenderView.ets
View file @
1ee7be6
...
...
@@ -51,6 +51,7 @@ export struct WDPlayerRenderView {
@State videoRatio: number = 16 / 9
@State selfSize: Size = new Size('100%', '100%');
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm';
@State isPad: boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg" ? true : false
// 是否上推视频中
...
...
@@ -178,8 +179,8 @@ export struct WDPlayerRenderView {
playerHeight = width / ratio
} else {
// 否则高度撑满
playerHeight = height
playerWidth = height * ratio
playerHeight = height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)
playerWidth = (height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)) * ratio
}
// const height = info.size.width / ratio
...
...
Please
register
or
login
to post a comment