@@ -21,6 +21,15 @@ - (instancetype)init
2121 }
2222 return self;
2323}
24+ +(instancetype )userWithNickName : (NSString *)aNickName image : (NSURL *)aUrl
25+ {
26+ EaseCallUser* user = [[EaseCallUser alloc ] init ];
27+ if (aNickName.length > 0 )
28+ user.nickName = aNickName;
29+ if (aUrl && aUrl.absoluteString .length > 0 )
30+ user.headImage = aUrl;
31+ return user;
32+ }
2433@end
2534
2635@interface EaseCallConfig ()
@@ -53,4 +62,29 @@ - (void)_initParams
5362 _agoraAppId = @" 15cb0d28b87b425ea613fc46f7c9f974" ;
5463}
5564
65+ - (AgoraVideoEncoderConfiguration*)encoderConfiguration
66+ {
67+ if (!_encoderConfiguration) {
68+ _encoderConfiguration = [[AgoraVideoEncoderConfiguration alloc ] initWithSize: AgoraVideoDimension640x360
69+ frameRate: AgoraVideoFrameRateFps15
70+ bitrate: AgoraVideoBitrateStandard
71+ orientationMode: AgoraVideoOutputOrientationModeAdaptative];
72+ }
73+ return _encoderConfiguration;
74+ }
75+
76+ - (void )setUsers : (NSMutableDictionary <NSString *,EaseCallUser *> *)users
77+ {
78+ _users = [users mutableCopy ];
79+ [[NSNotificationCenter defaultCenter ] postNotificationName: @" EaseCallUserUpdated" object: nil ];
80+ }
81+
82+ - (void )setUser : (NSString *)aUser info : (EaseCallUser*)aInfo
83+ {
84+ if (aUser.length > 0 && aInfo) {
85+ [self .users setObject: aInfo forKey: aUser];
86+ [[NSNotificationCenter defaultCenter ] postNotificationName: @" EaseCallUserUpdated" object: nil ];
87+ }
88+ }
89+
5690@end
0 commit comments