Browse Source

直播暂停时,切换成前置摄像头

Steven 8 months ago
parent
commit
5393d05c8c

+ 13 - 2
KulexiuForTeacher/KulexiuForTeacher/Common/Base/WebView/KSBaseWKWebViewController.m

@@ -78,6 +78,9 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 @property (nonatomic, strong) KSNewAlertView *wifiAlert;
 
+// 是否需要重新加载
+@property (nonatomic, assign) BOOL needReload;
+
 @end
 
 @implementation KSBaseWKWebViewController
@@ -138,6 +141,10 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
+    if (self.needReload) {
+        self.needReload = NO;
+        [self.myWebView reload];
+    }
     if (_hasChangeSource) {
         [self setParmDic:self.parmDic];
     }
@@ -1279,8 +1286,12 @@ typedef NS_ENUM(NSInteger, CHOOSETYPE) {
 //当因为某些问题,导致webView进程终止时触发
 - (void)webViewWebContentProcessDidTerminate:(WKWebView *)webView {
     NSLog(@"%s", __func__);
-    [webView reload];
-
+    if (self.navigationController.visibleViewController == self) {
+        [webView reload];
+    }
+    else {
+        self.needReload = YES;
+    }
 }
 
 /**

+ 0 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Controller/MineViewController.m

@@ -111,7 +111,6 @@
     else {
         self.bottomView.bandStatusView.text = @"未绑定";
     }
-
 }
 
 - (void)queryAmountDetail {

+ 3 - 1
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/Controller/AccountDeleteViewController.m

@@ -84,7 +84,9 @@
             }];
         }
         else if ([dic ks_integerValueForKey:@"code"] == 5201) {
-            [self showFailAlert:[dic ks_arrayValueForKey:@"message"]];
+            NSString *message = MESSAGEKEY;
+            NSArray *tipsArray = [message mj_JSONObject];
+            [self showFailAlert:tipsArray];
         }
         else {
             [LOADING_MANAGER MBShowAUTOHidingInWindow:MESSAGEKEY];

+ 4 - 8
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/DeleteAccount/View/KSDeleteFailedAlertView.xib

@@ -15,7 +15,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A1m-G5-f05">
-                    <rect key="frame" x="44" y="279.66666666666669" width="305" height="293.00000000000006"/>
+                    <rect key="frame" x="44" y="338" width="305" height="176"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="注销失败" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PVB-qM-x6a">
                             <rect key="frame" x="115.66666666666666" y="20" width="73.666666666666657" height="25"/>
@@ -35,18 +35,14 @@
                             <color key="textColor" red="0.95686274509803915" green="0.27058823529411763" blue="0.25490196078431371" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
-                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tua-23-XnI">
-                            <rect key="frame" x="20" y="91" width="269" height="117"/>
-                            <string key="text">1、账户存在未支付、未确认收货、售后处理中的订单
-2、账户为机构群群主、需要转移群主或解散群聊
-3、存在进行中的直播课、陪练课、琴房课,未下架的视频课
-4、收入未结算/推广计划未入账</string>
+                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tua-23-XnI">
+                            <rect key="frame" x="20" y="91" width="269" height="0.0"/>
                             <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="14"/>
                             <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <nil key="highlightedColor"/>
                         </label>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yzR-DS-KGK">
-                            <rect key="frame" x="20" y="232.99999999999994" width="265" height="40"/>
+                            <rect key="frame" x="20" y="116" width="265" height="40"/>
                             <color key="backgroundColor" red="0.1764705882352941" green="0.7803921568627451" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="40" id="a7o-Kz-WXl"/>

+ 2 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/TXLiveModule/Controller/TXLiveRoomViewController.m

@@ -1745,11 +1745,13 @@ typedef NS_ENUM(NSInteger, LIVEPAGE) {
 }
 
 - (void)pauseLive {
+    [[self.trtcCloud getDeviceManager] switchCamera:YES];
     [self.trtcCloud stopPublishing];
     [self.trtcCloud exitRoom];
 }
 
 - (void)pauseLiveReset {
+    [[self.trtcCloud getDeviceManager] switchCamera:YES];
     [self.moreView hideView];
     self.isPauseLive = YES;
     self.pageType = LIVEPAGE_PREVIEW;