-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: 업로드 안되는 버그 및 업로드 화면 개선 #272
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b19cf80
🐛 VideoEditor 진입시 기존 동영상 mute
anyukyung e347330
🐛 뷰 진입시 동영상 mute 유지
anyukyung c0d2f03
🐛 수정된 videoURL로 반영 안되는 버그
anyukyung 887ff69
🐛 업로드 요청시 헤더에 mimeType 보내도록 수정
anyukyung f8b1863
🔧 업로드 프로그레스바, 토스트 개선
anyukyung 90d3e3b
♻️ 리뷰사항 반영, 주소 길어질 경우 레이아웃 대응
anyukyung File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,6 +114,7 @@ final class EditVideoViewController: BaseViewController { | |
} | ||
|
||
@objc private func cutButtonDidTap() { | ||
loopingPlayerView.player?.pause() | ||
guard let videoPath = originalVideoURL?.path() else { return } | ||
if UIVideoEditorController.canEditVideo(atPath: videoPath) { | ||
let editController = UIVideoEditorController() | ||
|
@@ -139,7 +140,24 @@ extension EditVideoViewController: UINavigationControllerDelegate, UIVideoEditor | |
func videoEditorController(_ editor: UIVideoEditorController, didSaveEditedVideoToPath editedVideoPath: String) { | ||
let editedVideoURL = NSURL(fileURLWithPath: editedVideoPath) as URL | ||
interactor?.fetchVideo(request: EditVideoModels.FetchVideo.Request(editedVideoURL: editedVideoURL)) | ||
dismiss(animated: true) | ||
editor.dismiss(animated: true) { [weak self] in | ||
guard let self else { return } | ||
self.loopingPlayerView.play() | ||
} | ||
} | ||
|
||
func videoEditorControllerDidCancel(_ editor: UIVideoEditorController) { | ||
editor.dismiss(animated: true) { [weak self] in | ||
guard let self else { return } | ||
self.loopingPlayerView.play() | ||
} | ||
} | ||
|
||
func videoEditorController(_ editor: UIVideoEditorController, didFailWithError error: Error) { | ||
editor.dismiss(animated: true) { [weak self] in | ||
guard let self else { return } | ||
self.loopingPlayerView.play() | ||
} | ||
} | ||
|
||
} | ||
|
@@ -155,7 +173,12 @@ extension EditVideoViewController: EditVideoDisplayLogic { | |
loopStart: .zero, | ||
duration: viewModel.duration) | ||
loopingPlayerView.play() | ||
loopingPlayerView.player?.isMuted = soundButton.isSelected | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 오... |
||
nextButton.isEnabled = viewModel.canNext | ||
|
||
if !viewModel.canNext { | ||
Toast.shared.showToast(message: "3초 ~ 60초의 영상만 올릴 수 있어요 👀") | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,22 +40,27 @@ final class Toast { | |
let windowScene: UIWindowScene? = scenes.first as? UIWindowScene | ||
guard let window: UIWindow = windowScene?.windows.first else { return } | ||
let toastLabel: ToastLabel = ToastLabel() | ||
toastLabel.backgroundColor = .background | ||
toastLabel.alpha = 0 | ||
toastLabel.backgroundColor = .background.withAlphaComponent(0.8) | ||
toastLabel.textColor = .layoverWhite | ||
toastLabel.textAlignment = .center | ||
toastLabel.font = .loFont(type: .body2) | ||
toastLabel.text = message | ||
toastLabel.layer.cornerRadius = 8 | ||
toastLabel.clipsToBounds = true | ||
toastLabel.numberOfLines = 1 | ||
toastLabel.layer.opacity = 0.8 | ||
toastLabel.frame.size = toastLabel.intrinsicContentSize | ||
window.addSubview(toastLabel) | ||
toastLabel.center = window.center | ||
UIView.animate(withDuration: 2.0, delay: 0.1, options: .curveEaseOut, animations: { | ||
toastLabel.alpha = 0.0 | ||
|
||
UIView.animate(withDuration: 0.3, delay: 0.5, options: .curveEaseOut, animations: { | ||
toastLabel.alpha = 1.0 | ||
}, completion: { _ in | ||
toastLabel.removeFromSuperview() | ||
UIView.animate(withDuration: 1.0, delay: 1.0, options: .curveEaseOut, animations: { | ||
toastLabel.alpha = 0.0 | ||
}, completion: { _ in | ||
toastLabel.removeFromSuperview() | ||
}) | ||
Comment on lines
+56
to
+63
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
}) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이거 프로필 사진 업로드에도 사용해야겠어요. 감사합니다.