Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions iOS/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PODS:

DEPENDENCIES:
- TUIChatSalon/TRTC (from `./`)
- TXAppBasic (from `TXAppBasic/`)
- TXAppBasic (from `../TXAppBasic/`)
- TXLiteAVSDK_TRTC

SPEC REPOS:
Expand All @@ -39,7 +39,7 @@ EXTERNAL SOURCES:
TUIChatSalon:
:path: "./"
TXAppBasic:
:path: TXAppBasic/
:path: "../TXAppBasic/"

SPEC CHECKSUMS:
Alamofire: f3b09a368f1582ab751b3fff5460276e0d2cf5c9
Expand All @@ -53,6 +53,6 @@ SPEC CHECKSUMS:
TXIMSDK_Plus_iOS: 4b7c1097ea9899f7bf95fa90e2cb4471389f93dd
TXLiteAVSDK_TRTC: afb4dfb50cf544505c748760fc97355e6927faec

PODFILE CHECKSUM: b16f458221ba3514491a40ab149cf0ba5c84994f
PODFILE CHECKSUM: 380bd301d37c55d8c0f0d432f97784848b9d33a2

COCOAPODS: 1.11.2
6 changes: 3 additions & 3 deletions iOS/Resources/localized/en.lproj/ChatSalonLocalized.strings
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"Demo.TRTC.LiveRoom.accept" = "Confirm";
"Demo.TRTC.Salon.roomid" = "Room ID";
"Demo.TRTC.Salon.surewanttoleaveroom" = "Are you sure you want to leave?";
"Demo.TRTC.Salon.audienceconfirm" = "Confirm";
"Demo.TRTC.Salon.waitabit" = "Wait a bit";
"Demo.TRTC.Salon.audienceconfirm" = "OK";
"Demo.TRTC.Salon.waitabit" = "Cancel";
"Demo.TRTC.Salon.micmuted" = "Mic off";
"Demo.TRTC.Salon.micunmuted" = "Mic on";
"Demo.TRTC.Salon.seatlistnotinit" = "The seat list has not been initialized.";
Expand Down Expand Up @@ -55,7 +55,7 @@
"Demo.TRTC.Salon.leavequietly" = "Leave quietly";
"Demo.TRTC.LiveRoom.confirm" = "OK";
"Demo.TRTC.LiveRoom.cancel" = "Cancel";
"Demo.TRTC.Salon.wanttoendroom" = "you want to end the room?";
"Demo.TRTC.Salon.wanttoendroom" = "The room will close after you leave. Leave?";
"Demo.TRTC.Salon.seatmuted" = "Muted by room owner";
"Demo.TRTC.Salon.seatunmuted" = "Unmuted by room owner";
"Demo.TRTC.Salon.pleaseselect" = "Please Select";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Demo.TRTC.LiveRoom.accept" = "确定";
"Demo.TRTC.Salon.roomid" = "房间号";
"Demo.TRTC.Salon.surewanttoleaveroom" = "确认离开房间吗?";
"Demo.TRTC.Salon.audienceconfirm" = "确认";
"Demo.TRTC.Salon.audienceconfirm" = "确定";
"Demo.TRTC.Salon.waitabit" = "取消";
"Demo.TRTC.Salon.micmuted" = "已关闭麦克风";
"Demo.TRTC.Salon.micunmuted" = "已打开麦克风";
Expand Down Expand Up @@ -55,11 +55,7 @@
"Demo.TRTC.Salon.leavequietly" = "安静离开~";
"Demo.TRTC.LiveRoom.confirm" = "确定";
"Demo.TRTC.LiveRoom.cancel" = "取消";




"Demo.TRTC.Salon.wanttoendroom" = "离开会解散房间,确定离开吗?";
"Demo.TRTC.Salon.wanttoendroom" = "离开会解散房间,确认离开吗?";
"Demo.TRTC.Salon.seatmuted" = "被房主禁言";
"Demo.TRTC.Salon.seatunmuted" = "被房主解禁";
"Demo.TRTC.Salon.pleaseselect" = "请选择";
Expand Down
12 changes: 1 addition & 11 deletions iOS/Source/model/Impl/TRTCChatSalon.m
Original file line number Diff line number Diff line change
Expand Up @@ -350,17 +350,7 @@ - (void)destroyRoom:(ActionCallback)callback{
}
}
}];
[self.roomService exitRoom:^(int code, NSString * _Nonnull message) {
@strongify(self)
if (!self) {
return;
}
if (code != 0) {
if ([self canDelegateResponseMethod:@selector(onError:message:)]) {
[self.delegate onError:code message:message];
}
}
}];
// 在公开群(Public)、会议(Meeting)和直播群(AVChatRoom)中,群主是不可以退群的,群主只能调用 dismissGroup 解散群组。
[self.roomService destroyRoom:^(int code, NSString * _Nonnull message) {
@strongify(self)
if (!self) {
Expand Down
2 changes: 1 addition & 1 deletion iOS/Source/model/TRTCChatSalon.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ NS_ASSUME_NONNULL_BEGIN

/**
* 退出房间
*
* - note 房主是不可以退出房间的,房主只能调用 destroyRoom 销毁房间。
* - parameter callback 退出房间是否成功的结果回调
*/
- (void)exitRoom:(ActionCallback _Nullable)callback NS_SWIFT_NAME(exitRoom(callback:));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ class TRTCChatSalonHandsUpTipsView: UIView {
label.textColor = .black
label.font = UIFont.systemFont(ofSize: 14)
label.text = String.successMsg
label.numberOfLines = 2
label.adjustsFontSizeToFitWidth = true
label.minimumScaleFactor = 0.5
return label
}()

Expand Down Expand Up @@ -57,6 +60,7 @@ class TRTCChatSalonHandsUpTipsView: UIView {

contentLabel.snp.makeConstraints { (make) in
make.left.equalTo(handsImgView.snp.right).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-8)
make.centerY.equalTo(handsImgView)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class TRTCChatSalonViewController: UIViewController {

/// 取消
@objc func cancel() {
presentAlert(title: "", message: String.alertTitle) { [weak self] in
presentAlert(title: "", message: (viewModel?.isOwner ?? false) ? .anchorAlertTitle : .audienceAlertTitle) { [weak self] in
guard let `self` = self else { return }
self.viewModel?.exitRoom() // 主播销毁房间
}
Expand All @@ -103,7 +103,8 @@ extension TRTCChatSalonViewController {

private extension String {
static let controllerTitle = ChatSalonLocalize("Demo.TRTC.Salon.roomid")
static let alertTitle = ChatSalonLocalize("Demo.TRTC.Salon.surewanttoleaveroom")
static let anchorAlertTitle = ChatSalonLocalize("Demo.TRTC.Salon.wanttoendroom")
static let audienceAlertTitle = ChatSalonLocalize("Demo.TRTC.Salon.surewanttoleaveroom")
static let alertConfirm = ChatSalonLocalize("Demo.TRTC.Salon.audienceconfirm")
static let alertCancel = ChatSalonLocalize("Demo.TRTC.Salon.waitabit")
}
Expand Down
Loading