-
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
chore: 재생화면 동작 개선 #172
chore: 재생화면 동작 개선 #172
Changes from 9 commits
d107198
f40e456
b534f19
1704352
c57b74a
07133dd
9f90873
ac10ea0
cf5ede7
230f8e9
4cb3792
76e884a
684b281
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,23 +21,20 @@ final class PlaybackCell: UICollectionViewCell { | |
configure() | ||
} | ||
|
||
// TODO: VideoModel 받아서 처리 | ||
func setPlaybackContents(viewModel: PlaybackModels.PlaybackVideo) { | ||
playbackView.descriptionView.titleLabel.text = viewModel.post.board.title | ||
playbackView.descriptionView.setText(viewModel.post.board.description ?? "") | ||
|
||
func setPlaybackContents(info: PlaybackModels.PlaybackInfo) { | ||
playbackView.descriptionView.titleLabel.text = info.title | ||
playbackView.descriptionView.setText(info.content) | ||
playbackView.profileLabel.text = info.profileName | ||
info.tag.forEach { tag in | ||
playbackView.tagStackView.addTag(tag) | ||
} | ||
Comment on lines
+28
to
+30
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. 지웅님 이 부분 재사용 이슈는 없나요? 다시 set될때 tag 버튼이 중복으로 들어갈 것 같은데 처음에 초기화 주는 부분이 없는 것 같아서요 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. 재사용 이슈 생겨서 stackView remove하는 식으로 해결했습니다. UI에 관련된 것이기 때문에 prepareForReuse안쓰고 셀 초기화 하는 부분에서 해줬어용 |
||
} | ||
|
||
func addAVPlayer(url: URL) { | ||
playbackView.resetPlayer() | ||
playbackView.addAVPlayer(url: url) | ||
} | ||
|
||
func setPlayerSlider(tabbarHeight: CGFloat) { | ||
playbackView.setPlayerSlider() | ||
playbackView.setPlayerSliderUI(tabbarHeight: tabbarHeight) | ||
} | ||
|
||
private func configure() { | ||
playbackView.translatesAutoresizingMaskIntoConstraints = false | ||
contentView.addSubview(playbackView) | ||
|
@@ -47,6 +44,5 @@ final class PlaybackCell: UICollectionViewCell { | |
playbackView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor), | ||
playbackView.trailingAnchor.constraint(equalTo: contentView.trailingAnchor) | ||
]) | ||
playbackView.playerSlider.isHidden = true | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,14 +12,29 @@ enum PlaybackModels { | |
// MARK: - Properties Type | ||
struct PlaybackVideo: Hashable { | ||
var id: UUID = UUID() | ||
let post: Post | ||
let playbackInfo: PlaybackInfo | ||
} | ||
Comment on lines
13
to
16
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. 지웅님 이거 근데 궁금한게 있는데 UUID 넣어주신 이유가 있나요? 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. 넹 무한스크롤 구현할 때 더미 셀이 들어가는데, 더미 셀 들어갈 때 중복셀 방지하려고 넣었습니다. 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. 아 그러면 이제 아래 PlaybackInfo가 Hashable하니까 이건 안써도 되는...? 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. 넹넹 리뷰 반영사항에 수정해뒀어요 |
||
|
||
enum ParentView { | ||
case home | ||
case other | ||
} | ||
|
||
struct PlaybackInfo: Hashable { | ||
let title: String | ||
let content: String | ||
let profileImageURL: URL? | ||
let profileName: String | ||
let tag: [String] | ||
// location | ||
let videoURL: URL | ||
} | ||
|
||
struct PlaybackViewInfo { | ||
let parentView: ParentView | ||
let videos: [PlaybackVideo] | ||
} | ||
|
||
// MARK: - UseCase Load Video List | ||
|
||
enum LoadPlaybackVideoList { | ||
|
@@ -28,7 +43,7 @@ enum PlaybackModels { | |
} | ||
|
||
struct Response { | ||
let videos: [PlaybackVideo] | ||
let posts: [Post] | ||
} | ||
|
||
struct ViewModel { | ||
|
@@ -85,4 +100,36 @@ enum PlaybackModels { | |
} | ||
} | ||
|
||
// MARK: - UseCase Cell Configure | ||
|
||
enum ConfigurePlaybackCell { | ||
struct Request { | ||
} | ||
|
||
struct Response { | ||
let teleportIndex: Int? | ||
} | ||
|
||
struct ViewModel { | ||
let teleportIndex: Int? | ||
} | ||
} | ||
|
||
// MARK: - UseCase Seek Video | ||
|
||
enum SeekVideo { | ||
struct Request { | ||
let currentLocation: Float64 | ||
} | ||
|
||
struct Response { | ||
let willMoveLocation: Float64 | ||
let curCell: PlaybackCell | ||
} | ||
|
||
struct ViewModel { | ||
let willMoveLocation: Float64 | ||
let curCell: PlaybackCell | ||
} | ||
} | ||
} |
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.
👍