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
zhenghy
2024-04-26 16:25:30 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
55a80e277471dd064bdebc5c274a081abb0900f2
55a80e27
2 parents
17dea420
541f0430
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
35 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveItemComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/pages/DetailPlayLivePage.ets
View file @
55a80e2
...
...
@@ -32,15 +32,15 @@ export struct DetailPlayLivePage {
aboutToAppear(): void {
Logger.info(TAG, `wyj-aboutToAppear`)
// this.listener?.on("change", (mediaQueryResult) => {
// Logger.info(TAG, `change;${mediaQueryResult.matches}`)
// if (mediaQueryResult?.matches) {
// this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
// } else {
// this.displayDirection = DisplayDirection.VERTICAL
// }
// WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
// })
this.listener?.on("change", (mediaQueryResult) => {
Logger.info(TAG, `change;${mediaQueryResult.matches}`)
if (mediaQueryResult?.matches) {
this.displayDirection = DisplayDirection.VIDEO_HORIZONTAL
} else {
this.displayDirection = DisplayDirection.VERTICAL
}
WindowModel.shared.setMainWindowFullScreen(this.displayDirection == DisplayDirection.VIDEO_HORIZONTAL)
})
this.getLiveDetails()
this.getLiveRoomData()
}
...
...
@@ -72,9 +72,8 @@ export struct DetailPlayLivePage {
onPageHideCus(): void {
Logger.info(TAG, `wyj-onPageHideCus`)
devicePLSensorManager.devicePLSensorOff();
// WindowModel.shared.setPreferredOrientation(window.Orientation.AUTO_ROTATION_RESTRICTED);
this.playerController?.pause()
this.listener.off('change');
// devicePLSensorManager.devicePLSensorOff();
}
onBackPressCus(): boolean | void {
...
...
@@ -86,9 +85,9 @@ export struct DetailPlayLivePage {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE);
// devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE);
return true
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveItemComponent.ets
View file @
55a80e2
...
...
@@ -83,9 +83,9 @@ export struct TabLiveItemComponent {
//图文
if (this.item.dataType === 'ZH_TEXT_AND_IMAGE_MSG') {
List({ space: this.item.pictureUrls.length == 1 ? 0 : 5 }) {
ForEach(this.item.pictureUrls, (item: string, index: number) => {
ForEach(this.item.pictureUrls, (item
Sub
: string, index: number) => {
ListItem() {
Image(item)
Image(item
Sub
)
.width(`${100 / this.item.pictureUrls.length}%`)
.height(this.item.pictureUrls.length > 1 ? 70 : 174)
.objectFit(ImageFit.Auto)
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/PlayUIComponent.ets
View file @
55a80e2
import { window } from '@kit.ArkUI'
import { NumberFormatterUtils, WindowModel } from 'wdKit/Index'
import { devicePLSensorManager } from 'wdDetailPlayApi/Index'
import { DateFormatUtil, WDPlayerController } from 'wdPlayer/Index'
import { LiveDetailsBean, LiveRoomDataBean } from 'wdBean/Index'
import { DisplayDirection } from 'wdConstant/Index'
...
...
@@ -69,9 +68,9 @@ export struct PlayUIComponent {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE);
// devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE);
})
if (this.liveDetailsBean.liveInfo?.liveState != 'wait') {
Text(this.liveDetailsBean.newsTitle)
...
...
@@ -191,15 +190,12 @@ export struct PlayUIComponent {
@Builder
getMiddleUIComponent() {
Stack() {
Text('播放功能暂时关闭')
.fontColor(Color.White)
}.alignContent(Alignment.Center)
.layoutWeight(1)
.width('100%')
.onClick(() => {
this.isMenuVisible = !this.isMenuVisible
})
Stack()
.layoutWeight(1)
.width('100%')
.onClick(() => {
this.isMenuVisible = !this.isMenuVisible
})
}
@Builder
...
...
@@ -238,9 +234,9 @@ export struct PlayUIComponent {
WindowModel.shared.setPreferredOrientation(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE)
devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
window.Orientation.PORTRAIT :
window.Orientation.LANDSCAPE);
// devicePLSensorManager.devicePLSensorOn(this.displayDirection == DisplayDirection.VERTICAL ?
// window.Orientation.PORTRAIT :
// window.Orientation.LANDSCAPE);
})
}
}
...
...
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/video/TopPlayComponet.ets
View file @
55a80e2
...
...
@@ -13,7 +13,7 @@ export struct TopPlayComponent {
aboutToAppear(): void {
if (this.playerController) {
this.playerController.onCanplay = () => {
//
this.playerController?.play()
this.playerController?.play()
}
}
}
...
...
@@ -31,7 +31,7 @@ export struct TopPlayComponent {
} else if (this.liveDetailsBean.liveInfo.liveState == 'end') {
playUrl = this.liveDetailsBean.liveInfo.vlive[0].replayUri
}
//
this.playerController?.firstPlay(playUrl);
this.playerController?.firstPlay(playUrl);
}
}
...
...
Please
register
or
login
to post a comment