From fb00949fa49dd7d5d68a43700b7be62e6c0b4af3 Mon Sep 17 00:00:00 2001 From: qiang Date: Tue, 7 Apr 2020 12:43:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DApp=E7=AB=AF=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96=E9=9F=B3=E9=A2=91=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/platforms/app-plus/service/api/context/audio.js | 4 ++-- .../app-plus/service/api/context/background-audio.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/platforms/app-plus/service/api/context/audio.js b/src/platforms/app-plus/service/api/context/audio.js index 397c258a1c2..d75f698122a 100644 --- a/src/platforms/app-plus/service/api/context/audio.js +++ b/src/platforms/app-plus/service/api/context/audio.js @@ -122,7 +122,7 @@ export function getAudioState ({ errMsg: 'getAudioState:ok', duration: 1e3 * (audio.getDuration() || 0), currentTime: audio.isStopped ? 0 : 1e3 * audio.getPosition(), - paused: audio.isPaused, + paused: audio.isPaused(), src, volume, startTime: 1e3 * startTime, @@ -138,7 +138,7 @@ export function operateAudio ({ const audio = audios[audioId] const operationTypes = ['play', 'pause', 'stop'] if (operationTypes.indexOf(operationType) >= 0) { - audio[operationType === operationTypes[0] && audio.isPaused ? 'resume' : operationType]() + audio[operationType === operationTypes[0] && audio.isPaused() ? 'resume' : operationType]() } else if (operationType === 'seek') { audio.seekTo(currentTime / 1e3) } diff --git a/src/platforms/app-plus/service/api/context/background-audio.js b/src/platforms/app-plus/service/api/context/background-audio.js index 067f56e2769..8f090511353 100644 --- a/src/platforms/app-plus/service/api/context/background-audio.js +++ b/src/platforms/app-plus/service/api/context/background-audio.js @@ -89,7 +89,7 @@ export function getMusicPlayerState () { dataUrl: audio.src, duration: audio.getDuration() || 0, currentPosition: audio.getPosition(), - status: audio.isPaused ? 0 : 1, + status: audio.isPaused() ? 0 : 1, downloadPercent: Math.round(100 * audio.getBuffered() / audio.getDuration()), errMsg: `getMusicPlayerState:ok` } @@ -165,7 +165,7 @@ export function getBackgroundAudioState () { let newData = { duration: audio.getDuration() || 0, currentTime: audio.isStopped ? 0 : audio.getPosition(), - paused: audio.isPaused, + paused: audio.isPaused(), src: audio.src, buffered: audio.getBuffered(), title: audio.title,