diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index ad70d68c..f0e1654d 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -330,6 +330,7 @@ 186A536526FC6F2E00D67B2C /* XCShareItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItem.h; sourceTree = ""; }; 186A536726FC6F2E00D67B2C /* XCShareItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCShareItemCell.m; sourceTree = ""; }; 186A536826FC6F2E00D67B2C /* XCShareItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItemCell.h; sourceTree = ""; }; + 186F8B472733F2AE007A17BC /* MicroQueueProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueProtocol.h; sourceTree = ""; }; 187EEEDA26E89B32002833B2 /* BaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseModel.h; sourceTree = ""; }; 187EEEDB26E89B32002833B2 /* BaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseModel.m; sourceTree = ""; }; 187EEEDF26E89BFB002833B2 /* AccountModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountModel.h; sourceTree = ""; }; @@ -1613,6 +1614,7 @@ E8AEAED5271412EC0017FCE0 /* XPRoomViewController.m */, 181D7F222727DB1E00B7C059 /* RoomHostDelegate.h */, 180806F827298F9B001FD836 /* RoomGuestDelegate.h */, + 186F8B472733F2AE007A17BC /* MicroQueueProtocol.h */, E8AEAEE827141ACC0017FCE0 /* RoomHeaderView */, E8AEAEEA27141ACC0017FCE0 /* StageView */, E8AEAEE627141ACC0017FCE0 /* MessageContainerView */, diff --git a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.h b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.h index 460435c4..47c64e71 100644 --- a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.h +++ b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.h @@ -7,8 +7,11 @@ #import #import "RoomHostDelegate.h" +#import "RoomGuestDelegate.h" + NS_ASSUME_NONNULL_BEGIN -@interface XPRoomMenuContainerView : UIView + +@interface XPRoomMenuContainerView : UIView - (instancetype)initWithDelegate:(id)delegate; @end diff --git a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m index d4bdbff8..fab12f3b 100644 --- a/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m +++ b/xplan-ios/Main/Room/View/MenuContainerView/XPRoomMenuContainerView.m @@ -76,6 +76,11 @@ } } +#pragma mark - RoomGuestDelegate +- (void)onMicroQueueUpdate:(NSMutableDictionary *)queue { + +} + #pragma mark - Private Method - (void)initSubViews { [self addSubview:self.stackView]; diff --git a/xplan-ios/Main/Room/View/MicroQueueProtocol.h b/xplan-ios/Main/Room/View/MicroQueueProtocol.h new file mode 100644 index 00000000..ad092525 --- /dev/null +++ b/xplan-ios/Main/Room/View/MicroQueueProtocol.h @@ -0,0 +1,20 @@ +// +// MicroQueueProtocol.h +// xplan-ios +// +// Created by apple on 2021/11/4. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@class MicroQueueModel; + +@protocol MicroQueueProtocol +@optional +- (NSMutableDictionary*)getMicroQueue; +- (void)onMicroQueueUpdate:(NSMutableDictionary*)queue; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/RoomGuestDelegate.h b/xplan-ios/Main/Room/View/RoomGuestDelegate.h index bcaf4af6..5dd77753 100644 --- a/xplan-ios/Main/Room/View/RoomGuestDelegate.h +++ b/xplan-ios/Main/Room/View/RoomGuestDelegate.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@protocol RoomGuestDelegate +@protocol RoomGuestDelegate @optional diff --git a/xplan-ios/Main/Room/View/RoomHostDelegate.h b/xplan-ios/Main/Room/View/RoomHostDelegate.h index 93e67186..e1beed7a 100644 --- a/xplan-ios/Main/Room/View/RoomHostDelegate.h +++ b/xplan-ios/Main/Room/View/RoomHostDelegate.h @@ -6,13 +6,14 @@ // #import +#import "MicroQueueProtocol.h" NS_ASSUME_NONNULL_BEGIN @class RoomInfoModel; @class UserInfoModel; -@protocol RoomHostDelegate +@protocol RoomHostDelegate - (RoomInfoModel*)getRoomInfo; - (UserInfoModel*)getUserInfo; diff --git a/xplan-ios/Main/Room/View/StageView/StageView.m b/xplan-ios/Main/Room/View/StageView/StageView.m index 347b7a26..7cf28d72 100644 --- a/xplan-ios/Main/Room/View/StageView/StageView.m +++ b/xplan-ios/Main/Room/View/StageView/StageView.m @@ -128,6 +128,10 @@ [self initRtcRoom]; } +- (NSMutableDictionary *)getMicroQueue { + return self.micQueue; +} + #pragma mark - RtcDelegate - 讲话的波纹回调 - (void)usersSpeaking:(NSMutableArray *)uids { if ([RtcManager instance].isRemoteMuted) { @@ -215,6 +219,7 @@ } if (microQueueChanged) { [self microQueueUpdated]; + [self.hostDelegate onMicroQueueUpdate:self.micQueue]; } } diff --git a/xplan-ios/Main/Room/View/XPRoomViewController.m b/xplan-ios/Main/Room/View/XPRoomViewController.m index 71d293cb..e87fbe8a 100644 --- a/xplan-ios/Main/Room/View/XPRoomViewController.m +++ b/xplan-ios/Main/Room/View/XPRoomViewController.m @@ -187,6 +187,14 @@ return self.userInfo; } +- (NSMutableDictionary *)getMicroQueue { + return [self.stageView getMicroQueue]; +} + +- (void)onMicroQueueUpdate:(NSMutableDictionary *)queue { + [self.menuContainerView onMicroQueueUpdate:queue]; +} + - (void)exitRoom { [self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]]; [[RtcManager instance] exitRoom];