Browse Source

直播弹窗

Steven 2 years ago
parent
commit
c4407279e8

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


+ 0 - 183
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -71,189 +71,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D"
-            shouldBeEnabled = "No"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "643"
-            endingLineNumber = "643"
-            landmarkName = "-configIMConnect"
-            landmarkType = "7">
-            <Locations>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d204ca35ec8ae2b6"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "-[LiveRoomViewController IMConnetedCallback]"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "24">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - 3a084d2c1ad9f33a"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "32">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d3d03a555397ad49"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_2"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "40">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d3d03a555397ad49"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_2"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "112">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d3d03a54d397ad56"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_3"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "24">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - 3d9a4aa3c53a99b5"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke.496"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "60">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - f2c662b6142070c0"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_2.500"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "32">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - f2c662a13fea5cde"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_3.501"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "40">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - f2c662a13fea5cde"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_3.501"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "112">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d3d03a545397ad57"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_4"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "24">
-               </Location>
-               <Location
-                  uuid = "5C80B9CF-A044-4C8C-8C07-1D73C8DB506D - d3d03a57d397ad54"
-                  shouldBeEnabled = "Yes"
-                  ignoreCount = "0"
-                  continueAfterRunningActions = "No"
-                  symbolName = "__44-[LiveRoomViewController IMConnetedCallback]_block_invoke_5"
-                  moduleName = "KulexiuForTeacher"
-                  usesParentBreakpointCondition = "Yes"
-                  urlString = "file:///Users/wangzhi/DayaWorkspace/klx_teacher/KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-                  startingColumnNumber = "9223372036854775807"
-                  endingColumnNumber = "9223372036854775807"
-                  startingLineNumber = "635"
-                  endingLineNumber = "635"
-                  offsetFromSymbolStart = "60">
-               </Location>
-            </Locations>
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "EA9FEA48-4616-4094-BBE4-66F574A0FB75"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"

+ 38 - 14
KulexiuForTeacher/KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m

@@ -1804,14 +1804,7 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             break;
         case LIVESECONTROL_FORBIDDEN: // 禁止连麦
         {
-            RCChatroomSeatsControl *message = [[RCChatroomSeatsControl alloc] init];
-            message.userId = self.createrId;
-            message.userName = self.createrName;
-            message.seatBan = YES;
-            MJWeakSelf;
-            [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
-                [weakSelf removeSeatMember:YES];
-            }];
+            [self forceSeatAction];
         }
             break;
         case LIVESECONTROL_APPROVE: // 上麦
@@ -1855,20 +1848,24 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
             break;
         case LIVESECONTROL_DOWNSEATALL:
         {
-            KSDownSeatAllMessage *message = [[KSDownSeatAllMessage alloc] init];
             MJWeakSelf;
-            [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
-                [weakSelf removeSeatMember:NO];
+            self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"确认后所有连麦中学员都将下麦" leftButtonTitle:@"取消" rightTitle:@"确认" inView:self.view cancel:^{
+                
+            } confirm:^{
+                [weakSelf downSeatAll];
             }];
+            
         }
             break;
         case LIVESECONTROL_REFUSEALL:
         {
-            KSRejectAllSeatMessage *message = [[KSRejectAllSeatMessage alloc] init];
             MJWeakSelf;
-            [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
-                [weakSelf removeSeatMember:YES];
+            self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"确认将正在申请连麦的学员清空?" leftButtonTitle:@"取消" rightTitle:@"确认" inView:self.view cancel:^{
+                
+            } confirm:^{
+                [weakSelf refuseAllSeatApply];
             }];
+            
         }
             break;
             
@@ -1877,6 +1874,33 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
     }
 }
 
+// 禁止连麦
+- (void)forceSeatAction {
+    RCChatroomSeatsControl *message = [[RCChatroomSeatsControl alloc] init];
+    message.userId = self.createrId;
+    message.userName = self.createrName;
+    message.seatBan = YES;
+    MJWeakSelf;
+    [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
+        [weakSelf removeSeatMember:YES];
+    }];
+}
+// 全员下麦
+- (void)downSeatAll {
+    KSDownSeatAllMessage *message = [[KSDownSeatAllMessage alloc] init];
+    MJWeakSelf;
+    [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
+        [weakSelf removeSeatMember:NO];
+    }];
+}
+
+- (void)refuseAllSeatApply {
+    KSRejectAllSeatMessage *message = [[KSRejectAllSeatMessage alloc] init];
+    MJWeakSelf;
+    [self sendMessage:message displayMessage:NO callback:^(BOOL success) {
+        [weakSelf removeSeatMember:YES];
+    }];
+}
 
 - (void)removeSeatMember:(BOOL)isApply {
     NSMutableArray *seatArray = [self.seatApplyArray mutableCopy];

+ 17 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Live/View/SeatListView/LiveApplyControlView.m

@@ -7,6 +7,7 @@
 //
 
 #import "LiveApplyControlView.h"
+#import "LiveRoomAlertView.h"
 
 @interface LiveApplyControlView ()
 
@@ -14,6 +15,9 @@
 
 @property (weak, nonatomic) IBOutlet UIButton *controlButton;
 
+/// 提示窗
+@property (nonatomic, strong) LiveRoomAlertView *alertView;
+
 @end
 
 @implementation LiveApplyControlView
@@ -38,12 +42,24 @@
 
 
 - (IBAction)seatControlAction:(id)sender {
+    
+    
     if (self.isForbiddenApply) {
         self.callback(APPLYACTION_ALLOW);
+        self.isForbiddenApply = !self.isForbiddenApply;
     }
     else {
-        self.callback(APPLYACTION_FORBIDDEN);
+        MJWeakSelf;
+        self.alertView = [LiveRoomAlertView liveroomAlertWithTitle:@"是否确认禁止学员连麦?" leftButtonTitle:@"取消" rightTitle:@"确定" inView:[NSObject getKeyWindow] cancel:^{
+            
+        } confirm:^{
+            [weakSelf forbiddenSeatApply];
+        }];
     }
+}
+
+- (void)forbiddenSeatApply {
+    self.callback(APPLYACTION_FORBIDDEN);
     self.isForbiddenApply = !self.isForbiddenApply;
 }