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-09-14 13:48:17 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
5409e788de63ec435e7b1045942808e82bd7531a
5409e788
2 parents
e2baa1a8
9999a218
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
5409e78
...
...
@@ -5,7 +5,7 @@ import { TopPlayComponent } from '../widgets/details/video/TopPlayComponet';
import { DisplayDirection } from 'wdConstant/Index';
import mediaquery from '@ohos.mediaquery';
import { CustomToast, Logger, WindowModel } from 'wdKit/Index';
import { router, window } from '@kit.ArkUI';
import {
display,
router, window } from '@kit.ArkUI';
import { WDAliPlayerController } from 'wdPlayer/Index';
import { LiveOperRowListView } from 'wdComponent';
import { publishCommentModel } from 'wdComponent/src/main/ets/components/comment/model/PublishCommentModel';
...
...
@@ -49,8 +49,9 @@ export struct DetailPlayLivePage {
@Provide banComment: boolean = true
@State isEnd: boolean = false
@Consume liveDetailPageLogic: LiveDetailPageLogic
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
@State topPlayHeight:number = this.getTopPlayHeight()
@StorageProp('currentBreakpoint') @Watch("currentChanged")currentBreakpoint: string = 'sm';
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
bgColor: 0xB3000000,
...
...
@@ -162,7 +163,7 @@ export struct DetailPlayLivePage {
build() {
Column() {
TopPlayComponent({ playerController: this.playerController, isEnd: this.isEnd, lastLiveControl: this.lastLiveControl })
.height(this.displayDirection == DisplayDirection.VERTICAL ?
211
: '100%')
.height(this.displayDirection == DisplayDirection.VERTICAL ?
this.topPlayHeight
: '100%')
.margin({
top: this.displayDirection == DisplayDirection.VERTICAL ? px2vp(this.topSafeHeight) : 0
})
...
...
@@ -274,4 +275,14 @@ export struct DetailPlayLivePage {
})
}
getTopPlayHeight() {
let screenWidth = display.getDefaultDisplaySync().width
return px2vp(screenWidth) * 9/16.0
}
currentChanged() {
this.topPlayHeight = this.getTopPlayHeight()
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment