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-07 16:07:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6916328791c44f2e37d5caa5bb18220b2a2a161c
69163287
1 parent
3051cab3
【验收问题】沉浸式播放,暂停视频后进入作者主页,返回视频详情页时视频继续播放,视频未暂停播放
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
14 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/DetailPlayShortVideoPage.ets
View file @
6916328
...
...
@@ -43,6 +43,7 @@ export struct DetailPlayShortVideoPage {
@Consume @Watch("showCommentListChanged") showCommentList: boolean
@Consume displayDirection: DisplayDirection
@Consume @Watch('videoStatusChange') switchVideoStatus: boolean
@State isPlay: boolean = true // 视频手动播放暂停
@Consume @Watch('pageShowChange') pageShow: number
@Consume windowWidth: number
@Consume windowHeight: number
...
...
@@ -61,7 +62,7 @@ export struct DetailPlayShortVideoPage {
async pageShowChange() {
if (this.currentIndex === this.index) {
this.queryNewsInfoOfUser()
if (this.switchVideoStatus) {
if (this.switchVideoStatus
&& this.isPlay
) {
await this.playerController.play()
this.imageVisible = false
}
...
...
@@ -74,7 +75,7 @@ export struct DetailPlayShortVideoPage {
*/
async videoStatusChange() {
if (this.currentIndex === this.index) {
if (this.switchVideoStatus) {
if (this.switchVideoStatus
&& this.isPlay
) {
await this.playerController.play()
this.imageVisible = false
} else {
...
...
@@ -183,14 +184,6 @@ export struct DetailPlayShortVideoPage {
}
if (this.contentDetailData.newsType == 1) {
this.PageName = TrackConstants.PageName.VideoDetail // 点播
} else if (this.contentDetailData.newsType == 2) {
this.PageName = TrackConstants.PageName.Live_Detail // 直播
} else if (this.contentDetailData.newsType == 5) {
this.PageName = TrackConstants.PageName.Summary_Detail // 专题详情页
} else if (this.contentDetailData.newsType == 8) {
this.PageName = TrackConstants.PageName.Article_Detail // 图文详情页
} else if (this.contentDetailData.newsType == 9) {
this.PageName = TrackConstants.PageName.Atlas_Detail // 图集详情页
} else if (this.contentDetailData.newsType == 14 || this.contentDetailData.newsType == 15) {
this.PageName = TrackConstants.PageName.DynamicDetail // 动态图文/动态视频
}
...
...
@@ -268,6 +261,13 @@ export struct DetailPlayShortVideoPage {
.layoutWeight(1)
.onClick(() => {
this.playerController?.switchPlayOrPause();
this.playerController.onStatusChange = (status: number) => {
if (status === PlayerConstants.STATUS_PAUSE) {
this.isPlay = false
} else if(status === PlayerConstants.STATUS_START) {
this.isPlay = true
}
}
})
// 显示评论且非全屏模式(视频频道无评论showComment=false)
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
6916328
...
...
@@ -140,8 +140,6 @@ export struct VideoChannelDetail {
// navigationBarColor: '#000000',
// navigationBarContentColor: '#ffffff'
})
// WindowModel.shared.setWindowLayoutFullScreen(true)
// WindowModel.shared.setWindowSystemBarEnable([])
}
/**
...
...
@@ -156,8 +154,6 @@ export struct VideoChannelDetail {
// navigationBarContentColor: '#0xE5FFFFFF'
})
// WindowModel.shared.setWindowLayoutFullScreen(false)
// WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
}
onBackPress(): boolean | void {
...
...
Please
register
or
login
to post a comment