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-06-13 10:35:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
df4b11024c5a7958c72af8d957925c3a145bd9ad
df4b1102
1 parent
87a2432f
点播视频wifi状态优化
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerBottomView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
df4b110
...
...
@@ -58,6 +58,7 @@ export struct DetailPlayShortVideoPage {
PageName: string = ''
@State toastText: ResourceStr = "正在使用非WI-FI网络,播放将产生流量费用"
@Consume onlyWifiLoadVideo: boolean
@Consume toastTextVisible: boolean
/**
* 页面显示重查用户关注、点赞等信息
...
...
@@ -169,9 +170,12 @@ export struct DetailPlayShortVideoPage {
}
async aboutToAppear() {
if(await onlyWifiLoadVideo()){
this.onlyWifiLoadVideo = true
if (!this.onlyWifiLoadVideo) {
this.onlyWifiLoadVideo = await onlyWifiLoadVideo()
this.toastTextVisible = this.onlyWifiLoadVideo ? false : true
console.log(TAG, 'this.onlyWifiLoadVideo', this.onlyWifiLoadVideo)
}
this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape
this.ratio = (this.contentDetailData.videoInfo[0]?.resolutionWidth || 16) /
(this.contentDetailData.videoInfo[0]?.resolutionHeight || 9)
...
...
@@ -280,7 +284,7 @@ export struct DetailPlayShortVideoPage {
playerController: this.playerController
})
if (
!this.onlyWifiLoadVideo
) {
if (
this.toastTextVisible
) {
this.buildContent()
}
...
...
@@ -357,6 +361,7 @@ export struct DetailPlayShortVideoPage {
})
.onClick(() => {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.imageVisible = false
})
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailVideoListPage.ets
View file @
df4b110
...
...
@@ -40,6 +40,7 @@ export struct DetailVideoListPage {
pageShowTime:number = 0;
pageHideTime:number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
async aboutToAppear(): Promise<void> {
// 注册监听网络连接
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
df4b110
...
...
@@ -65,6 +65,7 @@ export struct VideoChannelDetail {
pageShowTime: number = 0;
pageHideTime: number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
autoRefreshChange() {
if (this.topNavIndex === 0 && !this.isRequesting) {
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerBottomView.ets
View file @
df4b110
...
...
@@ -13,7 +13,6 @@ export struct PlayerBottomView {
@Consume isDragging?: boolean
@Consume contentDetailData: ContentDetailDTO
@Consume displayDirection: DisplayDirection
@Consume onlyWifiLoadVideo: boolean
aboutToAppear(): void {
...
...
Please
register
or
login
to post a comment