라이브

- 최대 스피커 수 방장 포함 6명으로 변경
This commit is contained in:
Yu Sung 2024-09-20 17:55:20 +09:00
parent ac304e7d17
commit f444f0bfb0
5 changed files with 39 additions and 3 deletions

View File

@ -148,7 +148,7 @@ struct LiveRoomProfilesDialogView: View {
role: listener.role, role: listener.role,
onClickChangeListener: { _ in }, onClickChangeListener: { _ in },
onClickInviteSpeaker: { onClickInviteSpeaker: {
if viewModel.liveRoomInfo!.speakerList.count <= 4 { if viewModel.liveRoomInfo!.speakerList.count <= 5 {
viewModel.inviteSpeaker(peerId: $0) viewModel.inviteSpeaker(peerId: $0)
viewModel.popupContent = "스피커 요청을 보냈습니다.\n잠시만 기다려 주세요." viewModel.popupContent = "스피커 요청을 보냈습니다.\n잠시만 기다려 주세요."
viewModel.isShowPopup = true viewModel.isShowPopup = true

View File

@ -1865,7 +1865,7 @@ extension LiveRoomViewModel: AgoraRtmDelegate {
self.popupConfirmTitle = "스피커로 초대" self.popupConfirmTitle = "스피커로 초대"
self.popupConfirmAction = { self.popupConfirmAction = {
self.isShowPopup = false self.isShowPopup = false
if self.liveRoomInfo!.speakerList.count <= 4 { if self.liveRoomInfo!.speakerList.count <= 5 {
self.requestSpeakerAllow(peerId) self.requestSpeakerAllow(peerId)
} else { } else {
self.errorMessage = "스피커 정원이 초과되었습니다." self.errorMessage = "스피커 정원이 초과되었습니다."

View File

@ -219,6 +219,24 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310", profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310",
role: .SPEAKER role: .SPEAKER
), ),
LiveRoomMember(
id: 4,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 5,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 6,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
], ],
muteSpeakerList: [], muteSpeakerList: [],
activeSpeakerList: [], activeSpeakerList: [],

View File

@ -235,6 +235,24 @@ struct LiveRoomInfoHostView_Previews: PreviewProvider {
profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310", profileImage: "https://cf.sodalive.net/profile/4679/4679-profile-41e83399-234e-4541-8591-f961a025cfaa-5819-1699536915310",
role: .SPEAKER role: .SPEAKER
), ),
LiveRoomMember(
id: 4,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 5,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
LiveRoomMember(
id: 6,
nickname: "도화",
profileImage: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
role: .SPEAKER
),
], ],
muteSpeakerList: [], muteSpeakerList: [],
activeSpeakerList: [], activeSpeakerList: [],

View File

@ -695,7 +695,7 @@ struct LiveRoomViewV2: View {
} }
private func inviteSpeaker(peerId: Int) { private func inviteSpeaker(peerId: Int) {
if viewModel.liveRoomInfo!.speakerList.count <= 4 { if viewModel.liveRoomInfo!.speakerList.count <= 5 {
viewModel.inviteSpeaker(peerId: peerId) viewModel.inviteSpeaker(peerId: peerId)
self.viewModel.popupContent = "스피커 요청을 보냈습니다.\n잠시만 기다려 주세요." self.viewModel.popupContent = "스피커 요청을 보냈습니다.\n잠시만 기다려 주세요."
self.viewModel.isShowPopup = true self.viewModel.isShowPopup = true