Showing
3 changed files
with
7 additions
and
5 deletions
| @@ -466,7 +466,7 @@ export struct PlayUIComponent { | @@ -466,7 +466,7 @@ export struct PlayUIComponent { | ||
| 466 | let timer = setTimeout(() => { | 466 | let timer = setTimeout(() => { |
| 467 | EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0) | 467 | EmitterUtils.sendEvent(EmitterEventId.live_FULL_SCREEN, 0) |
| 468 | clearTimeout(timer) | 468 | clearTimeout(timer) |
| 469 | - }, 100) | 469 | + }, 200) |
| 470 | 470 | ||
| 471 | let timer1 = setTimeout(() => { | 471 | let timer1 = setTimeout(() => { |
| 472 | EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0) | 472 | EmitterUtils.sendEvent(EmitterEventId.live_half_SCREEN, 0) |
| @@ -51,6 +51,7 @@ export struct DetailPlayShortVideoPage { | @@ -51,6 +51,7 @@ export struct DetailPlayShortVideoPage { | ||
| 51 | // @Consume windowHeight: number | 51 | // @Consume windowHeight: number |
| 52 | @State windowHeight: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.height | 52 | @State windowHeight: number = WindowModel.shared.getWindowClass().getWindowProperties()?.windowRect.height |
| 53 | @Consume topSafeHeight: number | 53 | @Consume topSafeHeight: number |
| 54 | + @Consume bottomSafeHeight: number | ||
| 54 | @Consume showComment: boolean // 是否显示底部评论,首页视频频道传false | 55 | @Consume showComment: boolean // 是否显示底部评论,首页视频频道传false |
| 55 | @State imageVisible: boolean = true | 56 | @State imageVisible: boolean = true |
| 56 | @State ratio: number = 16 / 9 | 57 | @State ratio: number = 16 / 9 |
| @@ -316,8 +317,8 @@ export struct DetailPlayShortVideoPage { | @@ -316,8 +317,8 @@ export struct DetailPlayShortVideoPage { | ||
| 316 | this.playerHeight = px2vp(width / this.ratio) | 317 | this.playerHeight = px2vp(width / this.ratio) |
| 317 | } else { | 318 | } else { |
| 318 | // 否则高度撑满 | 319 | // 否则高度撑满 |
| 319 | - this.playerHeight = px2vp(height) | ||
| 320 | - this.playerWidth = px2vp(height * this.ratio) | 320 | + this.playerHeight = px2vp(height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)) |
| 321 | + this.playerWidth = px2vp((height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)) * this.ratio) | ||
| 321 | } | 322 | } |
| 322 | // console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) | 323 | // console.log('cj2024 calculatePlayerRect=====', width, height,px2vp(this.windowHeight),this.playerHeight) |
| 323 | 324 |
| @@ -51,6 +51,7 @@ export struct WDPlayerRenderView { | @@ -51,6 +51,7 @@ export struct WDPlayerRenderView { | ||
| 51 | @State videoRatio: number = 16 / 9 | 51 | @State videoRatio: number = 16 / 9 |
| 52 | @State selfSize: Size = new Size('100%', '100%'); | 52 | @State selfSize: Size = new Size('100%', '100%'); |
| 53 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 | 53 | @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 |
| 54 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 54 | @StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm'; | 55 | @StorageProp('currentBreakpoint') @Watch("currentChanged") currentBreakpoint: string = 'sm'; |
| 55 | @State isPad: boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg" ? true : false | 56 | @State isPad: boolean = this.currentBreakpoint == "md" || this.currentBreakpoint == "lg" ? true : false |
| 56 | // 是否上推视频中 | 57 | // 是否上推视频中 |
| @@ -178,8 +179,8 @@ export struct WDPlayerRenderView { | @@ -178,8 +179,8 @@ export struct WDPlayerRenderView { | ||
| 178 | playerHeight = width / ratio | 179 | playerHeight = width / ratio |
| 179 | } else { | 180 | } else { |
| 180 | // 否则高度撑满 | 181 | // 否则高度撑满 |
| 181 | - playerHeight = height | ||
| 182 | - playerWidth = height * ratio | 182 | + playerHeight = height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0) |
| 183 | + playerWidth = (height - (this.isPad?(this.topSafeHeight + this.bottomSafeHeight):0)) * ratio | ||
| 183 | } | 184 | } |
| 184 | 185 | ||
| 185 | // const height = info.size.width / ratio | 186 | // const height = info.size.width / ratio |
-
Please register or login to post a comment