|
@@ -54,31 +54,6 @@ isAudience:(BOOL)audience
|
|
[parm setObject:userName forKey:@"userName"];
|
|
[parm setObject:userName forKey:@"userName"];
|
|
[parm setValue:@"TEACHER" forKey:@"clientType"];
|
|
[parm setValue:@"TEACHER" forKey:@"clientType"];
|
|
|
|
|
|
-// [KSNetworkingManager classroomRequest:KS_POST url:[self getUrl:@"/room/join"] parms:parm success:^(NSDictionary * _Nonnull dic) {
|
|
|
|
-// if ([dic ks_integerValueForKey:@"code"] == 0) {
|
|
|
|
-// Classroom *room = [Classroom classroomFromJson:[dic ks_dictionaryValueForKey:@"data"]];
|
|
|
|
-// self.currentRoom = room;
|
|
|
|
-// if (successBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// successBlock(room);
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// else {
|
|
|
|
-// if (errorBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// errorBlock([dic ks_integerValueForKey:@"code"],MESSAGEKEY);
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// } faliure:^(NSError * _Nonnull error) {
|
|
|
|
-// if (errorBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// errorBlock(error.code,@"");
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }];
|
|
|
|
-
|
|
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost
|
|
URLString:@"/room/join"
|
|
URLString:@"/room/join"
|
|
parameters:parm
|
|
parameters:parm
|
|
@@ -109,31 +84,7 @@ isAudience:(BOOL)audience
|
|
NSMutableDictionary *parm = [[NSMutableDictionary alloc] init];
|
|
NSMutableDictionary *parm = [[NSMutableDictionary alloc] init];
|
|
[parm setObject:roomId forKey:@"roomId"];
|
|
[parm setObject:roomId forKey:@"roomId"];
|
|
[parm setValue:@"TEACHER" forKey:@"clientType"];
|
|
[parm setValue:@"TEACHER" forKey:@"clientType"];
|
|
-// [KSNetworkingManager classroomRequest:KS_POST url:[self getUrl:@"/room/info"] parms:parm success:^(NSDictionary * _Nonnull dic) {
|
|
|
|
-// if ([dic ks_integerValueForKey:@"code"] == 0 && [dic ks_boolValueForKey:@"status"]) {
|
|
|
|
-// Classroom *room = [Classroom classroomFromJson:[dic ks_dictionaryValueForKey:@"data"]];
|
|
|
|
-// self.currentRoom = room;
|
|
|
|
-// if (successBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// successBlock(room);
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// else {
|
|
|
|
-// if (errorBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// errorBlock([dic ks_integerValueForKey:@"code"],MESSAGEKEY);
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// } faliure:^(NSError * _Nonnull error) {
|
|
|
|
-// if (errorBlock) {
|
|
|
|
-// dispatch_main_async_safe(^{
|
|
|
|
-// errorBlock(error.code,@"");
|
|
|
|
-// })
|
|
|
|
-// }
|
|
|
|
-// }];
|
|
|
|
|
|
+
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost
|
|
URLString:@"/room/info"
|
|
URLString:@"/room/info"
|
|
parameters:parm
|
|
parameters:parm
|
|
@@ -166,11 +117,7 @@ isAudience:(BOOL)audience
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
NSDictionary *parm = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", self.currentRoom.currentMemberId, @"userId", @(requestStatus),@"requestStatus",[KeyChainTools getUUID],@"deviceNum",@"TEACHER",@"clientType",nil];
|
|
NSDictionary *parm = [NSDictionary dictionaryWithObjectsAndKeys:self.currentRoom.roomId, @"roomId", self.currentRoom.currentMemberId, @"userId", @(requestStatus),@"requestStatus",[KeyChainTools getUUID],@"deviceNum",@"TEACHER",@"clientType",nil];
|
|
-// [KSNetworkingManager classroomRequest:KS_POST url:[self getUrl:@"room/joinRoomStatusNotify"] parms:parm success:^(NSDictionary * _Nonnull dic) {
|
|
|
|
-//
|
|
|
|
-// } faliure:^(NSError * _Nonnull error) {
|
|
|
|
-//
|
|
|
|
-// }];
|
|
|
|
|
|
+
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"room/joinRoomStatusNotify" parameters:parm response:^(HTTPResult *result) {
|
|
[HTTPUtility requestWithHTTPMethod:HTTPMethodPost URLString:@"room/joinRoomStatusNotify" parameters:parm response:^(HTTPResult *result) {
|
|
if (result.success) {
|
|
if (result.success) {
|
|
NSLog(@"------ 通知成功");
|
|
NSLog(@"------ 通知成功");
|
|
@@ -246,7 +193,7 @@ isAudience:(BOOL)audience
|
|
|
|
|
|
- (void)enableDevice:(BOOL)enable
|
|
- (void)enableDevice:(BOOL)enable
|
|
type:(DeviceType)type
|
|
type:(DeviceType)type
|
|
- songId:(NSInteger)songId
|
|
|
|
|
|
+ songId:(NSString *)songId
|
|
soundVolume:(NSInteger)soundVolume
|
|
soundVolume:(NSInteger)soundVolume
|
|
forUser:(NSString *)userId {
|
|
forUser:(NSString *)userId {
|
|
if (![self checkWhetherInRoom]) {
|
|
if (![self checkWhetherInRoom]) {
|
|
@@ -264,11 +211,11 @@ isAudience:(BOOL)audience
|
|
[dic setValue:@(enable) forKey:@"enable"];
|
|
[dic setValue:@(enable) forKey:@"enable"];
|
|
|
|
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
}
|
|
}
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
}
|
|
}
|
|
[dic setObject:userId forKey:@"userId"];
|
|
[dic setObject:userId forKey:@"userId"];
|
|
@@ -289,7 +236,7 @@ isAudience:(BOOL)audience
|
|
// 操作全员设备
|
|
// 操作全员设备
|
|
- (void)enableMutilMemberDevice:(BOOL)enable
|
|
- (void)enableMutilMemberDevice:(BOOL)enable
|
|
type:(DeviceType)type
|
|
type:(DeviceType)type
|
|
- songId:(NSInteger)songId
|
|
|
|
|
|
+ songId:(NSString *)songId
|
|
soundVolume:(NSInteger)soundVolume
|
|
soundVolume:(NSInteger)soundVolume
|
|
forUser:(NSString *)userId {
|
|
forUser:(NSString *)userId {
|
|
|
|
|
|
@@ -303,11 +250,11 @@ isAudience:(BOOL)audience
|
|
[dic setValue:@(enable) forKey:@"enable"];
|
|
[dic setValue:@(enable) forKey:@"enable"];
|
|
|
|
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
}
|
|
}
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
[dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
}
|
|
}
|
|
|
|
|
|
@@ -453,7 +400,7 @@ isAudience:(BOOL)audience
|
|
|
|
|
|
#pragma mark 操作当前用户设备状态,仅老师/学员有权限
|
|
#pragma mark 操作当前用户设备状态,仅老师/学员有权限
|
|
- (void)enableDevice:(BOOL)enable
|
|
- (void)enableDevice:(BOOL)enable
|
|
- songId:(NSInteger)songId
|
|
|
|
|
|
+ songId:(NSString *)songId
|
|
withType:(DeviceType)type {
|
|
withType:(DeviceType)type {
|
|
if (![self checkWhetherInRoom]) {
|
|
if (![self checkWhetherInRoom]) {
|
|
[self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
|
|
[self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
|
|
@@ -467,11 +414,11 @@ isAudience:(BOOL)audience
|
|
|
|
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
if (DeviceTypeMusicScore == type) { // 原音
|
|
|
|
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
}
|
|
}
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
else if (DeviceTypeAccompany == type) { // 伴奏
|
|
|
|
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
|
|
|
+ [dic setObject:songId forKey:@"musicScoreAccompanimentId"];
|
|
}
|
|
}
|
|
[dic setValue:@"TEACHER" forKey:@"clientType"];
|
|
[dic setValue:@"TEACHER" forKey:@"clientType"];
|
|
|
|
|