From 6ee32f5daa866129c3b6398dd0d78bc18f247f59 Mon Sep 17 00:00:00 2001 From: ParkJongSang Date: Tue, 12 Sep 2023 17:34:23 +0900 Subject: [PATCH 1/5] =?UTF-8?q?AudioPlayer2Template=20=ED=8C=8C=EC=8B=B1?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NuguClientKit/Sources/Audio/ControlCenterManager.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NuguClientKit/Sources/Audio/ControlCenterManager.swift b/NuguClientKit/Sources/Audio/ControlCenterManager.swift index c9cd2093..f98f8535 100644 --- a/NuguClientKit/Sources/Audio/ControlCenterManager.swift +++ b/NuguClientKit/Sources/Audio/ControlCenterManager.swift @@ -197,6 +197,12 @@ private extension ControlCenterManager { return nil } return (payload.template.content.title, payload.template.content.subtitle1, payload.template.content.subtitle2, payload.template.content.imageUrl) + case "AudioPlayer.Template2": + guard let payload = try? JSONDecoder().decode(AudioPlayer2Template.self, from: payloadAsData) else { + remove() + return nil + } + return (payload.template.content.title, payload.template.content.subtitle, payload.template.content.subtitle1, payload.template.content.imageUrl) default: remove() return nil From 87ea56c86aed70c7b34a45d27926fb65cfb943aa Mon Sep 17 00:00:00 2001 From: ParkJongSang Date: Wed, 13 Sep 2023 12:08:58 +0900 Subject: [PATCH 2/5] =?UTF-8?q?handlePlay=EC=97=90=20Play=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift index aec7577b..2e3eda49 100644 --- a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift +++ b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift @@ -522,6 +522,7 @@ private extension AudioPlayerAgent { player.replacePlayer(currentPlayer) } self.currentPlayer = player + self.currentPlayer?.play() self.focusManager.requestFocus(channelDelegate: self) completion(.finished) // TODO: DirectiveHandleResult.started 추가 From a026820ac5fb7b9f93551556afaeae9dcd760c09 Mon Sep 17 00:00:00 2001 From: ParkJongSang Date: Wed, 13 Sep 2023 13:24:27 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=9B=90=EC=83=81=EB=B3=B5=EA=B5=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift index 2e3eda49..aec7577b 100644 --- a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift +++ b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift @@ -522,7 +522,6 @@ private extension AudioPlayerAgent { player.replacePlayer(currentPlayer) } self.currentPlayer = player - self.currentPlayer?.play() self.focusManager.requestFocus(channelDelegate: self) completion(.finished) // TODO: DirectiveHandleResult.started 추가 From c67a0ba3489de6413a70e2cc11a95c6bf4fd4415 Mon Sep 17 00:00:00 2001 From: ParkJongSang Date: Wed, 13 Sep 2023 15:38:18 +0900 Subject: [PATCH 4/5] =?UTF-8?q?Stop=ED=95=B4=EC=A3=BC=EB=8A=94=20=EB=B6=80?= =?UTF-8?q?=EB=B6=84=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift index aec7577b..acd79b06 100644 --- a/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift +++ b/NuguAgents/Sources/CapabilityAgents/AudioPlayer/AudioPlayerAgent.swift @@ -518,7 +518,7 @@ private extension AudioPlayerAgent { if let currentPlayer = self.currentPlayer, player.shouldResume(player: currentPlayer) { log.info("Resuming \(player.header.messageId)") - currentPlayer.stop() +// currentPlayer.stop() player.replacePlayer(currentPlayer) } self.currentPlayer = player From c015a5974849df946fcbeba31a714aab17b5e6b9 Mon Sep 17 00:00:00 2001 From: ParkJongSang Date: Thu, 14 Sep 2023 14:04:48 +0900 Subject: [PATCH 5/5] =?UTF-8?q?Template2=EA=B4=80=EB=A0=A8=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NuguClientKit/Sources/Audio/ControlCenterManager.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/NuguClientKit/Sources/Audio/ControlCenterManager.swift b/NuguClientKit/Sources/Audio/ControlCenterManager.swift index f98f8535..c9cd2093 100644 --- a/NuguClientKit/Sources/Audio/ControlCenterManager.swift +++ b/NuguClientKit/Sources/Audio/ControlCenterManager.swift @@ -197,12 +197,6 @@ private extension ControlCenterManager { return nil } return (payload.template.content.title, payload.template.content.subtitle1, payload.template.content.subtitle2, payload.template.content.imageUrl) - case "AudioPlayer.Template2": - guard let payload = try? JSONDecoder().decode(AudioPlayer2Template.self, from: payloadAsData) else { - remove() - return nil - } - return (payload.template.content.title, payload.template.content.subtitle, payload.template.content.subtitle1, payload.template.content.imageUrl) default: remove() return nil