Browse Source

声网视频界面去掉XIB界面控件,使用代码编写

master
公司电脑 1 year ago
parent
commit
e98c11384b
  1. 4
      tongxin.xcodeproj/project.pbxproj
  2. BIN
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate
  3. 68
      tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 26
      tongxin/AppDelegate.m
  5. BIN
      tongxin/Assets.xcassets/tihu/video_icon_camera.imageset/video_icon_camera.png
  6. BIN
      tongxin/Assets.xcassets/tihu/video_icon_cancle.imageset/video_icon_cancle.png
  7. BIN
      tongxin/Assets.xcassets/tihu/video_icon_muteoff.imageset/video_icon_muteoff.png
  8. BIN
      tongxin/Assets.xcassets/tihu/video_icon_muteon.imageset/video_icon_muteon.png
  9. BIN
      tongxin/Assets.xcassets/tihu/video_icon_pickup.imageset/video_icon_pickup.png
  10. 309
      tongxin/Base.lproj/Main.storyboard
  11. 7
      tongxin/VC/DeviceTab/ChatListViewController.m
  12. 11
      tongxin/VC/DeviceTab/View/ChatListTableViewCell.m
  13. 32
      tongxin/VC/Discover/DiscoverViewController.m
  14. 4
      tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.h
  15. 439
      tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m

4
tongxin.xcodeproj/project.pbxproj

@ -7234,7 +7234,7 @@ @@ -7234,7 +7234,7 @@
"$(PROJECT_DIR)/sdk/lib/ios",
);
MACH_O_TYPE = mh_execute;
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.4.1;
"OTHER_CODE_SIGN_FLAGS[sdk=*]" = "--generate-entitlement-der";
OTHER_LDFLAGS = (
"$(inherited)",
@ -7350,7 +7350,7 @@ @@ -7350,7 +7350,7 @@
"$(PROJECT_DIR)/tongxin/ThirdPartyLib/ShareSDK/ShareSDK/Support/PlatformSDK/WeChatSDK",
"$(PROJECT_DIR)/sdk/lib/ios",
);
MARKETING_VERSION = 1.4.0;
MARKETING_VERSION = 1.4.1;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",

BIN
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

68
tongxin.xcworkspace/xcuserdata/ecell.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -254,8 +254,8 @@ @@ -254,8 +254,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "243"
endingLineNumber = "243"
startingLineNumber = "246"
endingLineNumber = "246"
landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:"
landmarkType = "7">
</BreakpointContent>
@ -270,8 +270,8 @@ @@ -270,8 +270,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "221"
endingLineNumber = "221"
startingLineNumber = "224"
endingLineNumber = "224"
landmarkName = "-pushRegistry:didReceiveIncomingPushWithPayload:forType:"
landmarkType = "7">
</BreakpointContent>
@ -295,22 +295,6 @@ @@ -295,22 +295,6 @@
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "6CB520B1-238D-4555-B13E-6BA39EAF219C"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "276"
endingLineNumber = "276"
landmarkName = "-joinChannel"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "ECF527CF-4695-437B-9E9A-AEFF67F5C7EE"
shouldBeEnabled = "No"
ignoreCount = "0"
@ -494,8 +478,8 @@ @@ -494,8 +478,8 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "157"
endingLineNumber = "157"
startingLineNumber = "160"
endingLineNumber = "160"
landmarkName = "-showRootViewController"
landmarkType = "7">
</BreakpointContent>
@ -526,8 +510,8 @@ @@ -526,8 +510,8 @@
filePath = "tongxin/VC/DeviceTab/ChatListViewController.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "116"
endingLineNumber = "116"
startingLineNumber = "119"
endingLineNumber = "119"
landmarkName = "-getModelList"
landmarkType = "7">
</BreakpointContent>
@ -574,11 +558,43 @@ @@ -574,11 +558,43 @@
filePath = "tongxin/AppDelegate.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "560"
endingLineNumber = "560"
startingLineNumber = "563"
endingLineNumber = "563"
landmarkName = "-handlePushMsg:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "2C27311D-DF03-444E-AB76-18E11B6AD269"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/VC/WatchHome/Chat/ChatPresenter.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "155"
endingLineNumber = "155"
landmarkName = "-P_getFamilyMessageLastMsg:block:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "E847ADF9-CA03-47B4-9852-E7501D7395E3"
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "tongxin/VC/DeviceTab/View/ChatListTableViewCell.m"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "65"
endingLineNumber = "65"
landmarkName = "-setListModel:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

26
tongxin/AppDelegate.m

@ -56,6 +56,9 @@ @@ -56,6 +56,9 @@
@property (nonatomic, strong) BUSplashAd *splashAd;
@property (nonatomic, strong) CLLocationManager *locationManager;
/// 广告提示【互动广告】
@property (nonatomic ,weak) UILabel *splashLabel;
@end
@implementation AppDelegate
@ -949,6 +952,14 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response @@ -949,6 +952,14 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
- (void)splashAdLoadSuccess:(nonnull BUSplashAd *)splashAd {
UIWindow *keyWindow = self.window;
[splashAd showSplashViewInRootViewController:keyWindow.rootViewController];
UILabel *splashLabel = [UICommon ui_label:CGRectMake(ScreenWidth-190, 55, 90, 35) lines:0 align:NSTextAlignmentCenter font:FontBold_(18) textColor:UIColor.redColor text:@"互动广告" Radius:5];
splashLabel.layer.borderWidth = 2;
splashLabel.layer.borderColor = UIColor.redColor.CGColor;
splashLabel.layer.cornerRadius = 5;
self.splashLabel = splashLabel;
[keyWindow addSubview:splashLabel];
}
///当材料加载失败时调用此方法
@ -984,6 +995,21 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response @@ -984,6 +995,21 @@ didReceiveNotificationResponse:(UNNotificationResponse *)response
[self pbu_logWithSEL:_cmd msg:@""];
}
/// 广告加载关闭是调用
- (void)splashAdViewControllerDidClose:(BUSplashAd *)splashAd;
{
NSLog(@"广告关闭1111");
self.splashLabel.hidden = YES;
[self.splashLabel removeFromSuperview];
}
- (void)splashAdDidClose:(BUSplashAd *)splashAd closeType:(BUSplashAdCloseType)closeType
{
NSLog(@"广告关闭2222");
self.splashLabel.hidden = YES;
[self.splashLabel removeFromSuperview];
}
- (void)disYulan
{
[self.tabbarView removeTransitionImageView];

BIN
tongxin/Assets.xcassets/tihu/video_icon_camera.imageset/video_icon_camera.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

BIN
tongxin/Assets.xcassets/tihu/video_icon_cancle.imageset/video_icon_cancle.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

BIN
tongxin/Assets.xcassets/tihu/video_icon_muteoff.imageset/video_icon_muteoff.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
tongxin/Assets.xcassets/tihu/video_icon_muteon.imageset/video_icon_muteon.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

BIN
tongxin/Assets.xcassets/tihu/video_icon_pickup.imageset/video_icon_pickup.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.7 KiB

309
tongxin/Base.lproj/Main.storyboard

@ -309,7 +309,7 @@ @@ -309,7 +309,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="yYj-CX-GSq">
<rect key="frame" x="-5" y="-2" width="415" height="888"/>
<rect key="frame" x="-5" y="-3" width="414" height="889"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -594,7 +594,7 @@ @@ -594,7 +594,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="9Sd-MY-dkl">
<rect key="frame" x="-5" y="-6" width="411" height="837"/>
<rect key="frame" x="-5" y="-7" width="410" height="837"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -832,7 +832,7 @@ @@ -832,7 +832,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="fdb-yC-NRU">
<rect key="frame" x="-10" y="-9" width="415" height="841"/>
<rect key="frame" x="-11" y="-9" width="416" height="840"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -885,7 +885,7 @@ @@ -885,7 +885,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="u3U-xa-d3l">
<rect key="frame" x="-4" y="-10" width="409" height="899"/>
<rect key="frame" x="-6" y="-11" width="410" height="900"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -918,7 +918,7 @@ @@ -918,7 +918,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Ykk-7Z-UpG">
<rect key="frame" x="-6" y="-10" width="415" height="899"/>
<rect key="frame" x="-8" y="-11" width="416" height="900"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1012,7 +1012,7 @@ @@ -1012,7 +1012,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="mtt-Mo-j7U">
<rect key="frame" x="-6" y="-7" width="415" height="895"/>
<rect key="frame" x="-6" y="-9" width="414" height="897"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1045,7 +1045,7 @@ @@ -1045,7 +1045,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="tLS-6Z-FQc">
<rect key="frame" x="-9" y="-5" width="417" height="833"/>
<rect key="frame" x="-11" y="-6" width="418" height="833"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1164,7 +1164,7 @@ @@ -1164,7 +1164,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="evp-sX-Top">
<rect key="frame" x="-11" y="-9" width="419" height="841"/>
<rect key="frame" x="-11" y="-9" width="419" height="840"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1203,7 +1203,7 @@ @@ -1203,7 +1203,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="M3g-Sh-w1g">
<rect key="frame" x="-10" y="-10" width="415" height="898"/>
<rect key="frame" x="-11" y="-10" width="416" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1532,7 +1532,7 @@ @@ -1532,7 +1532,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="icj-ld-7og">
<rect key="frame" x="-7" y="-4" width="415" height="892"/>
<rect key="frame" x="-8" y="-5" width="415" height="892"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1565,7 +1565,7 @@ @@ -1565,7 +1565,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="Huh-hx-LWE">
<rect key="frame" x="-8" y="-8" width="410" height="839"/>
<rect key="frame" x="-9" y="-10" width="411" height="841"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1597,7 +1597,7 @@ @@ -1597,7 +1597,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="T9y-JO-Vij">
<rect key="frame" x="-6" y="-8" width="413" height="747"/>
<rect key="frame" x="-6" y="-9" width="412" height="747"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="pGT-C4-oxb">
<size key="itemSize" width="50" height="50"/>
@ -1621,7 +1621,7 @@ @@ -1621,7 +1621,7 @@
</connections>
</collectionView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z5R-FY-uMc">
<rect key="frame" x="7" y="775" width="383" height="48"/>
<rect key="frame" x="7" y="773" width="382" height="49"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" red="0.99286490679999995" green="0.70024234060000001" blue="0.031074030320000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<state key="normal" title="远程拍照">
@ -1769,7 +1769,7 @@ @@ -1769,7 +1769,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="xCB-V0-YNN">
<rect key="frame" x="-7" y="-5" width="415" height="835"/>
<rect key="frame" x="-8" y="-6" width="416" height="835"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1808,7 +1808,7 @@ @@ -1808,7 +1808,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="CJv-tt-zil">
<rect key="frame" x="-11" y="-9" width="421" height="837"/>
<rect key="frame" x="-11" y="-10" width="421" height="837"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -1895,7 +1895,7 @@ @@ -1895,7 +1895,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" translatesAutoresizingMaskIntoConstraints="NO" id="1ns-Ko-6b0">
<rect key="frame" x="-10" y="-4" width="413" height="890"/>
<rect key="frame" x="-10" y="-4" width="412" height="889"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" systemColor="groupTableViewBackgroundColor"/>
<connections>
@ -3261,7 +3261,7 @@ @@ -3261,7 +3261,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Cty-3P-E2Q">
<rect key="frame" x="-12" y="-6" width="421" height="893"/>
<rect key="frame" x="-13" y="-6" width="422" height="893"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0FL-fQ-Dy8">
@ -3573,295 +3573,30 @@ @@ -3573,295 +3573,30 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="DDg-gc-zyG">
<rect key="frame" x="-9" y="-6" width="414" height="893"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="893"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FRA-7K-nag">
<rect key="frame" x="260" y="108" width="140" height="385"/>
<rect key="frame" x="260" y="107" width="139" height="177"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</view>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="grm-sg-jiC">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="grm-sg-jiC">
<rect key="frame" x="147" y="164" width="120" height="120"/>
<constraints>
<constraint firstAttribute="width" constant="120" id="bmo-mm-xO5"/>
<constraint firstAttribute="height" constant="120" id="pWa-Bx-cCC"/>
</constraints>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="昵称" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qo1-iX-rJZ">
<rect key="frame" x="20" y="309" width="374" height="30"/>
<constraints>
<constraint firstAttribute="height" constant="30" id="kHm-9Q-XAT"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="00:00" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qsr-Rd-Ptg">
<rect key="frame" x="167" y="677" width="80" height="35"/>
<constraints>
<constraint firstAttribute="width" constant="80" id="SAN-gI-p8R"/>
<constraint firstAttribute="height" constant="35" id="j3H-xM-fJ8"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="b1k-UE-Gh9">
<rect key="frame" x="62" y="732" width="290" height="90"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CUm-gw-f59">
<rect key="frame" x="0.0" y="0.0" width="60" height="90"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Aic-6h-Xhy" userLabel="HangupView">
<rect key="frame" x="0.0" y="0.0" width="60" height="90"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Cw7-yb-S7p">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" secondItem="Cw7-yb-S7p" secondAttribute="height" multiplier="1:1" id="9Ee-OA-OVs"/>
<constraint firstAttribute="width" constant="60" id="Cof-Ib-WdE"/>
</constraints>
<state key="normal" image="hangup"/>
<connections>
<action selector="hangUpButton:" destination="CEf-zS-oi5" eventType="touchUpInside" id="Hh7-et-qFE"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="挂断" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XwQ-De-J5C">
<rect key="frame" x="0.0" y="60" width="60" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="XwQ-De-J5C" secondAttribute="trailing" id="6lu-II-GXC"/>
<constraint firstItem="XwQ-De-J5C" firstAttribute="top" secondItem="Cw7-yb-S7p" secondAttribute="bottom" id="HE5-7S-1oi"/>
<constraint firstItem="XwQ-De-J5C" firstAttribute="leading" secondItem="Aic-6h-Xhy" secondAttribute="leading" id="JRl-N5-1XY"/>
<constraint firstAttribute="width" constant="60" id="Rtq-XK-o8D"/>
<constraint firstAttribute="height" constant="90" id="SLi-pz-oVX"/>
<constraint firstItem="Cw7-yb-S7p" firstAttribute="top" secondItem="Aic-6h-Xhy" secondAttribute="top" id="Z0I-eI-9Xd"/>
<constraint firstAttribute="bottom" secondItem="XwQ-De-J5C" secondAttribute="bottom" id="jki-Og-FAE"/>
<constraint firstItem="Cw7-yb-S7p" firstAttribute="leading" secondItem="Aic-6h-Xhy" secondAttribute="leading" id="yTW-4Y-Pe5"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="Aic-6h-Xhy" firstAttribute="top" secondItem="CUm-gw-f59" secondAttribute="top" id="BxD-Ub-1o8"/>
<constraint firstAttribute="width" constant="60" id="fBK-vY-4Ev"/>
<constraint firstAttribute="bottom" secondItem="Aic-6h-Xhy" secondAttribute="bottom" id="fuA-l5-G5Y"/>
<constraint firstAttribute="height" constant="90" id="pZb-7F-Wn4"/>
<constraint firstAttribute="trailing" secondItem="Aic-6h-Xhy" secondAttribute="trailing" id="qbe-cd-9Kt"/>
<constraint firstItem="Aic-6h-Xhy" firstAttribute="leading" secondItem="CUm-gw-f59" secondAttribute="leading" id="whD-qg-M3z"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U3A-wb-KtZ">
<rect key="frame" x="115" y="0.0" width="60" height="90"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="s7z-Uh-dn1" userLabel="ActiveHangupView">
<rect key="frame" x="0.0" y="0.0" width="60" height="90"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="挂断" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="1og-WL-ia3">
<rect key="frame" x="0.0" y="60" width="60" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="M9Z-hJ-RO2">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="0FE-i7-kmx"/>
<constraint firstAttribute="width" secondItem="M9Z-hJ-RO2" secondAttribute="height" multiplier="1:1" id="zzG-2i-S8q"/>
</constraints>
<state key="normal" image="hangup"/>
<connections>
<action selector="activeHangUpBtnAction:" destination="CEf-zS-oi5" eventType="touchUpInside" id="lJG-AV-YIv"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="M9Z-hJ-RO2" firstAttribute="leading" secondItem="s7z-Uh-dn1" secondAttribute="leading" id="EHp-eM-v2W"/>
<constraint firstAttribute="width" constant="60" id="Jzc-Bz-qe5"/>
<constraint firstAttribute="bottom" secondItem="1og-WL-ia3" secondAttribute="bottom" id="Lcq-Wj-vch"/>
<constraint firstItem="M9Z-hJ-RO2" firstAttribute="top" secondItem="s7z-Uh-dn1" secondAttribute="top" id="Lkw-bD-R46"/>
<constraint firstItem="1og-WL-ia3" firstAttribute="leading" secondItem="s7z-Uh-dn1" secondAttribute="leading" id="MTI-75-lUm"/>
<constraint firstAttribute="trailing" secondItem="1og-WL-ia3" secondAttribute="trailing" id="Zs1-ni-I73"/>
<constraint firstAttribute="height" constant="90" id="mZS-iL-hau"/>
<constraint firstItem="1og-WL-ia3" firstAttribute="top" secondItem="M9Z-hJ-RO2" secondAttribute="bottom" id="xSx-Kr-jjZ"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="s7z-Uh-dn1" secondAttribute="trailing" id="LCE-dj-dVG"/>
<constraint firstAttribute="height" constant="90" id="Lt8-sz-cwb"/>
<constraint firstAttribute="bottom" secondItem="s7z-Uh-dn1" secondAttribute="bottom" id="QBI-1M-S3D"/>
<constraint firstItem="s7z-Uh-dn1" firstAttribute="leading" secondItem="U3A-wb-KtZ" secondAttribute="leading" id="gOh-L3-LpS"/>
<constraint firstItem="s7z-Uh-dn1" firstAttribute="top" secondItem="U3A-wb-KtZ" secondAttribute="top" id="naq-jR-HZg"/>
<constraint firstAttribute="width" constant="60" id="tXl-L0-zyL"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aaw-c5-bnu">
<rect key="frame" x="230" y="0.0" width="60" height="90"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Cdh-mQ-3JZ" userLabel="AcceptView">
<rect key="frame" x="0.0" y="0.0" width="60" height="90"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="接听" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="25G-WX-1D2">
<rect key="frame" x="0.0" y="60" width="60" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MLy-ni-D1R">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" secondItem="MLy-ni-D1R" secondAttribute="height" multiplier="1:1" id="2hT-EZ-UEi"/>
<constraint firstAttribute="width" constant="60" id="BS4-TW-4HL"/>
</constraints>
<state key="normal" image="call"/>
<connections>
<action selector="acceptBtnAction:" destination="CEf-zS-oi5" eventType="touchUpInside" id="CaS-cv-KJz"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="0I6-xY-RLu"/>
<constraint firstItem="25G-WX-1D2" firstAttribute="leading" secondItem="Cdh-mQ-3JZ" secondAttribute="leading" id="3iK-DE-Gde"/>
<constraint firstAttribute="trailing" secondItem="25G-WX-1D2" secondAttribute="trailing" id="5bo-Gr-NLI"/>
<constraint firstAttribute="bottom" secondItem="25G-WX-1D2" secondAttribute="bottom" id="Deq-8O-iwP"/>
<constraint firstAttribute="width" constant="60" id="LEs-sl-39X"/>
<constraint firstItem="MLy-ni-D1R" firstAttribute="leading" secondItem="Cdh-mQ-3JZ" secondAttribute="leading" id="NWw-PZ-Tfw"/>
<constraint firstItem="MLy-ni-D1R" firstAttribute="top" secondItem="Cdh-mQ-3JZ" secondAttribute="top" id="QI3-Yl-sZX"/>
<constraint firstItem="25G-WX-1D2" firstAttribute="top" secondItem="MLy-ni-D1R" secondAttribute="bottom" id="QwV-Dd-jsw"/>
<constraint firstAttribute="bottom" secondItem="25G-WX-1D2" secondAttribute="bottom" id="sYt-41-dvm"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="9pl-m5-qzS"/>
<constraint firstAttribute="trailing" secondItem="Cdh-mQ-3JZ" secondAttribute="trailing" id="GoS-d9-2so"/>
<constraint firstItem="Cdh-mQ-3JZ" firstAttribute="top" secondItem="aaw-c5-bnu" secondAttribute="top" id="U0N-IN-moD"/>
<constraint firstItem="Cdh-mQ-3JZ" firstAttribute="leading" secondItem="aaw-c5-bnu" secondAttribute="leading" id="mYF-1w-FNE"/>
<constraint firstAttribute="width" constant="60" id="rBm-py-Nuw"/>
<constraint firstAttribute="bottom" secondItem="Cdh-mQ-3JZ" secondAttribute="bottom" id="sua-Bv-jPg"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="height" constant="90" id="yoV-n5-g6q"/>
</constraints>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ulG-cV-u6U" userLabel="switchCameraView">
<rect key="frame" x="301" y="732" width="60" height="90"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="转换摄像头" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WAh-iu-5jy">
<rect key="frame" x="0.0" y="60" width="60" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fyu-gG-NZI" userLabel="switchCameraButton">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="Lhk-Vw-SIF"/>
<constraint firstAttribute="height" constant="60" id="sX8-BK-xiK"/>
</constraints>
<state key="normal" image="Button_Camera"/>
<state key="selected" image="Button_Camera_active"/>
<connections>
<action selector="didClickSwitchCameraButton:" destination="CEf-zS-oi5" eventType="touchUpInside" id="IfT-sB-BuA"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="90" id="TBc-i5-bHY"/>
<constraint firstItem="WAh-iu-5jy" firstAttribute="leading" secondItem="ulG-cV-u6U" secondAttribute="leading" id="YLr-nf-JAo"/>
<constraint firstAttribute="trailing" secondItem="WAh-iu-5jy" secondAttribute="trailing" id="amV-dZ-iiR"/>
<constraint firstAttribute="bottom" secondItem="WAh-iu-5jy" secondAttribute="bottom" id="beh-rZ-3rp"/>
<constraint firstItem="WAh-iu-5jy" firstAttribute="top" secondItem="fyu-gG-NZI" secondAttribute="bottom" id="dhk-1v-iLI"/>
<constraint firstAttribute="width" constant="60" id="gxy-VP-o6F"/>
<constraint firstItem="fyu-gG-NZI" firstAttribute="leading" secondItem="ulG-cV-u6U" secondAttribute="leading" id="iSI-zo-vSd"/>
<constraint firstItem="fyu-gG-NZI" firstAttribute="top" secondItem="ulG-cV-u6U" secondAttribute="top" id="pKh-OD-1kB"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fve-L7-AkA" userLabel="muteBtnView">
<rect key="frame" x="53" y="732" width="60" height="90"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="L0G-cL-xfU" userLabel="muteButton">
<rect key="frame" x="0.0" y="0.0" width="60" height="60"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="D8u-6U-FhS"/>
<constraint firstAttribute="height" constant="60" id="yoW-Kq-JNE"/>
</constraints>
<state key="normal" image="Button_Mute"/>
<state key="selected" image="Button_Mute_active"/>
<connections>
<action selector="didClickMuteButton:" destination="CEf-zS-oi5" eventType="touchUpInside" id="b3c-uT-9z1"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="静音" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Md1-lQ-KFu">
<rect key="frame" x="0.0" y="60" width="60" height="30"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="width" constant="60" id="McS-DW-iot"/>
<constraint firstItem="L0G-cL-xfU" firstAttribute="leading" secondItem="Fve-L7-AkA" secondAttribute="leading" id="UjE-hf-BDg"/>
<constraint firstItem="Md1-lQ-KFu" firstAttribute="leading" secondItem="Fve-L7-AkA" secondAttribute="leading" id="YYh-Kq-1eW"/>
<constraint firstAttribute="height" constant="90" id="ctD-W6-H9w"/>
<constraint firstItem="Md1-lQ-KFu" firstAttribute="top" secondItem="L0G-cL-xfU" secondAttribute="bottom" id="nER-kA-Vki"/>
<constraint firstItem="L0G-cL-xfU" firstAttribute="top" secondItem="Fve-L7-AkA" secondAttribute="top" id="s5t-oA-jCI"/>
<constraint firstAttribute="trailing" secondItem="Md1-lQ-KFu" secondAttribute="trailing" id="vb9-XW-OO5"/>
<constraint firstAttribute="bottom" secondItem="Md1-lQ-KFu" secondAttribute="bottom" id="xEh-MK-Acg"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Qo1-iX-rJZ" secondAttribute="trailing" constant="20" id="66S-Zu-vpg"/>
<constraint firstItem="Fve-L7-AkA" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" multiplier="0.4" id="6sv-re-zx4"/>
<constraint firstItem="ytO-Z5-HRC" firstAttribute="top" secondItem="ulG-cV-u6U" secondAttribute="bottom" constant="40" id="8ap-yi-qEj"/>
<constraint firstItem="Qo1-iX-rJZ" firstAttribute="top" secondItem="grm-sg-jiC" secondAttribute="bottom" constant="25" id="9MS-EV-15Z"/>
<constraint firstItem="Qo1-iX-rJZ" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" id="B4M-Jr-ZaD"/>
<constraint firstItem="b1k-UE-Gh9" firstAttribute="width" secondItem="Jcg-nt-5Dc" secondAttribute="width" multiplier="0.7" id="CP8-PT-ghp"/>
<constraint firstItem="ulG-cV-u6U" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" multiplier="1.6" id="JDb-wP-L6s"/>
<constraint firstItem="Qo1-iX-rJZ" firstAttribute="leading" secondItem="Jcg-nt-5Dc" secondAttribute="leading" constant="20" id="Jyb-WK-I2h"/>
<constraint firstItem="ytO-Z5-HRC" firstAttribute="top" secondItem="b1k-UE-Gh9" secondAttribute="bottom" constant="40" id="QF6-Xt-Gej"/>
<constraint firstItem="b1k-UE-Gh9" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" id="RUz-KG-2OY"/>
<constraint firstItem="qsr-Rd-Ptg" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" id="WdD-22-eI9"/>
<constraint firstItem="ytO-Z5-HRC" firstAttribute="top" secondItem="Fve-L7-AkA" secondAttribute="bottom" constant="40" id="aCY-1v-f7O"/>
<constraint firstItem="grm-sg-jiC" firstAttribute="centerX" secondItem="Jcg-nt-5Dc" secondAttribute="centerX" id="dtf-qv-Eh4"/>
<constraint firstItem="grm-sg-jiC" firstAttribute="centerY" secondItem="Jcg-nt-5Dc" secondAttribute="centerY" multiplier="0.5" id="muX-Wh-1Hn"/>
<constraint firstItem="b1k-UE-Gh9" firstAttribute="top" secondItem="qsr-Rd-Ptg" secondAttribute="bottom" constant="20" id="ttM-Dh-8Fs"/>
</constraints>
</view>
<connections>
<outlet property="acceptView" destination="Cdh-mQ-3JZ" id="Ii6-Jg-3RO"/>
<outlet property="activeHangupView" destination="s7z-Uh-dn1" id="fMe-tO-Vgu"/>
<outlet property="buttonStackView" destination="b1k-UE-Gh9" id="Ebj-hQ-tWY"/>
<outlet property="hangupView" destination="Aic-6h-Xhy" id="DRE-4b-nDU"/>
<outlet property="headImageView" destination="grm-sg-jiC" id="wVU-ej-SQT"/>
<outlet property="localVideo" destination="FRA-7K-nag" id="ORE-BL-23D"/>
<outlet property="muteBtnView" destination="Fve-L7-AkA" id="R8M-JC-4uy"/>
<outlet property="nameLabel" destination="Qo1-iX-rJZ" id="d4R-XR-Ust"/>
<outlet property="remoteVideo" destination="DDg-gc-zyG" id="3RY-Rf-kRC"/>
<outlet property="switchCameraView" destination="ulG-cV-u6U" id="wSV-zw-s0g"/>
<outlet property="timeLabel" destination="qsr-Rd-Ptg" id="WlA-QZ-iNE"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hvt-9m-CqO" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="801" y="-2643"/>
<point key="canvasLocation" x="800.00000000000011" y="-2643.0803571428569"/>
</scene>
<!--历史轨迹-->
<scene sceneID="dpR-LR-6tV">

7
tongxin/VC/DeviceTab/ChatListViewController.m

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#import "ChatViewController.h"
#import "ChatListTableViewCell.h"
#import "ChatListModel.h"
#import "MJRefresh.h"
@interface ChatListViewController ()
@property (nonatomic ,strong) CommonTableView *listTable;
@ -83,7 +84,9 @@ @@ -83,7 +84,9 @@
}];
_listTable.backgroundColor = KKClearColor;
[UICommon setTavleViewlink:_listTable distance:15];
_listTable.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
[self getModelList];
}];
}
@ -111,7 +114,7 @@ @@ -111,7 +114,7 @@
}
weakSelf.listTable.cellRow = weakSelf.myDataSource.count;
[weakSelf.listTable reloadData];
[weakSelf.listTable.mj_header endRefreshing];
} failure:^(NSError *error) {
[weakSelf.navigationController popViewControllerAnimated:YES];
}];

11
tongxin/VC/DeviceTab/View/ChatListTableViewCell.m

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
#import "ChatListTableViewCell.h"
#import "UIImageView+MultiAvatar.h"
#import "DCAvatar.h"
#import "Device.h"
#import "User.h"
//#import <CDDGroupAvatar/DCAvatar.h>
@interface ChatListTableViewCell ()
@ -29,7 +31,7 @@ @@ -29,7 +31,7 @@
if (self)
{
self.selectionStyle = UITableViewCellSelectionStyleNone;
self.backgroundColor = KKClearColor;
self.backgroundColor = KKWhiteColorColor;
[self subCellView];
}
@ -53,6 +55,13 @@ @@ -53,6 +55,13 @@
if([dic[@"openid"] isEqualToString:listModel.message[@"senderID"]])
nameStr = [NSString stringWithFormat:@"%@:",dic[@"name"]];
}
for (NSDictionary *dic in listModel.devices)
{
NSString *avator = dic[@"avator"];
if(![avator isEqualToString:@"http://39.108.227.227/getway/devicesDownload/default.jpg"])
[avatorArr addObject:listModel.avator];
}
[self.iconImg dc_setImageAvatarWithGroupId:listModel.groupid Source:avatorArr];
}

32
tongxin/VC/Discover/DiscoverViewController.m

@ -40,22 +40,22 @@ @@ -40,22 +40,22 @@
UIImage *img = ImageName_(@"Discover_banner");
UIButton *ximaBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(0) normalColor:KKWhiteColorColor normalText:@"" click:^(id x) {
ActivityWebViewController *vc = [[ActivityWebViewController alloc] init];
vc.zx_navTitle = @"喜马拉雅";
vc.url = @"https://m.ximalaya.com/kidiot-service-app?appKey=6b267bcd4f91494aa182bb4a89b95a0b&channelId=72e7cc893dd049dc83d62e277080fdbd";
[self.navigationController pushViewController:vc animated:YES];
}];
ximaBtn.layer.cornerRadius = 10;
ximaBtn.layer.masksToBounds = YES;
[ximaBtn setBackgroundImage:img forState:0];
[self.view addSubview:ximaBtn];
[ximaBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view).inset(15);
make.height.mas_equalTo(img.size.height);
// make.top.equalTo(searchBar.mas_bottom).offset(15);
make.top.equalTo(self.disTableView.mas_bottom).offset(15);
}];
// UIButton *ximaBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(0) normalColor:KKWhiteColorColor normalText:@"" click:^(id x) {
// ActivityWebViewController *vc = [[ActivityWebViewController alloc] init];
// vc.zx_navTitle = @"喜马拉雅";
// vc.url = @"https://m.ximalaya.com/kidiot-service-app?appKey=6b267bcd4f91494aa182bb4a89b95a0b&channelId=72e7cc893dd049dc83d62e277080fdbd";
// [self.navigationController pushViewController:vc animated:YES];
// }];
// ximaBtn.layer.cornerRadius = 10;
// ximaBtn.layer.masksToBounds = YES;
// [ximaBtn setBackgroundImage:img forState:0];
// [self.view addSubview:ximaBtn];
// [ximaBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.right.equalTo(self.view).inset(15);
// make.height.mas_equalTo(img.size.height);
//// make.top.equalTo(searchBar.mas_bottom).offset(15);
// make.top.equalTo(self.disTableView.mas_bottom).offset(15);
// }];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section

4
tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.h

@ -46,12 +46,12 @@ @@ -46,12 +46,12 @@
/**
uid
*/
@property(nonatomic, strong) NSString *uid;
@property(nonatomic, assign) NSInteger uid;
/**
device_uid
*/
@property(nonatomic, strong) NSString *device_uid;
@property(nonatomic, assign) NSInteger device_uid;
/**

439
tongxin/VC/WatchHome/DeviceInfo/CallVideo/Agora/CallViewController.m

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
//ios > 10
//#import <CallKit/CXCallObserver.h>
//#import <CallKit/CXCall.h>
#import "User.h"
#import "CallViewController.h"
#import <JLAuthorizationManager.h>
#import <AVFoundation/AVFoundation.h>
@ -28,68 +28,232 @@ @@ -28,68 +28,232 @@
NSInteger tempElapsed ;
BOOL hangUping;
SystemSoundID sound;
NSTimer *shakeTimer;
//CXCallObserver *callObserver;
}
@property (strong, nonatomic) LGAlertView *alertView;
/// 远端摄像头预览
@property (weak, nonatomic) IBOutlet UIView *remoteVideo;
/// 自己摄像头预览
@property (weak, nonatomic) IBOutlet UIView *localVideo;
/**
控制 挂断 和 接听的 容器
*/
@property (weak, nonatomic) IBOutlet UIStackView *buttonStackView;
/**
主动挂断按钮 View
*/
@property (weak, nonatomic) IBOutlet UIView *activeHangupView;
///头像
@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
/// 名称
@property (weak, nonatomic) UILabel *nameLabel;
/// 通话时间
@property (weak, nonatomic) UILabel *timeLabel;
/**
摄像头切换 容器 View
*/
@property (weak, nonatomic) IBOutlet UIView *switchCameraView;
/**
静音按钮 容器View
*/
@property (weak, nonatomic) IBOutlet UIView *muteBtnView;
/// 摄像头开关
@property (weak, nonatomic) UIButton *onSwitchCameraBtn;
/**
被动挂断按钮 View
*/
@property (weak, nonatomic) IBOutlet UIView *hangupView;
///// 摄像头切换
//@property (weak, nonatomic) UIButton *switchCameraBtn;
/**
接听按钮 View
*/
@property (weak, nonatomic) IBOutlet UIView *acceptView;
/// 静音按钮
@property (weak, nonatomic) UIButton *muteBtn;
/// 接听按钮
@property (nonatomic ,weak) UIButton *answerBtn;
/// 挂断按钮(接通之后或拨打等待接听)
@property (nonatomic ,weak) UIButton *hangUpBtn;
/// 挂断按钮(被动呼叫等待接听)
@property (nonatomic ,weak) UIButton *lefthangUpBtn;
/// 麦克风开关
@property (nonatomic ,weak) UIButton *microphoneBtn;
/// 呼叫状态
@property (nonatomic ,weak) UILabel *statusLabel;
/// 与谁的通话
@property (nonatomic ,weak) UILabel *tonghuaLabel;
@property (strong, nonatomic) AgoraRtcEngineKit *agoraKit;
@property (nonatomic) int timeLength;
@property (strong, nonatomic) NSTimer *timeTimer;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
/**
是否是接通状态
*/
@property (nonatomic) BOOL isCall;
@property (weak, nonatomic) IBOutlet UIImageView *headImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@end
@implementation CallViewController
- (void)subViewsLayout
{
CGSize btnSize = CGSizeMake(60, 90);
WEAKSELF
// /// 摄像头切换
// UIButton *switchCameraBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(0) normalColor:KKClearColor normalText:@"" click:^(id x) {
// [weakSelf.agoraKit switchCamera];
// }];
// switchCameraBtn.hidden = YES;
// [switchCameraBtn setImage:ImageName_(@"video_icon_camera") forState:0];
// self.switchCameraBtn = switchCameraBtn;
// [self.view addSubview:switchCameraBtn];
// [switchCameraBtn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.right.equalTo(self.view.mas_right).inset(16);
// make.top.equalTo(self.view).offset(52);
// make.size.mas_equalTo(CGSizeMake(28, 28));
// }];
self.remoteVideo.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
/// 自己摄像头预览
self.localVideo.frame = CGRectMake(ScreenWidth-116, 104, 100, 130);
// self.localVideo.layer.borderWidth = 1;
// self.localVideo.layer.borderColor = KKWhiteColorColor.CGColor;
// self.localVideo.layer.cornerRadius = 4;
// self.localVideo.layer.masksToBounds = YES;
// self.localVideo.hidden = YES;
self.headImageView.hidden = YES;
self.headImageView.layer.cornerRadius = 12;
self.headImageView.layer.masksToBounds = YES;
[self.headImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(self.view).offset(154);
make.size.mas_equalTo(CGSizeMake(128, 128));
}];
UILabel *nameLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(24) textColor:KKWhiteColorColor text:@"" Radius:0];
nameLabel.hidden = YES;
self.nameLabel = nameLabel;
[self.view addSubview:nameLabel];
[nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(self.headImageView.mas_bottom).offset(14);
}];
/// 挂断按钮
UIButton *hangUpBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(11) normalColor:KKWhiteColorColor normalText:@"挂断" click:^(UIButton *btn) {
[weakSelf activeHangUpBtnAction:btn];
}];
hangUpBtn.size = btnSize;
hangUpBtn.hidden = YES;
[hangUpBtn setImage:ImageName_(@"video_icon_cancle") forState:0];
[self setBtnImageAndTitle:hangUpBtn];
self.hangUpBtn = hangUpBtn;
[self.view addSubview:hangUpBtn];
[hangUpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.bottom.equalTo(self.view.mas_bottom).inset(58);
make.size.mas_equalTo(btnSize);
}];
/// 摄像头切换
UIButton *onSwitchCameraBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(11) normalColor:KKWhiteColorColor normalText:@"转换摄像头" click:^(UIButton *btn) {
[weakSelf.agoraKit switchCamera];
}];
onSwitchCameraBtn.size = btnSize;
onSwitchCameraBtn.hidden = YES;
[onSwitchCameraBtn setImage:ImageName_(@"video_icon_camera") forState:UIControlStateNormal];
[self setBtnImageAndTitle:onSwitchCameraBtn];
self.onSwitchCameraBtn = onSwitchCameraBtn;
[self.view addSubview:onSwitchCameraBtn];
[onSwitchCameraBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self.view.mas_right).inset(40);
make.centerY.equalTo(hangUpBtn);
make.size.mas_equalTo(btnSize);
}];
/// 麦克风开关
UIButton *microphoneBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(11) normalColor:KKWhiteColorColor normalText:@"静音" click:^(UIButton *btn) {
btn.selected = !btn.selected;
[weakSelf.agoraKit muteLocalAudioStream:btn.selected];
}];
microphoneBtn.size = btnSize;
microphoneBtn.hidden = YES;
[microphoneBtn setImage:ImageName_(@"video_icon_muteon") forState:UIControlStateNormal];
[microphoneBtn setImage:ImageName_(@"video_icon_muteoff") forState:UIControlStateSelected];
[self setBtnImageAndTitle:microphoneBtn];
self.microphoneBtn = microphoneBtn;
[self.view addSubview:microphoneBtn];
[microphoneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.view).offset(40);
make.centerY.equalTo(hangUpBtn);
make.size.mas_equalTo(btnSize);
}];
/// 挂断按钮(被动呼叫等待接听)
UIButton *lefthangUpBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(11) normalColor:KKWhiteColorColor normalText:@"挂断" click:^(UIButton *btn) {
[weakSelf hangUpButton:btn];
}];
lefthangUpBtn.size = btnSize;
lefthangUpBtn.hidden = YES;
[lefthangUpBtn setImage:ImageName_(@"video_icon_cancle") forState:0];
[self setBtnImageAndTitle:lefthangUpBtn];
self.lefthangUpBtn = lefthangUpBtn;
[self.view addSubview:lefthangUpBtn];
[lefthangUpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.view).offset(40);
make.centerY.equalTo(hangUpBtn);
make.size.mas_equalTo(btnSize);
}];
/// 接听按钮
UIButton *answerBtn = [UICommon ui_buttonSimple:CGRectZero font:Font_(11) normalColor:KKWhiteColorColor normalText:@"接听" click:^(UIButton *btn) {
[weakSelf acceptBtnAction:btn];
}];
answerBtn.size = btnSize;
answerBtn.hidden = YES;
[answerBtn setImage:ImageName_(@"video_icon_pickup") forState:UIControlStateNormal];
[self setBtnImageAndTitle:answerBtn];
self.answerBtn = answerBtn;
[self.view addSubview:answerBtn];
[answerBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.equalTo(self.view.mas_right).inset(40);
make.centerY.equalTo(hangUpBtn);
make.size.mas_equalTo(btnSize);
}];
/// 通话时间
UILabel *timeLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:Font_(18) textColor:KKWhiteColorColor text:@"" Radius:0];
timeLabel.hidden = YES;
self.timeLabel = timeLabel;
[self.view addSubview:timeLabel];
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.bottom.equalTo(hangUpBtn.mas_top).inset(24);
}];
UILabel *statusLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:Font_(16) textColor:KKWhiteColorColor text:@"" Radius:0];
statusLabel.hidden = YES;
self.statusLabel = statusLabel;
[self.view addSubview:statusLabel];
[statusLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(self.view);
make.top.equalTo(nameLabel.mas_bottom).offset(60);
}];
UILabel *tonghuaLabel = [UICommon ui_label:CGRectZero lines:0 align:NSTextAlignmentCenter font:FontBold_(18) textColor:KKWhiteColorColor text:@"" Radius:0];
tonghuaLabel.hidden = YES;
self.tonghuaLabel = tonghuaLabel;
[self.view addSubview:tonghuaLabel];
[tonghuaLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.equalTo(self.view).inset(64);
make.top.equalTo(self.view).offset(52);
}];
}
- (void)viewDidLoad
{
[super viewDidLoad];
WEAKSELF
//添加通知
[[NSNotificationCenter defaultCenter] addObserverForName:AccountMessageNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification * _Nonnull note) {
@ -105,49 +269,47 @@ @@ -105,49 +269,47 @@
}];
self.remoteVideo.frame = CGRectMake(0, 0, ScreenWidth, ScreenHeight);
/// 初始化声网
self.headImageView.layer.cornerRadius = 4;
self.headImageView.layer.masksToBounds = YES;
[self subViewsLayout];
//view.layer.masksToBounds = YES;
//判断性别
NSString *sexImageName = [cUser.cDevice.sex isEqualToString:@"girl"] ? @"icon_girl_head_portrait" : @"icon_boy_head_portrait";
[self.headImageView sd_setImageWithURL:[NSURL URLWithString:self.device.avator]
placeholderImage:[myHelper getImageWithName:sexImageName]
options:SDWebImageRetryFailed];
placeholderImage:[myHelper getImageWithName:sexImageName]
options:SDWebImageRetryFailed];
self.nameLabel.text = self.device.name;
//设置视频 分辨率等设置
// [self setupVideo];
// [self setupVideo];
//设置 本地视频摄像头
// [self setupLocalVideo];
// [self setupLocalVideo];
//MARK: 时间默认 不显示 接通后才显示
self.timeLabel.hidden = YES;
JLAuthorizationManager *jlManager = [JLAuthorizationManager defaultManager];
[jlManager JL_requestAuthorizationWithAuthorizationType:JLAuthorizationTypeAudio
authorizedHandler:nil
unAuthorizedHandler:^{
LGAlertView *alertView = [[LGAlertView alloc] initWithTitle:@"请为智能守护5打开麦克风权限" message:nil style:LGAlertViewStyleAlert buttonTitles:@[@"确定"] cancelButtonTitle:@"取消" destructiveButtonTitle:nil actionHandler:^(LGAlertView *alertView, NSString *title, NSUInteger index) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
} cancelHandler:^(LGAlertView *alertView) {
if(weakSelf.isReceiveCall){
[weakSelf activeHangUpBtnAction:nil];
}else{
[weakSelf hangUpButton:nil];
}
} destructiveHandler:nil];
[alertView showAnimated:YES completionHandler:nil];
}];
LGAlertView *alertView = [[LGAlertView alloc] initWithTitle:@"请为作业帮打开麦克风权限" message:nil style:LGAlertViewStyleAlert buttonTitles:@[@"确定"] cancelButtonTitle:@"取消" destructiveButtonTitle:nil actionHandler:^(LGAlertView *alertView, NSString *title, NSUInteger index) {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
} cancelHandler:^(LGAlertView *alertView) {
if(weakSelf.isReceiveCall){
[weakSelf activeHangUpBtnAction:nil];
}else{
[weakSelf hangUpButton:nil];
}
} destructiveHandler:nil];
[alertView showAnimated:YES completionHandler:nil];
}];
// MARK: 处理来电接听挂断
if([UIDevice currentDevice].systemVersion.floatValue > 10.0){
//callObserver= [CXCallObserver new];
//[callObserver setDelegate:self queue:dispatch_get_main_queue()];
}
}
@ -164,7 +326,7 @@ @@ -164,7 +326,7 @@
//[self.agoraKit setChannelProfile:AgoraChannelProfileLiveBroadcasting];
[self.agoraKit setClientRole:AgoraClientRoleBroadcaster];
[self.agoraKit setLogFile:@"agorasdk"];
//[self.agoraKit setLogFile:@"agorasdk"];
/// 设置默认使用前置摄像头
AgoraCameraCapturerConfiguration *Camera = [[AgoraCameraCapturerConfiguration alloc] init];
@ -174,7 +336,7 @@ @@ -174,7 +336,7 @@
[self.agoraKit enableVideo];
/// 设置 视频分辨率
[self setupVideo];
[self setupVideo];
}
@ -204,7 +366,7 @@ @@ -204,7 +366,7 @@
}
else
{
// [self.agoraKit setParameters:@"{\"rtc.audio.custom_payload_type\":9}"];
//[self.agoraKit setParameters:@"{\"rtc.audio.custom_payload_type\":9}"];
self.videoSize = AgoraVideoDimension240x240;
AgoraVideoEncoderConfiguration *encoderConfiguration =
@ -239,21 +401,19 @@ @@ -239,21 +401,19 @@
- (void)setupLocalVideo
{
if(self.videoSize.width == 160 && self.videoSize.height == 128)
self.localVideo.frame = CGRectMake(ScreenWidth-(128*Adapted(0.35))-50, 50, 160*Adapted(0.35), 128*Adapted(0.35));
self.localVideo.frame = CGRectMake(ScreenWidth-(128*Adapted(0.35))-50, 104, 160*Adapted(0.35), 128*Adapted(0.35));
else
self.localVideo.frame = CGRectMake(ScreenWidth*(1-0.25)-25, 50, ScreenWidth * 0.25, ScreenHeight*0.25);
self.localVideo.frame = CGRectMake(ScreenWidth*(1-0.25)-25, 104, ScreenWidth * 0.25, ScreenHeight*0.25);
self.localVideo.backgroundColor = UIColor.blackColor;
AgoraRtcVideoCanvas *videoCanvas = [[AgoraRtcVideoCanvas alloc] init];
videoCanvas.uid = self.uid.integerValue;
videoCanvas.uid = self.uid;
videoCanvas.view = self.localVideo;
//videoCanvas.renderMode = AgoraVideoRenderModeFit;
videoCanvas.mirrorMode = AgoraVideoMirrorModeAuto;
videoCanvas.renderMode = AgoraVideoRenderModeFit;
[self.agoraKit setupLocalVideo:videoCanvas];
[self.agoraKit startPreview];
[self.agoraKit setDefaultAudioRouteToSpeakerphone:YES];
//MARK: 设置录音的音量是原本的4
int adjust = [self.agoraKit adjustRecordingSignalVolume:400];
NSLog(@"调节录音音量=%d",adjust);
[self.agoraKit adjustRecordingSignalVolume:400];
self.localVideo.hidden = YES;
//添加拖动手势
@ -273,20 +433,19 @@ @@ -273,20 +433,19 @@
*/
- (void)joinChannel
{
//if(self.channelID && self.uid )
if(self.channelID && self.uid )
{
WeakSelf
AgoraRtcChannelMediaOptions *option = [[AgoraRtcChannelMediaOptions alloc] init];
AgoraRtcChannelMediaOptions *option = [AgoraRtcChannelMediaOptions new];
[option setPublishCameraTrack:YES];
[option setClientRoleType:AgoraClientRoleBroadcaster];
int res = [self.agoraKit joinChannelByToken:self.token channelId:self.channelID uid:self.uid.integerValue mediaOptions:option joinSuccess:^(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed) {
xLog(@"加入通道成功");
int res = [self.agoraKit joinChannelByToken:self.token channelId:self.channelID uid:self.uid mediaOptions:option joinSuccess:^(NSString * _Nonnull channel, NSUInteger uid, NSInteger elapsed) {
xLog(@"加入通道");
//启动定时器
[weakSelf _startTimeTimer];
weakSelf.isCall = YES;
[weakSelf stopRing];
weakSelf.localVideo.hidden = NO;
self.agoraKit.delegate = self;
}];
xLog(@"加入通道res == %d" , res);
@ -294,34 +453,25 @@ @@ -294,34 +453,25 @@
[self.agoraKit setEnableSpeakerphone:YES];
//启用不自动锁屏
[UIApplication sharedApplication].idleTimerDisabled = YES;
};
}
}
/**
MARK: APP 接听按钮
*/
- (IBAction)acceptBtnAction:(id)sender {
// AudioServicesRemoveSystemSoundCompletion(kSystemSoundID_Vibrate);
// [self stopAlertSoundWithSoundID:sound];
// self.isCall = YES;
- (void)acceptBtnAction:(id)sender {
self.isCall = YES;
[self joinChannel];
// [self stopRing];
// self.localVideo.hidden = NO;
}
-(void)stopAlertSoundWithSoundID:(SystemSoundID)sound {
AudioServicesDisposeSystemSoundID(kSystemSoundID_Vibrate);
[self stopRing];
}
/**
MARK: APP 主动挂断按钮 (接通后APP的挂断)
*/
- (IBAction)activeHangUpBtnAction:(id)sender {
- (void)activeHangUpBtnAction:(id)sender
{
[self stopRing];
[self leaveChannel];
if(!hangUping)
@ -345,11 +495,10 @@ @@ -345,11 +495,10 @@
return;
}
//MARK: 收到设备主动挂断 后的 推送的 动作
//[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@ 拒绝了你的通话请求",cUser.cDevice.name]];
[SVProgressHUD showInfoWithStatus:@"视频通话结束"];
[SVProgressHUD dismissWithDelay:1 completion:^{
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@ 拒绝了你的通话请求",cUser.cDevice.name]];
AfterDispatch(1, ^{
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}];
});
}
}
@ -360,7 +509,7 @@ @@ -360,7 +509,7 @@
MARK: APP 被动挂断按钮 (接通前APP的挂断)
*/
- (IBAction)hangUpButton:(UIButton *)sender {
- (void)hangUpButton:(UIButton *)sender {
[self stopRing];
[self leaveChannel];
if(!hangUping){
@ -430,12 +579,6 @@ @@ -430,12 +579,6 @@
}];
}
//MARK: 静音
- (IBAction)didClickMuteButton:(UIButton *)sender {
sender.selected = !sender.selected;
[self.agoraKit muteLocalAudioStream:sender.selected];
}
/**
用户在 视频通话 和 语音通话间切换 (暂时不用)
*/
@ -446,15 +589,6 @@ @@ -446,15 +589,6 @@
}
//MARK: 切换摄像头
- (IBAction)didClickSwitchCameraButton:(UIButton *)sender {
sender.selected = !sender.selected;
[self.agoraKit switchCamera];
}
#pragma mark AgoraRtcEngineDelegate
/// 发生错误回调
- (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine didOccurError:(AgoraErrorCode)errorCode{
@ -523,7 +657,7 @@ @@ -523,7 +657,7 @@
//MARK: 频道的统计数据 回调 每两秒触发一次。
-(void)rtcEngine:(AgoraRtcEngineKit *)engine reportRtcStats:(AgoraChannelStats *)stats
{
//NSLog(@"//MARK: 频道的统计数据 回调 每两秒触发一次。");
NSLog(@"//MARK: 频道的统计数据 回调 每两秒触发一次。");
if(self.isCall)
{
// self.timeLength = (int)stats.duration - wait_duration;
@ -555,13 +689,12 @@ @@ -555,13 +689,12 @@
{
return;
}
if(uid == self.device_uid.integerValue)
if(uid == self.device_uid)
{
[self leaveChannel];
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@已挂断",cUser.cDevice.name]];
[SVProgressHUD dismissWithDelay:1];
}
if(uid == self.uid.integerValue){
if(uid == self.uid){
xLog(@"自己离开通道");
}
}
@ -580,10 +713,10 @@ @@ -580,10 +713,10 @@
wait_duration = self.wait_time;
[self leaveChannel];
WEAKSELF
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@ 未接听",cUser.cDevice.name]];
[SVProgressHUD dismissWithDelay:1 completion:^{
[SVProgressHUD showInfoWithStatus:[NSString stringWithFormat:@"%@ 未接听",self.device.name]];
AfterDispatch(1, ^{
[weakSelf dismissViewControllerAnimated:YES completion:nil];
}];
});
[self _stopTimeTimer];
return;
}
@ -685,14 +818,11 @@ @@ -685,14 +818,11 @@
if(!self.isReceiveCall)
{
//主动拨打
//显示静音 和 切换摄像头
self.switchCameraView.hidden = NO;
self.muteBtnView.hidden = NO;
//隐藏 被动接听 和 被动挂断
self.activeHangupView.hidden = NO;
self.acceptView.hidden = YES;
self.hangupView.hidden = YES;
self.hangUpBtn.hidden = NO;
self.headImageView.hidden = NO;
self.nameLabel.hidden = NO;
self.statusLabel.hidden = NO;
self.statusLabel.text = @"正在呼叫中...";
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf playRing:@"ring"];
});
@ -701,38 +831,21 @@ @@ -701,38 +831,21 @@
else
{
//被动接听
//隐藏 静音 和 切换摄像头
self.switchCameraView.hidden = YES;
self.muteBtnView.hidden = YES;
self.activeHangupView.hidden = YES;
self.acceptView.hidden = NO;
self.hangupView.hidden = NO;
// if([UIApplication sharedApplication].applicationState == UIApplicationStateActive)
{
self.headImageView.hidden = NO;
self.nameLabel.hidden = NO;
self.statusLabel.hidden = NO;
self.statusLabel.text = @"连接中";
self.lefthangUpBtn.hidden = NO;
self.answerBtn.hidden = NO;
if([UIApplication sharedApplication].applicationState == UIApplicationStateActive){
dispatch_async(dispatch_get_main_queue(), ^{
// AudioServicesAddSystemSoundCompletion(kSystemSoundID_Vibrate, NULL, NULL, soundCompleteCallback, NULL);
// AudioServicesPlaySystemSound(kSystemSoundID_Vibrate);
// AudioServicesPlaySystemSound(self->sound);
[weakSelf playRing:@"tones"];
});
}
}
}
void soundCompleteCallback(SystemSoundID sound,void * clientData) {
AudioServicesPlaySystemSound(kSystemSoundID_Vibrate); //震动
AudioServicesPlaySystemSound(sound);
}
extern OSStatus
AudioServicesAddSystemSoundCompletion( SystemSoundID inSystemSoundID,
CFRunLoopRef inRunLoop,
CFStringRef inRunLoopMode,
AudioServicesSystemSoundCompletionProc inCompletionRoutine,
void* inClientData)
__OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0);
- (void)setIsCall:(BOOL)isCall
{
@ -742,16 +855,19 @@ __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); @@ -742,16 +855,19 @@ __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0);
//隐藏 设备 头像 和 昵称 显示 (默认是显示的)
self.headImageView.hidden = YES;
self.nameLabel.hidden = YES;
self.localVideo.hidden = NO; // 显示自己
self.lefthangUpBtn.hidden = YES; /// 挂断按钮(被动呼叫等待接听)
self.answerBtn.hidden = YES; /// 接听按钮
self.statusLabel.hidden = YES;
self.activeHangupView.hidden = NO;
self.acceptView.hidden = YES;
self.hangupView.hidden = YES;
//显示 时间Label
self.localVideo.hidden = NO; // 显示自己
self.timeLabel.hidden = NO;
//显示
self.switchCameraView.hidden = NO;
self.muteBtnView.hidden = NO;
//self.switchCameraBtn.hidden = NO;/// 切换摄像头
self.microphoneBtn.hidden = NO; /// 麦克风
self.muteBtn.hidden = NO; /// 静音按钮
self.onSwitchCameraBtn.hidden = NO; /// 切换摄像头
self.hangUpBtn.hidden = NO; /// 接通后挂断按钮
self.tonghuaLabel.hidden = NO;
self.tonghuaLabel.text = [NSString stringWithFormat:@"与%@的对话",self.device.name];
}
}
@ -796,6 +912,15 @@ __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0); @@ -796,6 +912,15 @@ __OSX_AVAILABLE_STARTING(__MAC_10_5,__IPHONE_2_0);
}
- (void)setBtnImageAndTitle:(UIButton *)button
{
CGFloat offset = 20.0f;
button.titleEdgeInsets = UIEdgeInsetsMake(0,-button.imageView.frame.size.width,-button.imageView.frame.size.height-offset/2,0);
// button.imageEdgeInsets = UIEdgeInsetsMake(-button.titleLabel.frame.size.height-offset/2,0,0,-button.titleLabel.frame.size.width);
// 由于iOS8中titleLabel的size为0,用上面这样设置有问题,修改一下即可
button.imageEdgeInsets = UIEdgeInsetsMake(-button.titleLabel.intrinsicContentSize.height-offset/2,0,0,-button.titleLabel.intrinsicContentSize.width);
}
-(void)dealloc
{

Loading…
Cancel
Save