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
wuyanan
2024-09-27 17:24:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
06b013392f786868a47adfbfb229398f3cbbf8cb
06b01339
1 parent
bb185d62
ref |> 修复缺陷20560 【UAT】直播中的直播详情页面,竖屏模式直播不应该展示全屏按钮,背景与安卓不一致
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
36 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayVLivePage.ets
View file @
06b0133
...
...
@@ -51,6 +51,8 @@ export struct DetailPlayVLivePage {
@State toastText: ResourceStr = "这是一个非Wi-Fi环境。请注意流量消耗"
chatRoomController: LiveDetailChatRoomController = new LiveDetailChatRoomController()
@Provide banComment: boolean = true
/// null 直播流画面类型未知,0 横屏流,1 竖屏流,后台选择画面时,以选择的为准
@Provide isVerticalStream: boolean | null = this.liveDetailPageLogic.dealLiveStreamType()
dialogToast: CustomDialogController = new CustomDialogController({
builder: CustomToast({
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
View file @
06b0133
...
...
@@ -109,4 +109,20 @@ export class LiveDetailPageLogic {
return false
}
dealLiveStreamType(): boolean | null {
if (this.contentDetailData.liveInfo.vlive && this.contentDetailData.liveInfo.vlive.count > 0) {
const liveStreamType: number | null = this.contentDetailData.liveInfo.vlive[0].liveStreamType
if (liveStreamType == null) { ///直播流画面类型位置
return null
}
if (liveStreamType == 1) { ///后台选择的竖屏流
return true
}
if (liveStreamType == 0) { ///后台选择的横屏流
return false
}
}
return true
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerComponent.ets
View file @
06b0133
...
...
@@ -27,6 +27,7 @@ export struct PlayerComponent {
@Link isPlayerError: boolean
@Link isCanplay: boolean
@State isLarge:boolean = false
@Consume isVerticalStream: boolean
pageShowChange() {
this.playerController?.play()
}
...
...
@@ -54,13 +55,15 @@ export struct PlayerComponent {
}
this.playerController.onVideoSizePlayerComponentBack = (width: number, height: number) => {
if(width>height){
if (this.isVerticalStream != null) {
return
}
if (width > height) {
this.isLarge = false
if(width > 2){
this.liveStreamType = 0
}
}else{
}else {
this.isLarge = true
this.liveStreamType = 1
}
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerUIComponent.ets
View file @
06b0133
...
...
@@ -17,6 +17,7 @@ export struct PlayerUIComponent {
@Consume isFullScreen: boolean
@Consume displayDirection: DisplayDirection
@State isPlayStatus: boolean = true;
@Consume isVerticalStream: boolean | null
onChangeMenuVisible() {
if (this.displayDirection == DisplayDirection.VERTICAL
|| !this.isShowControl
...
...
@@ -38,6 +39,10 @@ export struct PlayerUIComponent {
return
}
this.playerController.onVideoSizePlayerUIComponentMethod = (width: number, height: number) => {
if (this.isVerticalStream != null) {
this.isSmall = this.isVerticalStream == false
return
}
if (width > height){
this.isSmall = true
} else {
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerVideoControlComponent.ets
View file @
06b0133
...
...
@@ -16,7 +16,6 @@ export struct PlayerVideoControlComponent {
@Link isPlayStatus?: boolean
@Consume displayDirection: DisplayDirection
@Consume contentDetailData: ContentDetailDTO
@Consume isSmall:boolean
@Consume isFullScreen: boolean
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
aboutToAppear(): void {
...
...
@@ -61,37 +60,6 @@ export struct PlayerVideoControlComponent {
right: 16
})
}
//全屏按钮
// if(!this.isSmall) {
// Image($r('app.media.icon_live_player_full_screen'))
// .height(32)
// .width(32)
// .padding(5)
// .borderRadius($r('app.float.vp_16'))
// .border({width:0.5})
// .borderColor(0x4DFFFFFF)
// .backgroundColor(0x4D222222)
// .margin({right:10})
// .onClick(() => {
// WindowModel.shared.setSpecificSystemBarEnabled(false)
// this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
// WindowModel.shared.setPreferredOrientation(
// window.Orientation.LANDSCAPE)
// if(this.playerController){
// // if(this.playerController.onVideoSizePlayerUIComponentMethod){
// // this.playerController.onVideoSizePlayerUIComponentMethod(1,2)
// // }
// if(this.playerController.onVideoSizePlayerComponentBack){
// this.playerController.onVideoSizePlayerComponentBack(1,2)
// }
//
// if(this.playerController.onVideoSizePlayerTitleComponentBack){
// this.playerController.onVideoSizePlayerTitleComponentBack(1,2)
// }
// }
// this.isFullScreen = true
// })
// }
}
.alignItems(VerticalAlign.Center)
// .linearGradient({ angle: 0, colors: [['#99000000', 0], ['#00000000', 1]] })
...
...
Please
register
or
login
to post a comment