From 3061eab422091b07e57b2835cc84743c5b815aaa Mon Sep 17 00:00:00 2001 From: zhuzhengjun Date: Tue, 10 Sep 2024 14:44:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9local=E5=88=87=E6=8D=A2staywa?= =?UTF-8?q?ke=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhuzhengjun --- .../src/main/ets/components/plugin/player/MediaPlayerPlayer.ets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/audioplayers_ohos/ohos/src/main/ets/components/plugin/player/MediaPlayerPlayer.ets b/packages/audioplayers_ohos/ohos/src/main/ets/components/plugin/player/MediaPlayerPlayer.ets index 5b598ab..c855cda 100644 --- a/packages/audioplayers_ohos/ohos/src/main/ets/components/plugin/player/MediaPlayerPlayer.ets +++ b/packages/audioplayers_ohos/ohos/src/main/ets/components/plugin/player/MediaPlayerPlayer.ets @@ -184,9 +184,9 @@ export default class MediaPlayerPlayer implements Player { updateContext(context: AudioContextOhos) { this.mediaPlayer && this.mediaPlayer!.state == 'initialized' &&context.setAttributesOnPlayer(this.mediaPlayer); if (context.stayAwake && context.stayAwake != this.stayAwake) { - this.stayAwake = true this.wrappedPlayer.startContinuousTask(); } + this.stayAwake = context.stayAwake } async setSource(source: Source) { -- Gitee