增加麦序管理的协议
This commit is contained in:
@@ -330,6 +330,7 @@
|
||||
186A536526FC6F2E00D67B2C /* XCShareItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItem.h; sourceTree = "<group>"; };
|
||||
186A536726FC6F2E00D67B2C /* XCShareItemCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCShareItemCell.m; sourceTree = "<group>"; };
|
||||
186A536826FC6F2E00D67B2C /* XCShareItemCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCShareItemCell.h; sourceTree = "<group>"; };
|
||||
186F8B472733F2AE007A17BC /* MicroQueueProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MicroQueueProtocol.h; sourceTree = "<group>"; };
|
||||
187EEEDA26E89B32002833B2 /* BaseModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseModel.h; sourceTree = "<group>"; };
|
||||
187EEEDB26E89B32002833B2 /* BaseModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseModel.m; sourceTree = "<group>"; };
|
||||
187EEEDF26E89BFB002833B2 /* AccountModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountModel.h; sourceTree = "<group>"; };
|
||||
@@ -1613,6 +1614,7 @@
|
||||
E8AEAED5271412EC0017FCE0 /* XPRoomViewController.m */,
|
||||
181D7F222727DB1E00B7C059 /* RoomHostDelegate.h */,
|
||||
180806F827298F9B001FD836 /* RoomGuestDelegate.h */,
|
||||
186F8B472733F2AE007A17BC /* MicroQueueProtocol.h */,
|
||||
E8AEAEE827141ACC0017FCE0 /* RoomHeaderView */,
|
||||
E8AEAEEA27141ACC0017FCE0 /* StageView */,
|
||||
E8AEAEE627141ACC0017FCE0 /* MessageContainerView */,
|
||||
|
@@ -7,8 +7,11 @@
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomGuestDelegate.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPRoomMenuContainerView : UIView
|
||||
|
||||
@interface XPRoomMenuContainerView : UIView<RoomGuestDelegate>
|
||||
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
@end
|
||||
|
@@ -76,6 +76,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RoomGuestDelegate
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.stackView];
|
||||
|
20
xplan-ios/Main/Room/View/MicroQueueProtocol.h
Normal file
20
xplan-ios/Main/Room/View/MicroQueueProtocol.h
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// MicroQueueProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by apple on 2021/11/4.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class MicroQueueModel;
|
||||
|
||||
@protocol MicroQueueProtocol <NSObject>
|
||||
@optional
|
||||
- (NSMutableDictionary<NSString *, MicroQueueModel *>*)getMicroQueue;
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *, MicroQueueModel *>*)queue;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -9,7 +9,7 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@protocol RoomGuestDelegate <NSObject>
|
||||
@protocol RoomGuestDelegate <NSObject, MicroQueueProtocol>
|
||||
|
||||
@optional
|
||||
|
||||
|
@@ -6,13 +6,14 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "MicroQueueProtocol.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class RoomInfoModel;
|
||||
@class UserInfoModel;
|
||||
|
||||
@protocol RoomHostDelegate <NSObject>
|
||||
@protocol RoomHostDelegate <NSObject, MicroQueueProtocol>
|
||||
|
||||
- (RoomInfoModel*)getRoomInfo;
|
||||
- (UserInfoModel*)getUserInfo;
|
||||
|
@@ -128,6 +128,10 @@
|
||||
[self initRtcRoom];
|
||||
}
|
||||
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)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];
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -187,6 +187,14 @@
|
||||
return self.userInfo;
|
||||
}
|
||||
|
||||
- (NSMutableDictionary<NSString *,MicroQueueModel *> *)getMicroQueue {
|
||||
return [self.stageView getMicroQueue];
|
||||
}
|
||||
|
||||
- (void)onMicroQueueUpdate:(NSMutableDictionary<NSString *,MicroQueueModel *> *)queue {
|
||||
[self.menuContainerView onMicroQueueUpdate:queue];
|
||||
}
|
||||
|
||||
- (void)exitRoom {
|
||||
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||
[[RtcManager instance] exitRoom];
|
||||
|
Reference in New Issue
Block a user