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
xugenyuan
2024-08-09 19:01:19 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
db81744a7358e7ce3926300804ef15b6841fae2c
db81744a
1 parent
4a2eed3c
ref |> 处理音频播控中心暂停后再播放问题
Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
View file @
db81744
...
...
@@ -224,7 +224,7 @@ export class BackgroundAudioController {
listenPlayEvents() {
this.lastSession?.on('play', () => {
Logger.debug(TAG, `on play `);
this.avplayerController?.
play
()
this.avplayerController?.
resume
()
this.hasSetupProgress = false
});
this.lastSession?.on('pause', () => {
...
...
sight_harmony/features/wdPlayer/src/main/ets/controller/WDPlayerController.ets
View file @
db81744
...
...
@@ -249,6 +249,21 @@ export class WDPlayerController {
this.avPlayer?.pause();
}
async resume() {
if (this.status == PlayerConstants.STATUS_PAUSE) {
Logger.debug(TAG, "start resume")
this.avPlayer?.play();
return
}
if (this.status == PlayerConstants.STATUS_COMPLETION) {
Logger.debug(TAG, "start resume")
this.avPlayer?.seek(0);
this.avPlayer?.play();
return
}
this.play()
}
async play() {
// if (this.avPlayer == null) {
// await this.initPromise;
...
...
Please
register
or
login
to post a comment