From 3c32c68b5f7702b947044afef604eab77e714915 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 18 Dec 2024 17:02:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9E=A0=EA=B8=88=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=ED=94=8C=EB=A0=88=EC=9D=B4=EC=96=B4=20-=20=EC=9E=AC=EC=83=9D?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=20=ED=91=9C=EC=8B=9C=20=EB=B0=8F=20=EC=9D=B4?= =?UTF-8?q?=EC=A0=84/=EB=8B=A4=EC=9D=8C=20=EB=B2=84=ED=8A=BC=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Content/Player/ContentPlayerPlayManager.swift | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/SodaLive/Sources/Content/Player/ContentPlayerPlayManager.swift b/SodaLive/Sources/Content/Player/ContentPlayerPlayManager.swift index dfe0b6c..644e0ec 100644 --- a/SodaLive/Sources/Content/Player/ContentPlayerPlayManager.swift +++ b/SodaLive/Sources/Content/Player/ContentPlayerPlayManager.swift @@ -300,11 +300,11 @@ final class ContentPlayerPlayManager: NSObject, ObservableObject { if let player = player { // 콘텐츠 총 길이 - nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = player.currentItem?.duration ?? .zero + nowPlayingInfo[MPMediaItemPropertyPlaybackDuration] = player.currentItem?.asset.duration.seconds ?? .zero // 콘텐츠 재생 시간에 따른 progressBar 초기화 nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = player.rate // 콘텐츠 현재 재생시간 - nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = player.currentTime + nowPlayingInfo[MPNowPlayingInfoPropertyElapsedPlaybackTime] = player.currentTime().seconds } center.nowPlayingInfo = nowPlayingInfo @@ -325,14 +325,14 @@ final class ContentPlayerPlayManager: NSObject, ObservableObject { return .success } - center.skipForwardCommand.isEnabled = true - center.skipForwardCommand.addTarget { [unowned self] (commandEvent) -> MPRemoteCommandHandlerStatus in + center.seekForwardCommand.isEnabled = true + center.seekForwardCommand.addTarget { [unowned self] (commandEvent) -> MPRemoteCommandHandlerStatus in self.playNextContent() return .success } - center.skipBackwardCommand.isEnabled = true - center.skipBackwardCommand.addTarget { [unowned self] (commandEvent) -> MPRemoteCommandHandlerStatus in + center.seekBackwardCommand.isEnabled = true + center.seekBackwardCommand.addTarget { [unowned self] (commandEvent) -> MPRemoteCommandHandlerStatus in self.playPreviousContent() return .success }