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
wangliang_wd
2024-11-04 10:39:25 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6c3daf0820478ba10adf3343462499678e17a1ee
6c3daf08
1 parent
adaaf6a5
feat:优化早晚报语音播报自动循环播放逻辑
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletions
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/MorningEveningPaper/MorningEveningPaperComponent.ets
View file @
6c3daf0
...
...
@@ -144,8 +144,26 @@ export struct MorningEveningPaperComponent {
}
}
EmitterUtils.receiveEvent(EmitterEventId.AUDIO_CHANGE_STATUS, (val: number | string | undefined) => {
//
console.log(TAG, 'this.currentStatus', val)
console.log(TAG, 'this.currentStatus', val)
this.currentStatus = val
if (this.currentStatus === 5) {
let audioIndex = 0
this.compInfoBean?.compList[0].audioDataList.forEach((item,index)=>{
if (item.audioUrl === this.audioPlayUrl) {
audioIndex = index + 1
}
})
///最后一个了
if (audioIndex === this.compInfoBean?.compList[0].audioDataList.length - 1) {
audioIndex = 0
}
this.audioPlayUrl = this.compInfoBean?.compList[0].audioDataList[audioIndex]?.audioUrl
this.audioTitle = this.compInfoBean?.compList[0].audioDataList[audioIndex]?.title
this.AudioSuspension.setPlayerUrl(this.audioPlayUrl, this.audioTitle)
}
})
}
...
...
Please
register
or
login
to post a comment