Steven 2 лет назад
Родитель
Сommit
01a160f160

+ 12 - 0
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -632,6 +632,8 @@
 		BC8C2C7E28265D8E00FBA5D5 /* KSNewsAlert.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8C2C7C28265D8D00FBA5D5 /* KSNewsAlert.m */; };
 		BC8C2C7F28265D8E00FBA5D5 /* KSNewsAlert.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */; };
 		BC8EC02A28926D6E00D51094 /* KSCustomLoadingManager.m in Sources */ = {isa = PBXBuildFile; fileRef = BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */; };
+		BC9BA9A828B352B30031ECD2 /* KSRejectAllSeatMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */; };
+		BC9BA9A928B352B30031ECD2 /* KSDownSeatAllMessage.m in Sources */ = {isa = PBXBuildFile; fileRef = BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */; };
 		BCA1135D28A3A2BB007FAFB9 /* bass.txt in Resources */ = {isa = PBXBuildFile; fileRef = BCA1135A28A3A2BB007FAFB9 /* bass.txt */; };
 		BCA1135E28A3A2BB007FAFB9 /* bass.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCA1135B28A3A2BB007FAFB9 /* bass.xcframework */; };
 		BCA1136228A3A2D0007FAFB9 /* bassmidi.txt in Resources */ = {isa = PBXBuildFile; fileRef = BCA1136028A3A2D0007FAFB9 /* bassmidi.txt */; };
@@ -1944,6 +1946,10 @@
 		BC8C2C7D28265D8E00FBA5D5 /* KSNewsAlert.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = KSNewsAlert.xib; sourceTree = "<group>"; };
 		BC8EC02828926D6E00D51094 /* KSCustomLoadingManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KSCustomLoadingManager.h; sourceTree = "<group>"; };
 		BC8EC02928926D6E00D51094 /* KSCustomLoadingManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KSCustomLoadingManager.m; sourceTree = "<group>"; };
+		BC9BA9A428B352B30031ECD2 /* KSRejectAllSeatMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSRejectAllSeatMessage.h; sourceTree = "<group>"; };
+		BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSRejectAllSeatMessage.m; sourceTree = "<group>"; };
+		BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KSDownSeatAllMessage.m; sourceTree = "<group>"; };
+		BC9BA9A728B352B30031ECD2 /* KSDownSeatAllMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KSDownSeatAllMessage.h; sourceTree = "<group>"; };
 		BCA1135A28A3A2BB007FAFB9 /* bass.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = bass.txt; sourceTree = "<group>"; };
 		BCA1135B28A3A2BB007FAFB9 /* bass.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = bass.xcframework; sourceTree = "<group>"; };
 		BCA1135C28A3A2BB007FAFB9 /* bass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bass.h; sourceTree = "<group>"; };
@@ -4860,6 +4866,10 @@
 				BC0A2264284471300065C1AB /* KSLiveBlockUser.m */,
 				BC0A2266284471460065C1AB /* KSLiveUnBlockUser.h */,
 				BC0A2267284471460065C1AB /* KSLiveUnBlockUser.m */,
+				BC9BA9A728B352B30031ECD2 /* KSDownSeatAllMessage.h */,
+				BC9BA9A628B352B30031ECD2 /* KSDownSeatAllMessage.m */,
+				BC9BA9A428B352B30031ECD2 /* KSRejectAllSeatMessage.h */,
+				BC9BA9A528B352B30031ECD2 /* KSRejectAllSeatMessage.m */,
 			);
 			path = LiveRoomMessage;
 			sourceTree = "<group>";
@@ -6455,6 +6465,7 @@
 				BC02382528685F87005560CA /* KSRCShopRushMessage.m in Sources */,
 				BC119259280FA85300A716F7 /* HomeworkListCell.m in Sources */,
 				BCA1136628A3A2EA007FAFB9 /* BassMidiEngine.m in Sources */,
+				BC9BA9A828B352B30031ECD2 /* KSRejectAllSeatMessage.m in Sources */,
 				2779353827E324A60010E277 /* UIView+KSExtension.m in Sources */,
 				2723B5CD27F157BE00E0B90B /* GroupListModel.m in Sources */,
 				2779354B27E324A60010E277 /* KSVideoEditor.m in Sources */,
@@ -6561,6 +6572,7 @@
 				BC119264280FA90100A716F7 /* HomeworkListModel.m in Sources */,
 				2779354A27E324A60010E277 /* UIImage+Resize.m in Sources */,
 				2723B5A327F1578300E0B90B /* KSChatListViewController.m in Sources */,
+				BC9BA9A928B352B30031ECD2 /* KSDownSeatAllMessage.m in Sources */,
 				BC8A45A1283DC33400094BBB /* KSCloudSettingView.m in Sources */,
 				BC119271280FAF7D00A716F7 /* AccompanyCourseInfoCell.m in Sources */,
 				BC8C2C592823F57100FBA5D5 /* AddressListModel.m in Sources */,

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 48 - 0
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -484,5 +484,53 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "10FF452F-D91B-4DE5-B2CC-20BB109C598B"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1318"
+            endingLineNumber = "1318"
+            landmarkName = "-didReceiveMessageNotification:"
+            landmarkType = "7">
+            <Locations>
+               <Location
+                  uuid = "10FF452F-D91B-4DE5-B2CC-20BB109C598B - 37facbaa101c85f1"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1425"
+                  endingLineNumber = "1425"
+                  offsetFromSymbolStart = "1184">
+               </Location>
+               <Location
+                  uuid = "10FF452F-D91B-4DE5-B2CC-20BB109C598B - 37facbaa101c85f1"
+                  shouldBeEnabled = "Yes"
+                  ignoreCount = "0"
+                  continueAfterRunningActions = "No"
+                  symbolName = "-[LiveVideoRoomViewController didReceiveMessageNotification:]"
+                  moduleName = "KulexiuForStudent"
+                  usesParentBreakpointCondition = "Yes"
+                  urlString = "file:///Users/wangzhi/DayaWorkspace/Klx_student/KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m"
+                  startingColumnNumber = "9223372036854775807"
+                  endingColumnNumber = "9223372036854775807"
+                  startingLineNumber = "1425"
+                  endingLineNumber = "1425"
+                  offsetFromSymbolStart = "1188">
+               </Location>
+            </Locations>
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 18 - 5
KulexiuForStudent/KulexiuForStudent/Module/Live/Controller/LiveVideoRoomViewController.m

@@ -1406,6 +1406,19 @@ static int clickPraiseBtnTimes  = 0;
                         __blockSelf.blacklistFlag = NO;
                     }
                 }
+                else if ([rcMessage.content isMemberOfClass:[KSDownSeatAllMessage class]]) { // 所有麦上用户下麦
+                    if (__blockSelf.micStatus == MICSTATUS_CONNECTING) {
+                        [__blockSelf kickSeatWithMessage:@"您已被抱下麦"];
+                    }
+                }
+                else if ([rcMessage.content isMemberOfClass:[KSRejectAllSeatMessage class]]) { // 拒绝所有连麦申请
+                    if (__blockSelf.micStatus == MICSTATUS_WAITING) {
+                        [__blockSelf MBPShow:@"主讲人拒绝了您的连麦申请"];
+                        // 处理连麦状态
+                        __blockSelf.micStatus = MICSTATUS_NOMAL;
+                    }
+                }
+                
             }
             
         }));
@@ -1876,13 +1889,13 @@ static int clickPraiseBtnTimes  = 0;
                     return;
                 }
                 
-//                if (self.enableSeat) {
+                if (self.enableSeat) {
                     [self MBPShow:@"已发起连麦申请"];
                     [self sendSeatMessageApply:YES];
-//                }
-//                else {
-//                    [self MBPShow:@"管理员关闭连麦申请"];
-//                }
+                }
+                else {
+                    [self MBPShow:@"管理员关闭连麦申请"];
+                }
             }
         }
             break;

+ 3 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.h

@@ -26,6 +26,9 @@
 #import "KSRCPauseLiveMessage.h"
 #import "KSRCShopRushMessage.h"
 #import "RCChatroomSeatsControl.h"
+#import "KSDownSeatAllMessage.h"
+#import "KSRejectAllSeatMessage.h"
+
 typedef void(^RCChatroomMessageSuccess)(long messageId);
 typedef void(^RCChatroomMessageError)(RCErrorCode errorCode, long messageId);
 

+ 2 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSChatroomMessageCenter.m

@@ -44,6 +44,8 @@
     [[RCIM sharedRCIM] registerMessageType:[KSRCPauseLiveMessage class]];
     [[RCIM sharedRCIM] registerMessageType:[KSRCShopRushMessage class]];
     [[RCIM sharedRCIM] registerMessageType:[RCChatroomSeatsControl class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSDownSeatAllMessage class]];
+    [[RCIM sharedRCIM] registerMessageType:[KSRejectAllSeatMessage class]];
     
 }
 

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.h

@@ -0,0 +1,17 @@
+//
+//  KSDownSeatAllMessage.h
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSDownSeatAllMessage : RCMessageContent
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 39 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSDownSeatAllMessage.m

@@ -0,0 +1,39 @@
+//
+//  KSDownSeatAllMessage.m
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "KSDownSeatAllMessage.h"
+
+@implementation KSDownSeatAllMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+}
+
+
++ (NSString *)getObjectName {
+  return @"RC:Chatroom:DownSeatAll";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end

+ 17 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.h

@@ -0,0 +1,17 @@
+//
+//  KSRejectAllSeatMessage.h
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import <RongIMLibCore/RongIMLibCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface KSRejectAllSeatMessage : RCMessageContent
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 39 - 0
KulexiuForStudent/KulexiuForStudent/Module/Live/LiveRoomMessage/KSRejectAllSeatMessage.m

@@ -0,0 +1,39 @@
+//
+//  KSRejectAllSeatMessage.m
+//  TeacherDaya
+//
+//  Created by 王智 on 2022/7/18.
+//  Copyright © 2022 DayaMusic. All rights reserved.
+//
+
+#import "KSRejectAllSeatMessage.h"
+
+@implementation KSRejectAllSeatMessage
+
+- (NSData *)encode {
+    NSMutableDictionary *multableDict = [NSMutableDictionary dictionary];
+    
+    return [NSJSONSerialization dataWithJSONObject:multableDict options:kNilOptions error:nil];
+}
+
+- (void)decodeWithData:(NSData *)data {
+    if (data == nil) return;
+    NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
+    NSDictionary *json = [[NSDictionary alloc] initWithDictionary:dictionary];
+    if (json == nil) return;
+}
+
+
++ (NSString *)getObjectName {
+  return @"RC:Chatroom:RejectSeatAll";
+}
+
+- (NSArray<NSString *> *)getSearchableWords {
+  return nil;
+}
+
++ (RCMessagePersistent)persistentFlag {
+  return MessagePersistent_NONE;
+}
+
+@end