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-25 18:22:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d90230dbba988e1621b4e8cadeb8af8005c1cc89
d90230db
1 parent
c60bc255
ref |> 观看直播全屏时,点击关注退出全屏
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
26 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/LiveFollowComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/LiveFollowComponent.ets
View file @
d90230d
...
...
@@ -18,7 +18,7 @@ export struct LiveFollowComponent {
@Prop rmhInfo: RmhInfoDTO
@Consume contentDetailData: ContentDetailDTO
@Consume @Watch('getBatchAttentionStatus') pageShow: number
clickFollowButton?:()=>void
aboutToAppear(): void {
this.getBatchAttentionStatus()
}
...
...
@@ -90,6 +90,9 @@ export struct LiveFollowComponent {
.backgroundColor(this.followStatus === '0' ? $r('app.color.color_ED2800') : $r('app.color.color_CCCCCC'))
.visibility(this.followStatus === '0' ? Visibility.Visible : Visibility.None)
.onClick(() => {
if (this.clickFollowButton) {
this.clickFollowButton()
}
this.handleAccention()
})
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/viewModel/LiveDetailPageLogic.ets
View file @
d90230d
...
...
@@ -30,7 +30,7 @@ export class LiveDetailPageLogic {
* @returns true:横屏直播;false:竖屏直播
*/
isLangScapeScreenVideo(): boolean {
return true
return this.liveState === 'wait' || this.liveLandscape === 'news'
}
...
...
@@ -40,7 +40,7 @@ export class LiveDetailPageLogic {
* @returns
*/
isVerticalScreenVideo(): boolean {
return false
return this.liveLandscape === 'general'
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
d90230d
...
...
@@ -121,12 +121,7 @@ export struct PlayUIComponent {
right: 10
})
.onClick(() => {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.quitFullScreen()
})
if (this.contentDetailData.liveInfo?.liveState != 'wait') {
//标题
...
...
@@ -160,7 +155,12 @@ export struct PlayUIComponent {
Row() {
if (this.contentDetailData?.rmhInfo) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:() => {
if (this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) {
this.quitFullScreen()
}
}
})
.margin({
// top:-7,
...
...
@@ -450,4 +450,12 @@ export struct PlayUIComponent {
this.playerController?.setSeekTime(value, mode);
})
}
quitFullScreen() {
this.displayDirection = DisplayDirection.VERTICAL
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/vertical/PlayerTitleComponent.ets
View file @
d90230d
...
...
@@ -52,21 +52,7 @@ export struct PlayerTitleComponent {
right: 10
})
.onClick(() => {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
this.quitFullScreen()
})
Text(this.contentDetailData.newsTitle || '')
.maxLines(2)
...
...
@@ -104,7 +90,12 @@ export struct PlayerTitleComponent {
getLiveStatusView() {
if (this.contentDetailData.rmhInfo?.rmhName) {
LiveFollowComponent({
rmhInfo: this.contentDetailData.rmhInfo
rmhInfo: this.contentDetailData.rmhInfo,
clickFollowButton:()=> {
if (this.isFullScreen) {
this.quitFullScreen()
}
}
}).margin({
right: 10
})
...
...
@@ -159,4 +150,24 @@ export struct PlayerTitleComponent {
} : 4)
}
}
quitFullScreen() {
WindowModel.shared.setPreferredOrientation((this.isLarge && this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL) ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
WindowModel.shared.setSpecificSystemBarEnabled(true)
this.isLarge = false
this.displayDirection = DisplayDirection.VERTICAL
if(this.playerController){
if(this.playerController.onVideoSizePlayerComponentBack){
this.playerController.onVideoSizePlayerComponentBack(2,1);
}
// if(this.playerController.onVideoSizePlayerUIComponentMethod){
// this.playerController.onVideoSizePlayerUIComponentMethod(2,1);
// }
}
this.isFullScreen = false
}
}
...
...
Please
register
or
login
to post a comment