라이브룸 V2V 번역 자막 기능을 추가한다
라이브룸에서 진행자 언어와 기기 언어가 다를 때 자막 토글을 제공한다. 룸 정보 응답에 V2V 워커 토큰과 진행자 언어 코드를 포함한다. Agora V2V 에이전트 참여와 종료 API 연동을 추가한다
This commit is contained in:
@@ -17,7 +17,9 @@ struct LiveRoomInfoGuestView: View {
|
||||
let isOnNotice: Bool
|
||||
let isOnMenuPan: Bool
|
||||
let isOnSignature: Bool
|
||||
let isOnV2VCaption: Bool
|
||||
let isShowMenuPanButton: Bool
|
||||
let isShowV2VCaptionButton: Bool
|
||||
|
||||
let creatorId: Int
|
||||
let creatorNickname: String
|
||||
@@ -37,6 +39,7 @@ struct LiveRoomInfoGuestView: View {
|
||||
let onClickTotalHeart: () -> Void
|
||||
let onClickTotalDonation: () -> Void
|
||||
let onClickChangeListener: () -> Void
|
||||
let onClickToggleV2VCaption: () -> Void
|
||||
let onClickToggleSignature: () -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -62,6 +65,20 @@ struct LiveRoomInfoGuestView: View {
|
||||
strokeCornerRadius: 5.3
|
||||
) { onClickChangeListener() }
|
||||
}
|
||||
|
||||
if isShowV2VCaptionButton {
|
||||
LiveRoomOverlayStrokeTextToggleButton(
|
||||
isOn: isOnV2VCaption,
|
||||
onText: I18n.LiveRoom.captionOn,
|
||||
onTextColor: Color.button,
|
||||
onStrokeColor: Color.button,
|
||||
offText: I18n.LiveRoom.captionOff,
|
||||
offTextColor: Color.graybb,
|
||||
offStrokeColor: Color.graybb,
|
||||
strokeWidth: 1,
|
||||
strokeCornerRadius: 5.3
|
||||
) { onClickToggleV2VCaption() }
|
||||
}
|
||||
|
||||
LiveRoomOverlayStrokeTextToggleButton(
|
||||
isOn: isOnSignature,
|
||||
@@ -222,7 +239,9 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
isOnNotice: false,
|
||||
isOnMenuPan: false,
|
||||
isOnSignature: false,
|
||||
isOnV2VCaption: false,
|
||||
isShowMenuPanButton: false,
|
||||
isShowV2VCaptionButton: true,
|
||||
creatorId: 1,
|
||||
creatorNickname: "도화",
|
||||
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
@@ -258,6 +277,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
onClickTotalHeart: {},
|
||||
onClickTotalDonation: {},
|
||||
onClickChangeListener: {},
|
||||
onClickToggleV2VCaption: {},
|
||||
onClickToggleSignature: {}
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user