麦序声网光圈的显示
This commit is contained in:
@@ -96,7 +96,7 @@
|
||||
|
||||
///更新队列
|
||||
- (void)updateChatroomQueueObject:(NSString *)position userInfo:(UserInfoModel *)userInfo {
|
||||
NSDictionary * dic = @{@"nick":userInfo.nick, @"gender":@(userInfo.gender), @"avatar":userInfo.avatar};
|
||||
NSDictionary * dic = @{@"uid":@(userInfo.uid), @"nick":userInfo.nick, @"gender":@(userInfo.gender), @"avatar":userInfo.avatar};
|
||||
NIMChatroomQueueUpdateRequest *request = [[NIMChatroomQueueUpdateRequest alloc]init];
|
||||
request.key = position;
|
||||
request.value = [dic objectToJSONString];
|
||||
|
@@ -11,6 +11,7 @@
|
||||
///Tool
|
||||
#import "NSObject+JSONString.h"
|
||||
#import "XPIMManager.h"
|
||||
#import "RtcManager.h"
|
||||
///Model
|
||||
#import "UserInfoModel.h"
|
||||
#import "RoomInfoModel.h"
|
||||
@@ -171,6 +172,8 @@
|
||||
[[NIMSDK sharedSDK].chatroomManager enterChatroom:request completion:^(NSError * _Nullable error, NIMChatroom * _Nullable chatroom, NIMChatroomMember * _Nullable me) {
|
||||
NSDictionary *info = (NSDictionary *)[chatroom.ext JSONObject];
|
||||
NSDictionary *micDictionary = [info[@"micQueue"] JSONObject];
|
||||
///加入声网的频道
|
||||
[[RtcManager instance] enterRoom:roomId];
|
||||
///初始化房间队列
|
||||
[[XPIMManager shareManager].microQueueManager enterRoomRepairMicQueue:micDictionary];
|
||||
[[XPIMManager shareManager].microQueueManager fetchRoomQueue:roomId];
|
||||
|
@@ -66,7 +66,7 @@
|
||||
|
||||
|
||||
- (void)animationWithLayer:(UIView *)view {
|
||||
int animtionDura = 2;
|
||||
int animtionDura = 1;
|
||||
POPBasicAnimation *animation2 = [POPBasicAnimation animationWithPropertyNamed:kPOPLayerScaleXY];
|
||||
animation2.beginTime = CACurrentMediaTime();
|
||||
animation2.duration = animtionDura;
|
||||
|
@@ -55,7 +55,7 @@
|
||||
} else {
|
||||
self.avatarImageView.image = [UIImage imageNamed:@"room_position_lock"];
|
||||
}
|
||||
self.postionLabel.text = [NSString stringWithFormat:@"%d", micState.position];
|
||||
self.postionLabel.text = [NSString stringWithFormat:@"%d", micState.position + 1];
|
||||
}
|
||||
|
||||
- (void)confiItemAvatarNick:(UserInfoModel *)userInfo {
|
||||
|
@@ -8,9 +8,10 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "XPRoomPositionLayoutProtocol.h"
|
||||
#import "XPRoomPositionDelgate.h"
|
||||
#import "RtcManager.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomPositionView : UIView
|
||||
@interface XPRoomPositionView : UIView<RtcDelegate>
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame layout:(id<XPRoomPositionLayoutProtocol>)layout delegate:(id<XPRoomPositionDelgate>)delegate;
|
||||
@end
|
||||
|
@@ -11,6 +11,7 @@
|
||||
#import "UserInfoModel.h"
|
||||
///Tool
|
||||
#import "XPIMManager.h"
|
||||
|
||||
///P
|
||||
#import "XPRoomPositionDataSourceProtocol.h"
|
||||
|
||||
@@ -94,6 +95,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - RtcDelegate
|
||||
///声网声音的回调
|
||||
- (void)usersSpeaking:(NSMutableArray *)uids {
|
||||
NSDictionary * microQueue = [XPIMManager shareManager].microQueueManager.microQueue;
|
||||
|
@@ -8,8 +8,10 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPRoomPositionView;
|
||||
@interface XPRoomPositionContainView : UIView
|
||||
///坑位
|
||||
@property (nonatomic,strong, readonly) XPRoomPositionView *postionView;
|
||||
- (CGFloat)positionContainerViewHeight;
|
||||
@end
|
||||
|
||||
|
@@ -11,6 +11,7 @@
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "RtcManager.h"
|
||||
///Model
|
||||
#import "RoomInfoModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
@@ -124,6 +125,8 @@
|
||||
#pragma mark - XPRoomProtocol
|
||||
- (void)getRoomInfoSuccess:(RoomInfoModel *)roomInfo {
|
||||
self.roomInfo = roomInfo;
|
||||
RtcEngineType type = [roomInfo.audioSdkType isEqualToString:@"wujie"] ? RtcEngineType_WJ : ([roomInfo.audioSdkType isEqualToString:@"zego"] ? RtcEngineType_Zego : RtcEngineType_Agora);
|
||||
[RtcManager initEngineWithType:type delegate:self.positionContainerView.postionView];
|
||||
///保存一下房间信息 结构调整的时候 改掉就行
|
||||
[[XPIMManager shareManager].chatRoomManager setCurrentRoomInfo:roomInfo];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
|
Reference in New Issue
Block a user