wangliang_wd

feat:优化音频播控中心时间显示问题

@@ -202,6 +202,13 @@ export class BackgroundAudioController { @@ -202,6 +202,13 @@ export class BackgroundAudioController {
202 } 202 }
203 203
204 if (force == false && this.hasSetupProgress) { 204 if (force == false && this.hasSetupProgress) {
  205 + let playbackState: AVSessionManager.AVPlaybackState = {
  206 + position: {
  207 + elapsedTime: progressDuration, // 已经播放的位置,以ms为单位
  208 + updateTime: new Date().getTime(), // 应用更新当前位置时的时间戳,以ms为单位
  209 + },
  210 + };
  211 + this.lastSession?.setAVPlaybackState(playbackState, (err) => {});
205 return 212 return
206 } 213 }
207 this.hasSetupProgress = true 214 this.hasSetupProgress = true