|
@@ -214,47 +214,6 @@ isAudience:(BOOL)audience
|
|
|
}];
|
|
|
}
|
|
|
|
|
|
-// 操作全员设备
|
|
|
-- (void)enableMutilMemberDevice:(BOOL)enable
|
|
|
- type:(DeviceType)type
|
|
|
- songId:(NSInteger)songId
|
|
|
- soundVolume:(NSInteger)soundVolume
|
|
|
- forUser:(NSString *)userId {
|
|
|
-
|
|
|
- if (![self checkWhetherInRoom]) {
|
|
|
- [self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
|
|
|
- return;
|
|
|
- }
|
|
|
- NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
|
|
|
- [dic setObject:self.currentRoom.roomId forKey:@"roomId"];
|
|
|
- [dic setValue:[self getDeviceTypeWithEnum:type] forKey:@"deviceType"];
|
|
|
- [dic setValue:@(enable) forKey:@"enable"];
|
|
|
- if (DeviceTypeMusicScore == type) { // 原音
|
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
- [dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
|
- }
|
|
|
- else if (DeviceTypeAccompany == type) { // 伴奏
|
|
|
- [dic setObject:@(songId) forKey:@"musicScoreAccompanimentId"];
|
|
|
- [dic setObject:@(soundVolume) forKey:@"soundVolume"];
|
|
|
- }
|
|
|
-
|
|
|
- if (![NSString isEmptyString:userId]) {
|
|
|
- [dic setObject:userId forKey:@"userId"];
|
|
|
- }
|
|
|
- [dic setValue:@"STUDENT" forKey:@"clientType"];
|
|
|
-
|
|
|
- [HTTPUtility requestWithHTTPMethod:HTTPMethodPost
|
|
|
- URLString:@"/room/device/batchControl"
|
|
|
- parameters:dic
|
|
|
- response:^(HTTPResult *result) {
|
|
|
- if (result.success) {
|
|
|
-
|
|
|
- } else {
|
|
|
- [self callbackFailureDescription:result.errorCode];
|
|
|
- }
|
|
|
- }];
|
|
|
-}
|
|
|
-
|
|
|
- (void)enableMutiMicOff:(BOOL)cancelMuteFlag setMicOff:(BOOL)setMicOff {
|
|
|
if (![self checkWhetherInRoom]) {
|
|
|
[self callbackFailureDescription:ErrorCodeUserNotExistInRoom];
|
|
@@ -516,14 +475,14 @@ isAudience:(BOOL)audience
|
|
|
}
|
|
|
else if (msg.type == DeviceTypeAccompany) { // 伴奏
|
|
|
self.currentRoom.soundVolume = msg.soundVolume;
|
|
|
- [self.currentRoom updateMember:userId forAccompany:msg.enable songId:[msg.songId intValue]];
|
|
|
+ [self.currentRoom updateMember:userId forAccompany:msg.enable songId:msg.songId];
|
|
|
if ([self.classroomDelegate respondsToSelector:@selector(controlDeviceDidEnable:type:forUser:)]) {
|
|
|
[self.classroomDelegate controlDeviceDidEnable:msg.enable type:DeviceTypeAccompany forUser:[self.currentRoom getMember:userId]];
|
|
|
}
|
|
|
}
|
|
|
else if (msg.type == DeviceTypeMusicScore) { // 原声
|
|
|
self.currentRoom.soundVolume = msg.soundVolume;
|
|
|
- [self.currentRoom updateMember:userId forMusicScore:msg.enable songId:[msg.songId intValue]];
|
|
|
+ [self.currentRoom updateMember:userId forMusicScore:msg.enable songId:msg.songId];
|
|
|
if ([self.classroomDelegate respondsToSelector:@selector(controlDeviceDidEnable:type:forUser:)]) {
|
|
|
[self.classroomDelegate controlDeviceDidEnable:msg.enable type:DeviceTypeMusicScore forUser:[self.currentRoom getMember:userId]];
|
|
|
}
|
|
@@ -657,7 +616,7 @@ isAudience:(BOOL)audience
|
|
|
if (!isEmpty) {
|
|
|
// 记录曲目
|
|
|
ClassSongMessage *songMessage = [[ClassSongMessage alloc] init];
|
|
|
- songMessage.musicScoreAccompanimentId = msg.examSongId.intValue;
|
|
|
+ songMessage.musicScoreAccompanimentId = msg.examSongId;
|
|
|
songMessage.speed = msg.speed;
|
|
|
songMessage.url = msg.url;
|
|
|
songMessage.mp3Url = msg.mp3Url;
|