콘텐츠 상세
- 10초 전/후로 이동 기능 추가
This commit is contained in:
@@ -53,28 +53,48 @@ struct ContentDetailPlayView: View {
|
||||
)
|
||||
.background(Color.black.opacity(0.6))
|
||||
} else if audioContent.releaseDate == nil && !isAlertPreview || (audioContent.isActivePreview && !audioContent.contentUrl.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) {
|
||||
Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play")
|
||||
.onTapGesture {
|
||||
ContentPlayerPlayManager.shared.resetPlayer()
|
||||
|
||||
if isPlaying() {
|
||||
contentPlayManager.pauseAudio()
|
||||
} else {
|
||||
contentPlayManager.startTimer = startTimer
|
||||
contentPlayManager.stopTimer = stopTimer
|
||||
|
||||
contentPlayManager.playAudio(
|
||||
contentId: audioContent.contentId,
|
||||
title: audioContent.title,
|
||||
nickname: audioContent.creator.nickname,
|
||||
coverImage: audioContent.coverImageUrl,
|
||||
contentUrl: audioContent.contentUrl,
|
||||
isFree: audioContent.price <= 0,
|
||||
isPreview: !audioContent.existOrdered && audioContent.price > 0
|
||||
)
|
||||
isShowPreviewAlert = true
|
||||
}
|
||||
HStack(spacing: 24) {
|
||||
if !isAlertPreview {
|
||||
Image("ic_player_prev_10")
|
||||
.onTapGesture {
|
||||
if isPlaying() {
|
||||
contentPlayManager.seekBackward10Seconds()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image(isPlaying() ? "btn_audio_content_pause" : isAlertPreview ? "btn_audio_content_preview_play" : "btn_audio_content_play")
|
||||
.onTapGesture {
|
||||
ContentPlayerPlayManager.shared.resetPlayer()
|
||||
|
||||
if isPlaying() {
|
||||
contentPlayManager.pauseAudio()
|
||||
} else {
|
||||
contentPlayManager.startTimer = startTimer
|
||||
contentPlayManager.stopTimer = stopTimer
|
||||
|
||||
contentPlayManager.playAudio(
|
||||
contentId: audioContent.contentId,
|
||||
title: audioContent.title,
|
||||
nickname: audioContent.creator.nickname,
|
||||
coverImage: audioContent.coverImageUrl,
|
||||
contentUrl: audioContent.contentUrl,
|
||||
isFree: audioContent.price <= 0,
|
||||
isPreview: !audioContent.existOrdered && audioContent.price > 0
|
||||
)
|
||||
isShowPreviewAlert = true
|
||||
}
|
||||
}
|
||||
|
||||
if !isAlertPreview {
|
||||
Image("ic_player_next_10")
|
||||
.onTapGesture {
|
||||
if isPlaying() {
|
||||
contentPlayManager.seekForward10Seconds()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if audioContent.releaseDate == nil {
|
||||
Text("해당 콘텐츠는 크리에이터의 요청으로\n미리듣기를 제공하지 않습니다.")
|
||||
.font(.custom(Font.medium.rawValue, size: 16.7))
|
||||
|
Reference in New Issue
Block a user