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-09-19 21:26:26 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b94d29b5574599f282966a79e68a33b92fa8abb9
b94d29b5
1 parent
033f2eeb
fix: 对稿件进行语音播放并暂停后,点击关闭按钮后,手机下拉中的播放组件没有删除
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
sight_harmony/products/phone/src/main/ets/pages/view/AudioComponent.ets
sight_harmony/features/wdPlayer/src/main/ets/controller/BackgroundAudioController.ets
View file @
b94d29b
...
...
@@ -27,7 +27,7 @@ export class BackgroundAudioController {
public gotContextFunc?: () => Context
public avplayerController?: WDPlayerController
private lastSession?: AVSessionManager.AVSession
private lastSession?: AVSessionManager.AVSession
| null
private applyedLongTaskPlay: boolean = false
...
...
@@ -64,6 +64,7 @@ export class BackgroundAudioController {
if (this.lastSession) {
this.lastSession.deactivate();
this.lastSession.destroy();
this.lastSession = null
}
}
...
...
sight_harmony/products/phone/src/main/ets/pages/view/AudioComponent.ets
View file @
b94d29b
import { AudioSuspensionModel } from 'wdComponent'
import { PlayerConstants, DateFormatUtil } from 'wdPlayer'
import { PlayerConstants, DateFormatUtil
, BackgroundAudioController
} from 'wdPlayer'
import { EmitterEventId, EmitterUtils, SPHelper } from 'wdKit/Index'
import window from '@ohos.window';
import lottie from '@ohos/lottie';
...
...
@@ -195,6 +195,7 @@ struct Index {
if (this.AudioSuspension.playerController) {
this.AudioSuspension.playerController.get().pause()
this.AudioSuspension.minimize()
BackgroundAudioController.sharedController().destorySession()
}
}))
}
...
...
Please
register
or
login
to post a comment