From 3a254461bbb75e0a90c3d6d4417d988f72cf367c Mon Sep 17 00:00:00 2001 From: chopmozzi <44396392+chopmozzi@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:03:25 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20=EB=B2=84=EA=B7=B8=20=ED=94=BD=EC=8A=A4?= =?UTF-8?q?=20=EB=B0=8F=20=EC=98=B5=EC=A0=80=EB=B2=84=20=EC=A3=BC=EA=B8=B0?= =?UTF-8?q?=20=EC=A1=B0=EC=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Layover/Scenes/Playback/PlaybackInteractor.swift | 7 +++++++ iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift | 2 +- .../Layover/Scenes/Playback/PlaybackViewController.swift | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift b/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift index 60f5977..2def2b6 100644 --- a/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift +++ b/iOS/Layover/Layover/Scenes/Playback/PlaybackInteractor.swift @@ -18,6 +18,7 @@ protocol PlaybackBusinessLogic { func playInitialPlaybackCell(with request: PlaybackModels.DisplayPlaybackVideo.Request) func playVideo(with request: PlaybackModels.DisplayPlaybackVideo.Request) func playTeleportVideo(with request: PlaybackModels.DisplayPlaybackVideo.Request) + func playTeleportVideoOnlyOneCell(with request: PlaybackModels.DisplayPlaybackVideo.Request) func careVideoLoading(with request: PlaybackModels.DisplayPlaybackVideo.Request) func moveVideo(with request: PlaybackModels.DisplayPlaybackVideo.Request) func resetVideo() @@ -177,6 +178,12 @@ final class PlaybackInteractor: PlaybackBusinessLogic, PlaybackDataStore { } } + func playTeleportVideoOnlyOneCell(with request: PlaybackModels.DisplayPlaybackVideo.Request) { + if let isTeleport, isTeleport == true, playbackVideoInfos.count == 3 { + presenter?.presentMoveCellNext(with: Models.DisplayPlaybackVideo.Response(previousCell: previousCell, currentCell: previousCell)) + } + } + func resumePlaybackView() { if let previousCell { let response: Models.DisplayPlaybackVideo.Response = Models.DisplayPlaybackVideo.Response(previousCell: nil, currentCell: previousCell) diff --git a/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift b/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift index 0b7248e..59f859c 100644 --- a/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift +++ b/iOS/Layover/Layover/Scenes/Playback/PlaybackView.swift @@ -161,7 +161,7 @@ final class PlaybackView: UIView { } func setPlayerSlider() { - let interval: CMTime = CMTimeMakeWithSeconds(1, preferredTimescale: Int32(NSEC_PER_SEC)) + let interval: CMTime = CMTimeMakeWithSeconds(0.2, preferredTimescale: Int32(NSEC_PER_SEC)) timeObserverToken = playerView.player?.addPeriodicTimeObserver(forInterval: interval, queue: .main, using: { [weak self] currentTime in self?.updateSlider(currentTime: currentTime) }) diff --git a/iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift b/iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift index 0b81d55..9a62e6a 100644 --- a/iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift +++ b/iOS/Layover/Layover/Scenes/Playback/PlaybackViewController.swift @@ -389,6 +389,15 @@ extension PlaybackViewController: UICollectionViewDelegate { interactor?.careVideoLoading(with: request) } + func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) { + guard let currentPlaybackCell: PlaybackCell = cell as? PlaybackCell else { + return + } + + let request: Models.DisplayPlaybackVideo.Request = Models.DisplayPlaybackVideo.Request(indexPathRow: indexPath.row, currentCell: currentPlaybackCell) + interactor?.playTeleportVideoOnlyOneCell(with: request) + } + func scrollViewWillBeginDecelerating(_ scrollView: UIScrollView) { let currentOffset = scrollView.contentOffset.y let maximumOffset = scrollView.contentSize.height - scrollView.frame.size.height