V4.9.9测试版第一次提交 构建版本9.9.1

This commit is contained in:
wbzhan
2019-07-12 14:09:23 +08:00
parent 8693efe121
commit 33254ad734
54 changed files with 1019 additions and 3719 deletions
Vendored
BIN
View File
Binary file not shown.
+12 -68
View File
@@ -561,9 +561,6 @@
881869301D6EECDA00CE9DFF /* shopNoCumtomerViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8818692E1D6EECDA00CE9DFF /* shopNoCumtomerViewCell.m */; };
881869311D6EECDA00CE9DFF /* shopNoCumtomerViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8818692F1D6EECDA00CE9DFF /* shopNoCumtomerViewCell.xib */; };
881869341D6FDD3B00CE9DFF /* ShopKanHuP2PViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 881869331D6FDD3B00CE9DFF /* ShopKanHuP2PViewController.m */; };
881A1D051DD2B9F200BA1AF4 /* WoDeKanKanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D041DD2B9F200BA1AF4 /* WoDeKanKanViewController.m */; };
881A1D091DD2BDE400BA1AF4 /* WoDeKanKanViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D071DD2BDE400BA1AF4 /* WoDeKanKanViewCell.m */; };
881A1D0A1DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D081DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib */; };
881A1D201DD2C31500BA1AF4 /* kankaneditor_icon_photo.png in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D0B1DD2C31500BA1AF4 /* kankaneditor_icon_photo.png */; };
881A1D211DD2C31500BA1AF4 /* kankaneditor_icon_photo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D0C1DD2C31500BA1AF4 /* kankaneditor_icon_photo@2x.png */; };
881A1D221DD2C31500BA1AF4 /* kankaneditor_icon_photo@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D0D1DD2C31500BA1AF4 /* kankaneditor_icon_photo@3x.png */; };
@@ -600,8 +597,6 @@
881A1D5A1DD41C0700BA1AF4 /* MineKanEditSec2SecCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D581DD41C0700BA1AF4 /* MineKanEditSec2SecCell.xib */; };
881A1D5E1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D5C1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.m */; };
881A1D5F1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D5D1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.xib */; };
881A1D661DD561DD00BA1AF4 /* IfishP2PVideoPlayView.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D651DD561DD00BA1AF4 /* IfishP2PVideoPlayView.m */; };
881A1D6A1DD566D800BA1AF4 /* IfishP2PVideoPlayView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 881A1D691DD566D800BA1AF4 /* IfishP2PVideoPlayView.xib */; };
881A1D6D1DD571C100BA1AF4 /* IfishP2PLivePlayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D6C1DD571C100BA1AF4 /* IfishP2PLivePlayViewController.m */; };
881A1D701DD5C46A00BA1AF4 /* KanKanListTableCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 881A1D6F1DD5C46A00BA1AF4 /* KanKanListTableCell.m */; };
881B123A1E1CCA65004C074B /* RuSunHaveHeateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 881B12391E1CCA65004C074B /* RuSunHaveHeateViewController.m */; };
@@ -1058,7 +1053,6 @@
882C85B21EB03994001CC414 /* particulars_teb_ten@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 882C85AF1EB03994001CC414 /* particulars_teb_ten@2x.png */; };
882C85B31EB03994001CC414 /* particulars_teb_ten@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 882C85B01EB03994001CC414 /* particulars_teb_ten@3x.png */; };
882C85B61EB08295001CC414 /* DiscountCoupon.m in Sources */ = {isa = PBXBuildFile; fileRef = 882C85B51EB08295001CC414 /* DiscountCoupon.m */; };
882DF00E1EA70EF2009FF5D0 /* libemTMF_Ofical_jw160727.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 882DF00C1EA70EF2009FF5D0 /* libemTMF_Ofical_jw160727.a */; };
883283361EAEE60500A47157 /* home_nav_news.png in Resources */ = {isa = PBXBuildFile; fileRef = 8832831B1EAEE60500A47157 /* home_nav_news.png */; };
883283371EAEE60500A47157 /* home_nav_news@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8832831C1EAEE60500A47157 /* home_nav_news@2x.png */; };
883283381EAEE60500A47157 /* home_nav_news@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8832831D1EAEE60500A47157 /* home_nav_news@3x.png */; };
@@ -2377,9 +2371,9 @@
CB484E4822B8CF9B0075F050 /* AlipaySDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3422B8CF9A0075F050 /* AlipaySDK.framework */; };
CB484E4922B8CF9B0075F050 /* SGSecurityBody.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3522B8CF9A0075F050 /* SGSecurityBody.framework */; };
CB484E4A22B8CF9B0075F050 /* OpenMtopExt.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E3622B8CF9A0075F050 /* OpenMtopExt.framework */; };
CB484E4D22B8D29C0075F050 /* GWP2P.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E4B22B8D2990075F050 /* GWP2P.framework */; };
CB484E4E22B8D29C0075F050 /* SDK使用说明 in Resources */ = {isa = PBXBuildFile; fileRef = CB484E4C22B8D29C0075F050 /* SDK使用说明 */; };
CB484E4F22B8D2C40075F050 /* GWP2P.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CB484E4B22B8D2990075F050 /* GWP2P.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CB52699F22D491D300990E86 /* GWP2P.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CB52699D22D491D200990E86 /* GWP2P.framework */; };
CB5269A022D491D300990E86 /* SDK使用说明 in Resources */ = {isa = PBXBuildFile; fileRef = CB52699E22D491D300990E86 /* SDK使用说明 */; };
CB5269A122D4A1B500990E86 /* GWP2P.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = CB52699D22D491D200990E86 /* GWP2P.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
CB7D6AA022953BEB0014E5C7 /* YYDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CB7D6A9822953BEB0014E5C7 /* YYDiskCache.m */; };
CB7D6AA122953BEB0014E5C7 /* YYKVStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = CB7D6A9922953BEB0014E5C7 /* YYKVStorage.h */; };
CB7D6AA222953BEB0014E5C7 /* YYCache.m in Sources */ = {isa = PBXBuildFile; fileRef = CB7D6A9A22953BEB0014E5C7 /* YYCache.m */; };
@@ -2543,7 +2537,7 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
CB484E4F22B8D2C40075F050 /* GWP2P.framework in Embed Frameworks */,
CB5269A122D4A1B500990E86 /* GWP2P.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -3371,11 +3365,6 @@
8818692F1D6EECDA00CE9DFF /* shopNoCumtomerViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = shopNoCumtomerViewCell.xib; sourceTree = "<group>"; };
881869321D6FDD3B00CE9DFF /* ShopKanHuP2PViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShopKanHuP2PViewController.h; sourceTree = "<group>"; };
881869331D6FDD3B00CE9DFF /* ShopKanHuP2PViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShopKanHuP2PViewController.m; sourceTree = "<group>"; };
881A1D031DD2B9F200BA1AF4 /* WoDeKanKanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WoDeKanKanViewController.h; sourceTree = "<group>"; };
881A1D041DD2B9F200BA1AF4 /* WoDeKanKanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WoDeKanKanViewController.m; sourceTree = "<group>"; };
881A1D061DD2BDE400BA1AF4 /* WoDeKanKanViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WoDeKanKanViewCell.h; sourceTree = "<group>"; };
881A1D071DD2BDE400BA1AF4 /* WoDeKanKanViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WoDeKanKanViewCell.m; sourceTree = "<group>"; };
881A1D081DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WoDeKanKanViewCell.xib; sourceTree = "<group>"; };
881A1D0B1DD2C31500BA1AF4 /* kankaneditor_icon_photo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = kankaneditor_icon_photo.png; sourceTree = "<group>"; };
881A1D0C1DD2C31500BA1AF4 /* kankaneditor_icon_photo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "kankaneditor_icon_photo@2x.png"; sourceTree = "<group>"; };
881A1D0D1DD2C31500BA1AF4 /* kankaneditor_icon_photo@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "kankaneditor_icon_photo@3x.png"; sourceTree = "<group>"; };
@@ -3420,9 +3409,6 @@
881A1D5B1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MineKanEditSec2ThredCell.h; sourceTree = "<group>"; };
881A1D5C1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MineKanEditSec2ThredCell.m; sourceTree = "<group>"; };
881A1D5D1DD41C2200BA1AF4 /* MineKanEditSec2ThredCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MineKanEditSec2ThredCell.xib; sourceTree = "<group>"; };
881A1D641DD561DD00BA1AF4 /* IfishP2PVideoPlayView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IfishP2PVideoPlayView.h; sourceTree = "<group>"; };
881A1D651DD561DD00BA1AF4 /* IfishP2PVideoPlayView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IfishP2PVideoPlayView.m; sourceTree = "<group>"; };
881A1D691DD566D800BA1AF4 /* IfishP2PVideoPlayView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = IfishP2PVideoPlayView.xib; sourceTree = "<group>"; };
881A1D6B1DD571C100BA1AF4 /* IfishP2PLivePlayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IfishP2PLivePlayViewController.h; sourceTree = "<group>"; };
881A1D6C1DD571C100BA1AF4 /* IfishP2PLivePlayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IfishP2PLivePlayViewController.m; sourceTree = "<group>"; };
881A1D6E1DD5C46A00BA1AF4 /* KanKanListTableCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KanKanListTableCell.h; sourceTree = "<group>"; };
@@ -3899,8 +3885,6 @@
882C85B01EB03994001CC414 /* particulars_teb_ten@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "particulars_teb_ten@3x.png"; sourceTree = "<group>"; };
882C85B41EB08295001CC414 /* DiscountCoupon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DiscountCoupon.h; sourceTree = "<group>"; };
882C85B51EB08295001CC414 /* DiscountCoupon.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DiscountCoupon.m; sourceTree = "<group>"; };
882DF00C1EA70EF2009FF5D0 /* libemTMF_Ofical_jw160727.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libemTMF_Ofical_jw160727.a; sourceTree = "<group>"; };
882DF00D1EA70EF2009FF5D0 /* LSemTMFSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LSemTMFSet.h; sourceTree = "<group>"; };
8832831B1EAEE60500A47157 /* home_nav_news.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = home_nav_news.png; sourceTree = "<group>"; };
8832831C1EAEE60500A47157 /* home_nav_news@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "home_nav_news@2x.png"; sourceTree = "<group>"; };
8832831D1EAEE60500A47157 /* home_nav_news@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "home_nav_news@3x.png"; sourceTree = "<group>"; };
@@ -5784,8 +5768,8 @@
CB484E3422B8CF9A0075F050 /* AlipaySDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AlipaySDK.framework; sourceTree = "<group>"; };
CB484E3522B8CF9A0075F050 /* SGSecurityBody.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = SGSecurityBody.framework; sourceTree = "<group>"; };
CB484E3622B8CF9A0075F050 /* OpenMtopExt.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = OpenMtopExt.framework; sourceTree = "<group>"; };
CB484E4B22B8D2990075F050 /* GWP2P.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GWP2P.framework; sourceTree = "<group>"; };
CB484E4C22B8D29C0075F050 /* SDK使用说明 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "SDK使用说明"; sourceTree = "<group>"; };
CB52699D22D491D200990E86 /* GWP2P.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GWP2P.framework; sourceTree = "<group>"; };
CB52699E22D491D300990E86 /* SDK使用说明 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "SDK使用说明"; sourceTree = "<group>"; };
CB7D6A9822953BEB0014E5C7 /* YYDiskCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYDiskCache.m; sourceTree = "<group>"; };
CB7D6A9922953BEB0014E5C7 /* YYKVStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YYKVStorage.h; sourceTree = "<group>"; };
CB7D6A9A22953BEB0014E5C7 /* YYCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YYCache.m; sourceTree = "<group>"; };
@@ -5988,6 +5972,7 @@
88C686481EA61217004CDFD9 /* CoreGraphics.framework in Frameworks */,
88C686461EA611F7004CDFD9 /* ImageIO.framework in Frameworks */,
88C686441EA611DC004CDFD9 /* libc++abi.tbd in Frameworks */,
CB52699F22D491D300990E86 /* GWP2P.framework in Frameworks */,
3D1C50B3221A9EDF0096AE43 /* YTheNaviBar.a in Frameworks */,
88C6863C1EA6116C004CDFD9 /* libxml2.tbd in Frameworks */,
88C6863A1EA61149004CDFD9 /* MapKit.framework in Frameworks */,
@@ -6033,8 +6018,6 @@
CB484E1C22B8C8C90075F050 /* libRTSP.a in Frameworks */,
883E7BCD1EA5FA1A00ED5D89 /* MOBFoundationEx.framework in Frameworks */,
88C686111EA60A40004CDFD9 /* libTalkingData.a in Frameworks */,
882DF00E1EA70EF2009FF5D0 /* libemTMF_Ofical_jw160727.a in Frameworks */,
CB484E4D22B8D29C0075F050 /* GWP2P.framework in Frameworks */,
881671BD1EA5DE2B00BEBF23 /* UMCommunitySDK.framework in Frameworks */,
881671BC1EA5DE2B00BEBF23 /* UMComFoundation.framework in Frameworks */,
CB484E4922B8CF9B0075F050 /* SGSecurityBody.framework in Frameworks */,
@@ -7751,16 +7734,6 @@
path = User;
sourceTree = "<group>";
};
881A1D601DD557A900BA1AF4 /* IfishP2PPlayView */ = {
isa = PBXGroup;
children = (
881A1D641DD561DD00BA1AF4 /* IfishP2PVideoPlayView.h */,
881A1D651DD561DD00BA1AF4 /* IfishP2PVideoPlayView.m */,
881A1D691DD566D800BA1AF4 /* IfishP2PVideoPlayView.xib */,
);
path = IfishP2PPlayView;
sourceTree = "<group>";
};
881B12411E1CCC5E004C074B /* JuNeng */ = {
isa = PBXGroup;
children = (
@@ -8869,15 +8842,6 @@
path = ViewControlller;
sourceTree = "<group>";
};
882DF00B1EA70EF2009FF5D0 /* LSemTMFSet */ = {
isa = PBXGroup;
children = (
882DF00C1EA70EF2009FF5D0 /* libemTMF_Ofical_jw160727.a */,
882DF00D1EA70EF2009FF5D0 /* LSemTMFSet.h */,
);
path = LSemTMFSet;
sourceTree = "<group>";
};
883283571EAF211900A47157 /* GoldCoast */ = {
isa = PBXGroup;
children = (
@@ -10118,14 +10082,6 @@
path = SMS_SDK;
sourceTree = "<group>";
};
884BF4B61D77E0CA00C8518A /* BaiLingSoundSdk */ = {
isa = PBXGroup;
children = (
882DF00B1EA70EF2009FF5D0 /* LSemTMFSet */,
);
path = BaiLingSoundSdk;
sourceTree = "<group>";
};
885692AE1E8240EA00C51617 /* IfishBannerModel */ = {
isa = PBXGroup;
children = (
@@ -11608,7 +11564,6 @@
isa = PBXGroup;
children = (
885C43981E89F79D00685A2E /* IfishNewLiveList */,
881A1D601DD557A900BA1AF4 /* IfishP2PPlayView */,
88C1B2D81DD2B77600C2C99A /* MineKankan */,
88C1B2341DD15FCF00C2C99A /* IfishLivelist */,
);
@@ -11654,11 +11609,6 @@
88C1B2D81DD2B77600C2C99A /* MineKankan */ = {
isa = PBXGroup;
children = (
881A1D031DD2B9F200BA1AF4 /* WoDeKanKanViewController.h */,
881A1D041DD2B9F200BA1AF4 /* WoDeKanKanViewController.m */,
881A1D061DD2BDE400BA1AF4 /* WoDeKanKanViewCell.h */,
881A1D071DD2BDE400BA1AF4 /* WoDeKanKanViewCell.m */,
881A1D081DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib */,
881A1D351DD3025400BA1AF4 /* MineKankanEditViewController.h */,
881A1D361DD3025400BA1AF4 /* MineKankanEditViewController.m */,
881A1D3D1DD4057100BA1AF4 /* MineKanEditSec0ViewCell.h */,
@@ -11895,7 +11845,6 @@
88C6860D1EA60A40004CDFD9 /* TalkingDataV2.2.88 */,
88C685C81EA603A8004CDFD9 /* UMSocial */,
883E7BC81EA5FA1A00ED5D89 /* SMS_SDK */,
884BF4B61D77E0CA00C8518A /* BaiLingSoundSdk */,
88F5ECBD1D48CA2800CC7CAF /* ESPTouch */,
88F5ECE51D48CA2800CC7CAF /* UMCommunity */,
);
@@ -12197,8 +12146,8 @@
CB484CE822B76DEC0075F050 /* GWP2PSDK */ = {
isa = PBXGroup;
children = (
CB484E4B22B8D2990075F050 /* GWP2P.framework */,
CB484E4C22B8D29C0075F050 /* SDK使用说明 */,
CB52699D22D491D200990E86 /* GWP2P.framework */,
CB52699E22D491D300990E86 /* SDK使用说明 */,
);
path = GWP2PSDK;
sourceTree = "<group>";
@@ -13407,7 +13356,7 @@
882956091DBDA3A100E9DDD7 /* neves0012.png in Resources */,
882956B81DBDA3A200E9DDD7 /* scan_left@3x.png in Resources */,
882958171DC04ED200E9DDD7 /* equipment_longpoint.png in Resources */,
CB484E4E22B8D29C0075F050 /* SDK使用说明 in Resources */,
CB5269A022D491D300990E86 /* SDK使用说明 in Resources */,
882957431DBDA3A300E9DDD7 /* swimmingfish0050.png in Resources */,
88D3372C1DC71EB5006C0ADB /* linkingdevice_line@2x.png in Resources */,
882956E21DBDA3A300E9DDD7 /* bg2.png in Resources */,
@@ -13942,7 +13891,6 @@
88696FF71E9CBC2E005D4AFB /* home_iocn_hotsell@2x.png in Resources */,
FA08930A2275DD780084A609 /* shajun_big@2x.png in Resources */,
882957021DBDA3A300E9DDD7 /* PFkilLlight_off.png in Resources */,
881A1D0A1DD2BDE400BA1AF4 /* WoDeKanKanViewCell.xib in Resources */,
886512061E97966400BABDF1 /* task_shareIfishApp@3x.png in Resources */,
8829569E1DBDA3A200E9DDD7 /* YesbtnBc.png in Resources */,
8871FB1F1EBC822B0038E99A /* select_camera@2x.png in Resources */,
@@ -14219,7 +14167,6 @@
885FBE1E1E4D66C100E0D7D1 /* merchant_iocn_a_member@3x.png in Resources */,
8849EFBE1EB883840096CAD7 /* enter_padlock@3x.png in Resources */,
8829573D1DBDA3A300E9DDD7 /* swimmingfish0044.png in Resources */,
881A1D6A1DD566D800BA1AF4 /* IfishP2PVideoPlayView.xib in Resources */,
88597A211E554CCB003D0E5C /* tab_device_message.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -14647,7 +14594,6 @@
3D1C17482171BB0700A159A8 /* PNRadarChartDataItem.m in Sources */,
8871C44B1E6D2A93000AA49F /* QianDaoGongLueViewCell.m in Sources */,
8871FAA41EBC0CE30038E99A /* ShopCerProgressHeaderView.m in Sources */,
881A1D661DD561DD00BA1AF4 /* IfishP2PVideoPlayView.m in Sources */,
88602DBC1E10D97E00F3DB5D /* UIImage+WebP.m in Sources */,
88F5EFD81D48D08100CC7CAF /* MMVectorImage.m in Sources */,
883E79B81D48B0280030E075 /* remindCyclePic.m in Sources */,
@@ -14889,7 +14835,6 @@
3D1C50ED221A9EE00096AE43 /* RecommendInfoDAO.m in Sources */,
88C5989D1EA0965B00BDC812 /* LBLaunchImageAdView.m in Sources */,
E58C9984208195640004C42B /* RuiMeiViewController.m in Sources */,
881A1D051DD2B9F200BA1AF4 /* WoDeKanKanViewController.m in Sources */,
881671CD1EA5DE2B00BEBF23 /* UMComLocationTableViewCell.m in Sources */,
88742C331D63F9E80074F1F8 /* CertifyListSecondCell.m in Sources */,
3D8F64F5215797E700F04BD3 /* IQKeyboardManager.m in Sources */,
@@ -14907,7 +14852,6 @@
886D94F81D6C3F3A00CF0B63 /* MineKanHuNormalViewCell.m in Sources */,
88F5EFD01D48D08100CC7CAF /* MMLinearProgressView.m in Sources */,
88F5EFAF1D48D08100CC7CAF /* AFURLRequestSerialization.m in Sources */,
881A1D091DD2BDE400BA1AF4 /* WoDeKanKanViewCell.m in Sources */,
880707AA1DE2D53E0076F65A /* UITextView+AddKeybordDoneVIew.m in Sources */,
88F5EFC81D48D08100CC7CAF /* JHRefreshConfig.m in Sources */,
880707F61DE302630076F65A /* LXColorTools.m in Sources */,
@@ -15461,7 +15405,7 @@
"-ObjC",
"-Istdc++",
"-force_load",
"\"$(SRCROOT)/ifish/GWP2PSDK/GWP2P.framework/GWP2P\"",
"\"$(PROJECT_DIR)/Ifish/GWP2PSDK/GWP2P.framework/GWP2P\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -15575,7 +15519,7 @@
"-ObjC",
"-Istdc++",
"-force_load",
"\"$(SRCROOT)/ifish/GWP2PSDK/GWP2P.framework/GWP2P\"",
"\"$(PROJECT_DIR)/Ifish/GWP2PSDK/GWP2P.framework/GWP2P\"",
);
PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8;
PRODUCT_NAME = "$(TARGET_NAME)";
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
@@ -1,93 +0,0 @@
// Created by TTS on 15/10/9.
// Copyright © 2016年 Gwell. All rights reserved.
#import <Foundation/Foundation.h>
static int INITSDK_ERRCOE_ENABLE =0x01;//能正常使用SDK
static int INITSDK_ERRCOE_OVERLOAD=0xA0;//认证设备数量超限
static int INITSDK_ERRCOE_UNENABLE=0xA1;//授权验证不通过
static int INITSDK_INVAILDDATA=-3;//初始化传入了非法的参数
static int INITSDK_ERRCOE_WIFIDISABLE=-2;//WIFI不可用
static int INITSDK_ERRCOE_NOINIT=-1;//没有初始化SDK
static int HTTP_CODE_ERRTOTALDEVICE=50008; //认证设备数量超限
static int INITSDK_OVERDUE=50009; //超过使用期限
static int INITSDK_LICENSE_FORBIDDEN=50006; //禁止license
/* 配置结果的数据类型 */
typedef NS_ENUM(NSInteger,EMTMFErrcodeType){
EMTMFErrcodeType_SUCESS = 0x01,//配置成功
EMTMFErrcodeType_FAILED = 0x02//配置失败
} ;
@protocol LSemTMFSetDelegate <NSObject>
@optional
/**
* 功能:获取配置是否成功的错误码
*/
- (void)didSetWifiResultErrcode:(nullable EMTMFErrcodeType*)errcode content:(nullable NSString*)content;
/**
* 功能:emTMF发送完成后会调用该函数
*/
- (void)didFSKSendingComplete;
/**
*功能:SDK不能正常使用的错误吗和原因
*/
-(void)didSDKErrcode:(int) errCode errMsg:(nullable NSString*)errMsg;
@end
@interface LSemTMFSet : NSObject
@property (nonatomic, retain, nonnull) id<LSemTMFSetDelegate> delegate;
/** 获取单例 */
+ (nullable instancetype)sharedInstance;
/**
将SSID和密码以声波的方式发送出去
@param ssid WI-FI网络名
@param password Wi-Fi网络的密码
@note ssid长度不可为0password的长度可以为0
*/
- (void)sendWiFiSet:(nonnull NSString *)SSID password:(nonnull NSString *)psw;
/**
得到播放的时长
@param ssid WI-FI网络名
@param password Wi-Fi网络的密码
@note ssid长度不可为0password的长度可以为0
*/
-(int)getPlayTime:(nonnull NSString *)SSID password:(nonnull NSString *)psw;
/**
得到当前初始化SDK的错误码
*/
-(int)getCurInitSDKCode;
/**
停止发送FSK声波
*/
- (void)stopSend;
/**
在听到设备发出“接收成功”的提示后调用此方法,对设备进行连接超时限制
*/
-(void)startConnectTimeOutListener:(long)waittime;
/**
取消掉联网失败的计时器
*/
-(void)cancleConnectTimer;
/**
退出EMTMF配置做的操作
*/
-(void)exitEMTMFSDK;
/**
初始化SDK
manufactrurer 产品信息
client 客户信息
productModel 产品型号
license License信息
*/
-(int)initSDK:(nonnull NSString*)manufactrurer client:(nonnull NSString*)client productModel:(nonnull NSString*)productModel license:(nonnull NSString*)license;
@end
Binary file not shown.
@@ -21,7 +21,7 @@
@param errorString 描述具体的错误原因
@param json 具体的返回数据
*/
typedef void(^GWNetCompletionBlock)(BOOL success, NSString *errorCode, NSString *errorString, NSDictionary *json);
typedef void(^GWNetCompletionBlock)(BOOL success, NSString *errorCode, NSString *errorString, NSDictionary<NSString*,id> *json);
//调接口时会话ID错误发出的通知,会话ID超时/错误时所有接口无法调用,应该让用户重新登录获取新的Session。每个接口处理过于麻烦,所以增加通知。
extern NSString * const kGWNetSessionIdErrorNotification;
@@ -154,7 +154,6 @@ extern NSString * const kGWNetSessionIdErrorNotification;
withUserId:(NSString *)userId
sessionId:(NSString *)sessionId
completion:(GWNetCompletionBlock)completion;
#pragma mark 退出登录
/**
退出登录
@@ -40,7 +40,7 @@
#define GWNET_RET_PHONE_FORMAT_ERROR @"10901022" //手机号数据格式不符合要求
#define GWNET_RET_LACK_PARAMETER_ERROR @"10901020" //缺少输入参数
#define GWNET_RET_GET_EMAIL_CODE_TOO_OFTEN @"10902027" //获取邮件太频繁
#define GWNET_RET_GET_EMAIL_CODE_COUNT_LIMIT @"10902028" //获取邮件已到达30分钟内的上限
#define GWNET_RET_GET_EMAIL_CODE_COUNT_LIMIT @"10902028" //邮件验证码超时
#define GWNET_RET_EMAIL_CODE_ERROR @"10902029" //邮件验证码不正确
#define GWNET_RET_EMAIL_CODE_TIMEOUT @"10902030" //邮件验证码超时
@@ -24,6 +24,7 @@
#import "GWP2PClient+GarageLight.h"
#import "GWP2PClient+HXVision.h"
#import "GWP2PDefine.h"
#import "GWP2PClient+P2PInfo.h"
//监控、视频通话、回放
@@ -58,5 +58,10 @@
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceWifiPassword:(NSString *)wifiPassword inAPModeWithCompletionBlock:(CompletionBlock)completionBlock;
/**
设置设备列表将设备版本号传给sdk
@param deviceAry 设备数组[@{@"deviceID":.@"p2p version of device",}]
*/
-(void)p2pSetDevieAry:(NSArray *)deviceAry;
@end
@@ -91,6 +91,45 @@ typedef enum GWUnbindAlarmAccountOperationType {
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
/**
设置设备报警声开关状态
获取设备报警声开关状态请调 getMultipledeviceStatusWithDeviceID:password:completionBlock:
@param alarmOn 开关状0关,1开
@param deviceID 设备ID
@param devicePassword 设备密码
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceSpecialAlarmState:(NSUInteger)alarmOn
withDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
/**
设置设备报警白光灯状态
获取设备备报警白光灯状态请调 getMultipledeviceStatusWithDeviceID:password:completionBlock:
@param alarmOn 开关状0关,1开
@param deviceID 设备ID
@param devicePassword 设备密码
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceWhiteAlarmLightState:(NSUInteger)alarmOn
withDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
/**
设置设备红蓝灯开关状态
获取设备红蓝灯开关状态请调 getMultipledeviceStatusWithDeviceID:password:completionBlock:
@param alarmOn 开关状0关,1开
@param deviceID 设备ID
@param devicePassword 设备密码
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceRedBluelAlarmLightState:(NSUInteger)alarmOn
withDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
/**
设置设备人体红外开关状态
@@ -93,7 +93,7 @@ typedef NS_ENUM(NSUInteger, GWDeviceRTSPPasswordMode) {
@"type" (设备主类型): GWDeviceType 类型,(如IPC、NPC...) (设备返回的主类型不准)
@"subtype" (设备子类型): GWDeviceSubtype 类型,(如30只支持86831支持868+情景模式;32支持868+情景模式+分享)
@"device subtype" (设备子类型): GWDeviceSubtype 类型,(如30只支持86831支持868+情景模式;32支持868+情景模式+分享)
@"preset position suppurted" (是否支持预置位): @(BOOL) NO 不支持; YES 支持
@@ -456,6 +456,39 @@ typedef NS_ENUM(NSUInteger, GWDeviceRTSPPasswordMode) {
- (void)getDeviceResolutionAndIpAndMacAddressWithDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
#pragma mark - 获取设备DNS,网关,子网,ip
/**
获取设备获取设备DNS,网关,子网,ip
@param deviceID 设备ID
@param devicePassword 设备密码
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)getDeviceDNSAndIpAndGetWayAndSubNetMaskWithDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
#pragma mark - 设置设备DNS,网关,子网,ip
/**
设置设备DNS,网关,子网,ip
@param deviceID 设备ID
@param devicePassword 设备密码
@param isAuto 0为静态,1为动态,为动态时后面的参数都为无效
@param dNS 设置静态 DNS 值时填255.255.255.255 .动态时填 0
@param IP 设置静态 ip 值时填192.168.1.1。动态时填 0
@param subNetMask 设置静态子网掩码值时填255.255.255.0 动态时填 0
@param getWay 设置静态网关值时填。动态时填255.255.255.255 动态时填 0
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceDNSAndIpAndGetWayAndSubNetMaskWithDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
isAuto:(NSInteger)isAuto
deviceDNS:(NSString*)dNS
deviceIP:(NSString*)IP
deviceSubNetMask:(NSString*)subNetMask
deviceGetWay:(NSString *)getWay
completionBlock:(CompletionBlock)completionBlock;
#pragma mark - 获取用户及设备列表在线状态等信息
/**
@@ -10,6 +10,7 @@
#import <Foundation/Foundation.h>
#import "GWP2PPlayerDefine.h"
#import <UIKit/UIKit.h>
/**
操作预置位方式
*/
@@ -44,5 +45,7 @@ typedef enum GWHXVisonPreseSubcmdType {
devicePassword:(NSString *)devicePassword
point:(CGPoint)point
size:(CGSize)size;
- (void)sendHXCommandTypeandOption:(int)option;
- (void)sendHXCommandTypeandOption:(GWP2PHXVisonDirection)direction;
@end
@@ -0,0 +1,17 @@
//
// GWP2PClient+P2PInfo.h
// GWP2P
//
// Created by yuguihua on 2019/6/10.
// Copyright © 2019 apple. All rights reserved.
//
#import <GWP2P/GWP2P.h>
NS_ASSUME_NONNULL_BEGIN
@interface GWP2PClient (P2PInfo)
-(NSString *)getP2PVersion;
@end
NS_ASSUME_NONNULL_END
@@ -16,7 +16,14 @@ typedef enum GWP2PRecordType{
GWP2PRecordTypeAlarm,/**< 报警时录像 */
GWP2PRecordTypeSchedule,/**< 定时录像 */
}GWP2PRecordType;
/**
云录像质量
*/
typedef enum GWP2PCloudRecordType{
GWP2PRecordTypeQuilty = 0,/**< 质量优先 */
GWP2PRecordTypeSmooth = 1,/**< 流畅优先 */
}GWP2PCloudRecordType;
/**
录像质量
*/
@@ -45,6 +52,9 @@ typedef enum GWP2PRecordDefinition {
@property (nonatomic, strong) NSDate *date;/**< 记录上面的时间 */
@property (nonatomic, assign) NSInteger totalSec;/**< 记录上面的时间 */
@property (nonatomic, assign) NSInteger totalEndSec;/**< 记录上面的时间结束为totalsec + time */
@property (nonatomic, copy) NSString *cType; /**< 文件类型 一个字符 */
@property (nonatomic, assign) NSInteger time; /**< 文件播放时长 若不支持,则为-1 */
@@ -222,5 +232,36 @@ typedef enum GWP2PRecordDefinition {
startDate:(NSDate *)startDate
endDate:(NSDate *)endDate
completionBlock:(CompletionBlock)completionBlock;
#pragma mark - 获取某一天的回放文件
/**
获取设备回放文件
一次只能获取64个文件,如果给定的时间差大于64个文件,会分多次获取,一次返回多次获取文件,为保证每次数据都能正常返回,若无特殊要求,两次给定的时间差尽量小点
completionBlock返回字典:
@"files" 键对应一个 NSMutableArray<GWPlaybackFileModel *> *
@param deviceID 设备ID
@param devicePassword 设备密码
@param dayDate 当天日期,如果传空返回当天日期的回放列表
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)getDeviceOneDayPlaybackFilesOWithDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
dayDate:(NSDate *)dayDate
completionBlock:(CompletionBlock)completionBlock;
/**
设置设备云回放上传的质量
@param recordType 设置类型。质量优先与流畅优先
@param deviceID 设备ID
@param devicePassword 设备密码
@param completionBlock 与设备交互完成后的回调Block
*/
- (void)setDeviceCloudPlayBackQuality:(GWP2PCloudRecordType)recordType
WithDeviceID:(NSString *)deviceID
devicePassword:(NSString *)devicePassword
completionBlock:(CompletionBlock)completionBlock;
@end
@@ -72,6 +72,15 @@ typedef NS_ENUM(uint8_t, GWProtectionSettingState) {
GWProtectionSettingStateOn = 1, /**< 状态开 */
GWProtectionSettingStateOff, /**< 状态关 */
};
/**
各传感器的防护设置状态
*/
typedef NS_ENUM(uint8_t, GWProtectionSettingBodyState) {
GWProtectionSettingBodyStateNotSurpport = 0, /**< 设备不支持 */
GWProtectionSettingBodyStateOn = 3, /**< 状态开 */
GWProtectionSettingBodyStateOnlyBodyOff =7, /**< 状态关 */
};
/**
@@ -89,6 +98,7 @@ typedef NS_ENUM(uint8_t, GWProtectionSettingState) {
@property (nonatomic, assign) GWProtectionSettingState externalAlarmInputState; /**< 外部报警输入 */
@property (nonatomic, assign) GWProtectionSettingState externalAlarmOutputState; /**< 外部报警输出 */
@property (nonatomic, assign) GWProtectionSettingState externalSensorState; /**< 外部传感器 */
@property (nonatomic, assign) GWProtectionSettingBodyState body_detect; /**< 人体侦测 &1 bit 0 表示不支持 1 支持 &4 bit 3 0表示仅人形 1表示物件跟人形都支持 人形侦测 0不支持 3打开 7关闭*/
@end
@@ -128,6 +128,7 @@
@property (nonatomic, weak) id<GWP2PClientProtocol> delegate;/**< GWP2PClient的代理,一些设备事件的通知对象 */
@property (nonatomic, assign) BOOL isAPMode;/**< 是不是AP模式。此属性只保存上次与路由器交互后的数据,调 getDeviceIDInAPMode 方法会重新与路由器交互更新APMode状态,每次app进入前台时会更新APMode状态 */
@property (nonatomic, assign) NSInteger port;/**< 广播端口 */
@property (nonatomic, copy) NSString *serverList; /**< P2P服务器列表,自建服务器需要设置此属性,格式"|p2p1.cloudlinks.cn|p2p2.cloudlinks.cn|p2p3.cloud-links.net" */
@@ -219,5 +220,4 @@
data:(NSData *)data
completionBlock:(CompletionBlock)completionBlock;
@end
@@ -140,4 +140,23 @@ typedef NS_ENUM(NSUInteger, GWSensorAlarmType) {
};
/**
发送设备指令后返回的错误类型
*/
typedef NS_ENUM(NSInteger, P2PCloudPlayBackError) {
P2PCloudPlayBackErrorNone = 0, /**< 没有错误 */
P2PCloudPlayBackErrorForbidden = -1011, /**< 鉴权过期禁止访问 */
P2PCloudPlayBackErrorNoPermission = 10903001 , /**<//没有回放权限 */
P2PCloudPlayBackErrorNoPlayback = 10908103, /**< 没有回放视频 */
P2PCloudPlayBackErrorLoginError =10903007 , /**< 登录错误 */
P2PCloudPlayBackErrorMessageIsSending = 9996, /**< 当前请求正在进行 */
P2PCloudPlayBackErrorUnKnow = 9999 /**< 未知错误,返回结果一般不会描述错误原因 */
};
//extern void *gwdebug;
extern void (*gwdebug)(NSInteger level, NSString *file, NSString *func, NSInteger line, NSString *msg);
#endif /* GWP2PDefine_h */
@@ -45,7 +45,7 @@ typedef NS_ENUM(NSUInteger, GWP2PDeviceIPCSubtype) {
GWP2PDeviceIPCSubtype38X38, //38板,不带马达,不带人体红外,不带回音消除
GWP2PDeviceIPCSubtypeDoorbell, //门铃,不带马达,带语音优化
GWP2PDeviceIPCSubtypeCostdown, //costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
GWP2PDeviceIPCSubtype38Module,
GWP2PDeviceIPCSubtype38Module, //不带马达
GWP2PDeviceIPCSubtypeNvrPtz = 6, //预留
GWP2PDeviceIPCSubtypeNvrNoPtz, //预留
@@ -57,7 +57,7 @@ typedef NS_ENUM(NSUInteger, GWP2PDeviceIPCSubtype) {
GWP2PDeviceIPCSubtype130w38X38, //130w,38板,不带马达,不带人体红外,不带回音消除
GWP2PDeviceIPCSubtype130wDoorbell, //130w,门铃,不带马达,带语音优化
GWP2PDeviceIPCSubtype130wCostdown, //130w,costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
GWP2PDeviceIPCSubtype130w38Module,
GWP2PDeviceIPCSubtype130w38Module, //不带马达
GWP2PDeviceIPCSubtype130wNvrPtz = 16, //预留
GWP2PDeviceIPCSubtype130wNvrNoPtz, //预留
@@ -69,7 +69,7 @@ typedef NS_ENUM(NSUInteger, GWP2PDeviceIPCSubtype) {
GWP2PDeviceIPCSubtype200w38X38, //200w,38板,不带马达,不带人体红外,不带回音消除
GWP2PDeviceIPCSubtype200wDoorbell, //200w,门铃,不带马达,带语音优化
GWP2PDeviceIPCSubtype200wCostdown, //200w,costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
GWP2PDeviceIPCSubtype200w38Module,
GWP2PDeviceIPCSubtype200w38Module, //不带马达
GWP2PDeviceIPCSubtype200wNvrPtz = 26, //预留
GWP2PDeviceIPCSubtype200wNvrNoPtz, //预留
@@ -68,9 +68,9 @@ typedef void (^DeviceReceiveBlock)(NSString *deviceId, BOOL isSupport);
/**
刷新局域网设备。lanDevices每30刷新,调用此方法马上发送一次刷新指令。
强制刷新局域网设备
*/
- (void)refreshLanDevices;
- (void)forceScanLanDevices;
@@ -28,6 +28,9 @@
/** 回放的状态 */
@property (nonatomic, readonly) GWP2PPlaybackState playbackState;
/** 播放倍速 */
@property (nonatomic, assign) GWPlaybackSpeed speed;
/**
播放设备远程录像文件,原理和监控设备是一样的,需要先呼叫连接设备
@@ -60,6 +63,10 @@
*/
- (void)p2pPauseOrResume;
/**
暂停
*/
- (void)p2pPause;
/**
快进或者取消快进
@@ -66,7 +66,7 @@ typedef void (^ScreenshotCompletionBlock)(UIImage *screenshot, NSTimeInterval ti
@param gesture 手势
*/
- (void)p2pPlayer:(GWP2PPlayer *)player recieveGestureRecognizer:(UIGestureRecognizer *)gesture;
- (BOOL)p2pPlayer:(GWP2PPlayer *)player shouldHandlerSwipeGesture:(UIGestureRecognizer *)gesture;
/**
@@ -45,6 +45,11 @@ typedef NS_ENUM(NSUInteger, GWP2PPlaybackState) { //回放状态
GWP2PPlaybackStateStop //停止
};
typedef NS_ENUM(NSUInteger, GWPlaybackSpeed) { //回放倍速
GWPlaybackSpeedNormal,
GWPlaybackSpeedFastForward
};
/**
呼叫失败的错误枚举
@@ -65,6 +70,8 @@ typedef NS_ENUM(NSUInteger, GWP2PCallError) {
GWP2PCallErrorPwdWrong, //12密码错误(在远程监控时用到密码,在视频通话是不需要)
GWP2PCallErrorConnFail,
GWP2PCallErrorNotSupport,
GWP2PCallErrorNotPermissions, //15无监控权限
};
/**
@@ -146,26 +153,28 @@ typedef NS_ENUM(NSUInteger, GWP2PPlaybackControl) {
GWP2PPlaybackControlPlay, //播放
GWP2PPlaybackControlPause, //暂停
GWP2PPlaybackControlStop, //停止
GWP2PPlaybackControlFileEnd, //文件播放完毕
GWP2PPlaybackControlFileEnd, //文件读取完毕,但不等于播放完毕
GWP2PPlaybackControlFastForward, //快进
GWP2PPlaybackControlFastForwardCancel, //取消快进
GWP2PPlaybackControlNextFile, //切换文件播放
GWP2PPlaybackControlSeekTime, //指定时间播放
};
/**
汇讯视通控制镜头
*/
typedef NS_ENUM(NSUInteger, GWP2PHXVisonDirection) {
GWP2PHXVisonDirectionLeft = 0, //左
GWP2PHXVisonDirectionRight, //右
GWP2PHXVisonDirectionUp, //上
GWP2PHXVisonDirectionDown, //下
GWP2PHXVisonDirectionShort, //缩小
GWP2PHXVisonDirectionLong, //放大
GWP2PHXVisonDirectionStop, //停止
GWP2PHXVisonDirectionLeft = 0, //左,保持移动
GWP2PHXVisonDirectionRight, //右,保持移动
GWP2PHXVisonDirectionUp, //上,保持移动
GWP2PHXVisonDirectionDown, //下,保持移动
GWP2PHXVisonDirectionZoomOut, //缩小
GWP2PHXVisonDirectionZoomIn, //放大
GWP2PHXVisonDirectionStop, //停止,停止移动
};
/**
汇讯视通3D手势
*/
@@ -19,6 +19,11 @@
*/
extern NSString * const kGWP2PDeviceIsCallingNotification;
/**
NPC设备主动拒绝的通知
*/
extern NSString * const kGWP2PDeviceIsRejectNotification;
/**
@brief GWP2PVideoPlayerProtocol协议包含监控时的设备状态信息的回调,按需要选择性实现
@@ -98,7 +103,8 @@ extern NSString * const kGWP2PDeviceIsCallingNotification;
calling:(P2PCallingBlock)callingBlock
accept:(P2PAcceptBlock)acceptBlock
reject:(P2PRejectBlock)rejectBlock
ready:(P2PReadyBlock)readyBlock;
ready:(P2PReadyBlock)readyBlock
allowLAN:(BOOL)allowLAN;
/**
呼叫一个NPC设备,进行视频对讲,目前只有NPC一种设备存在对讲视频对讲功能,所以不需要设备类型等参数
@@ -33,9 +33,9 @@ szPassword: 130位字符串
szUserID:登陆账号关联的ID
szOutputBuffer:用于保存明文的缓存,由用户提供
iLength:用于保存明文的缓存的长度
返回值:0-成功 1-因输出缓存太小而执行失败
返回值:YES成功 NO因输出缓存太小而执行失败
*/
+(unsigned int)PassswrodDecrypt:(char*)szSrcData UserID:(char*)szUserID Dst:(char*)szOutputBuffer Len:(unsigned int)iLength;
+(BOOL)PassswrodDecrypt:(char*)szSrcData UserID:(char*)szUserID Dst:(char*)szOutputBuffer Len:(unsigned int)iLength;
/*
函数功能:服务器保存的设备密码的加密函数(应用场景:上传设备列表到服务器)
@@ -43,9 +43,9 @@ szPassword: 130位字符串
szUserID:登陆账号关联的ID
szOutputBuffer:用于保存密文的缓存,由用户提供
iLength:用于保存密文的缓存的长度
返回值:0-成功 1-因输出缓存太小而执行失败
返回值:YES成功 NO因输出缓存太小而执行失败
*/
+(unsigned int)PasswordEncrypt:(char*)szSrcData UserID:(char*)szUserID Dst:(char*)szOutputBuffer Len:(unsigned int)iLength;
+(BOOL)PasswordEncrypt:(char*)szSrcData UserID:(char*)szUserID Dst:(char*)szOutputBuffer Len:(unsigned int)iLength;
/*
函数功能:base64解密,扫描二维码用到。
Binary file not shown.
@@ -6,23 +6,23 @@
<dict>
<key>Headers/GWNet.h</key>
<data>
N5pUkPs/Hy2Ho7CTNdJM9v0GRz0=
/D/h3V7xJHk/BcZAej7Qdp1XAW8=
</data>
<key>Headers/GWNetError.h</key>
<data>
XuUZaxW3FCFUD7kCae84h1j4pZM=
0j5ICqr7VpHUeg/rzYYF1icxklc=
</data>
<key>Headers/GWP2P.h</key>
<data>
z+OqKE12S658by3dE2WRiaJTBEU=
M7yDtyM42ylW+TUlmhIzAeQMm48=
</data>
<key>Headers/GWP2PClient+APMode.h</key>
<data>
YWt9QyVQpV7H7yUIgxv9XF970ZQ=
iJ7AT1Qp/Bw+ohKngrlw7rzSZJk=
</data>
<key>Headers/GWP2PClient+Alarm.h</key>
<data>
DJxIDvTazePmEIyx1zw3Slq4S4k=
gjdTj+8WL0bZiRGOy/uygkTrEWc=
</data>
<key>Headers/GWP2PClient+Defense.h</key>
<data>
@@ -30,7 +30,7 @@
</data>
<key>Headers/GWP2PClient+DeviceInfomation.h</key>
<data>
GbWYbr66mmA7NUaBI4U60Bj0h+c=
SSzr06APzjnAyW3Y1iPLmE1Y+6w=
</data>
<key>Headers/GWP2PClient+GarageLight.h</key>
<data>
@@ -38,7 +38,11 @@
</data>
<key>Headers/GWP2PClient+HXVision.h</key>
<data>
pOIg8MCG63LtQgHpcJ9AoCyFNcI=
2k0pPJ4ONs1SiM8CK2Zm2cjMPXY=
</data>
<key>Headers/GWP2PClient+P2PInfo.h</key>
<data>
n42B5UHL38UlOr/1jvqrrzvDC7Y=
</data>
<key>Headers/GWP2PClient+PictureAndSound.h</key>
<data>
@@ -46,11 +50,11 @@
</data>
<key>Headers/GWP2PClient+Record.h</key>
<data>
qysAbglaNAte6kAvCsuJo2b1b8s=
Azon8Lg4aPzChgoQ/xWyNhraqa4=
</data>
<key>Headers/GWP2PClient+SceneMode.h</key>
<data>
Hy2dYM269SmcX0k0DhF1dfsuiQ4=
pwlPuiVmuZhyMjlyGO2egM3C18s=
</data>
<key>Headers/GWP2PClient+Sensor.h</key>
<data>
@@ -62,19 +66,19 @@
</data>
<key>Headers/GWP2PClient.h</key>
<data>
wfW/FSLqnWLcNollxT+5k9p0xYI=
RYvGLk9NxfGf3yLt0TtgMvEw0so=
</data>
<key>Headers/GWP2PDefine.h</key>
<data>
r9RrEnUXS7+K+O5UH0HbOWOqfOk=
g24ZOaJmFMf2CfVQnEcrhF1Wkag=
</data>
<key>Headers/GWP2PDevice.h</key>
<data>
RgsP3k7cqDz9MKc/o+C6MkJ01ws=
G8/oP9uZevx53PoZD5T/9vzN/DQ=
</data>
<key>Headers/GWP2PDeviceLinker.h</key>
<data>
0JxhyxTXFCy6G9ANACOwexCritE=
ynGGxd+LY4crGQkTI1NLbdDMvpY=
</data>
<key>Headers/GWP2PLanDevice.h</key>
<data>
@@ -82,27 +86,27 @@
</data>
<key>Headers/GWP2PPlaybackPlayer.h</key>
<data>
iykJtuJYz3sGX/SbtOolvpf9tq8=
+blua7Uvw/zRvv9+evEuYFEBlgI=
</data>
<key>Headers/GWP2PPlayer.h</key>
<data>
BVS74XH9oIh1SzC2yr6laNrGTzc=
l7uVOYTsc/CfKJPvCUkpkiL6xHE=
</data>
<key>Headers/GWP2PPlayerDefine.h</key>
<data>
fcuQv9+oqRae0wAdcXWGDOAEFlw=
YTMpNTvqgumbSqfzU1FBvzK7xlI=
</data>
<key>Headers/GWP2PVideoPlayer.h</key>
<data>
lOAShVbPkdpBQ+UijARKgf82rUc=
BngQ84XqDG3xpnszWomlx3Boh14=
</data>
<key>Headers/MD5Manager.h</key>
<data>
AUNlmZF9J/diTQOhzm0T2eaVNZs=
9Ap+BCQmV4CE/09z8spNS9mQ77k=
</data>
<key>Info.plist</key>
<data>
qJVlMog86xUFYdTivMuZae3v5Rg=
qkxYKpNqiN/mYFQcmOoGghFUjrE=
</data>
<key>Modules/module.modulemap</key>
<data>
@@ -115,55 +119,55 @@
<dict>
<key>hash</key>
<data>
N5pUkPs/Hy2Ho7CTNdJM9v0GRz0=
/D/h3V7xJHk/BcZAej7Qdp1XAW8=
</data>
<key>hash2</key>
<data>
G4QevGNQ/qXoUVMeBj8owHPjPvVVHniejAFYPsJxnj0=
oj8DULbME/XrojhVsH9vFLl1XLent2Sdu5x1p9A3MJ4=
</data>
</dict>
<key>Headers/GWNetError.h</key>
<dict>
<key>hash</key>
<data>
XuUZaxW3FCFUD7kCae84h1j4pZM=
0j5ICqr7VpHUeg/rzYYF1icxklc=
</data>
<key>hash2</key>
<data>
ysqvbpkuGegIXAq56wPNE0OE5H9jUvX0N0v5Z/wnnqw=
f7p5ZveAo49m+rKPd5xZdSEjdg/XL4MVK4EdweRpoJ4=
</data>
</dict>
<key>Headers/GWP2P.h</key>
<dict>
<key>hash</key>
<data>
z+OqKE12S658by3dE2WRiaJTBEU=
M7yDtyM42ylW+TUlmhIzAeQMm48=
</data>
<key>hash2</key>
<data>
dCgEpTWpQ8DXxE5/SO4IMBr3pBGY7pJIvEmZLOvOZCs=
SYZLQZCuVeESvX/qZvtm5MMR6leqfds0aNxcMy42U/8=
</data>
</dict>
<key>Headers/GWP2PClient+APMode.h</key>
<dict>
<key>hash</key>
<data>
YWt9QyVQpV7H7yUIgxv9XF970ZQ=
iJ7AT1Qp/Bw+ohKngrlw7rzSZJk=
</data>
<key>hash2</key>
<data>
82Tv12fHc/l4At8i/gM6aaO8JuxyvcrvETTgy+Afki4=
95RdtJ4NUCKKza0FWvYaQwYbYXudPqsZbTrPabFm3MM=
</data>
</dict>
<key>Headers/GWP2PClient+Alarm.h</key>
<dict>
<key>hash</key>
<data>
DJxIDvTazePmEIyx1zw3Slq4S4k=
gjdTj+8WL0bZiRGOy/uygkTrEWc=
</data>
<key>hash2</key>
<data>
XBMvs4Zk38Q/FY/h+jWQwQSAAm9KbKFLW8LpZ/Bv+DM=
s6rg3KlpjqO4giyxE0OYvJG42+pnzuiyt/t8HJDHVco=
</data>
</dict>
<key>Headers/GWP2PClient+Defense.h</key>
@@ -181,11 +185,11 @@
<dict>
<key>hash</key>
<data>
GbWYbr66mmA7NUaBI4U60Bj0h+c=
SSzr06APzjnAyW3Y1iPLmE1Y+6w=
</data>
<key>hash2</key>
<data>
x9/09sgHeTyP+LND/0ilr94x7y+QbAA92lX28uhWEEY=
kCCqjTuSk925OtaiPmJv3+ygA+h1dCZd9MFMs4WkqlI=
</data>
</dict>
<key>Headers/GWP2PClient+GarageLight.h</key>
@@ -203,11 +207,22 @@
<dict>
<key>hash</key>
<data>
pOIg8MCG63LtQgHpcJ9AoCyFNcI=
2k0pPJ4ONs1SiM8CK2Zm2cjMPXY=
</data>
<key>hash2</key>
<data>
oi/0YLKo9ylqnNiPKdGKCAX4UWJsGny8kdSl6PZhVWA=
szsx+L8ANdMidK8yGTAiWOH8H0JMW78QCzuq1bFnN/U=
</data>
</dict>
<key>Headers/GWP2PClient+P2PInfo.h</key>
<dict>
<key>hash</key>
<data>
n42B5UHL38UlOr/1jvqrrzvDC7Y=
</data>
<key>hash2</key>
<data>
7rb6qFMtccJKGXcJUgA6z7ZNL1JJMSvPpEHuIHiShCc=
</data>
</dict>
<key>Headers/GWP2PClient+PictureAndSound.h</key>
@@ -225,22 +240,22 @@
<dict>
<key>hash</key>
<data>
qysAbglaNAte6kAvCsuJo2b1b8s=
Azon8Lg4aPzChgoQ/xWyNhraqa4=
</data>
<key>hash2</key>
<data>
Fav1TFzUIHgOkvzrFrVy+OWRTO1K0TGy9Xqdoavpo24=
W7kyLABk/LawcZ+9ZpwnHbTKphiUJ75XMtZ0hs/Wjxg=
</data>
</dict>
<key>Headers/GWP2PClient+SceneMode.h</key>
<dict>
<key>hash</key>
<data>
Hy2dYM269SmcX0k0DhF1dfsuiQ4=
pwlPuiVmuZhyMjlyGO2egM3C18s=
</data>
<key>hash2</key>
<data>
0dgzLlfhUDZTBxIkRFcZ/7FZZK6uSO9ia8H6ou2PiJk=
8DrEWWnGtOANRPXQoDaQVpO3z7pQB9Bm/rRMZC+gJlM=
</data>
</dict>
<key>Headers/GWP2PClient+Sensor.h</key>
@@ -269,44 +284,44 @@
<dict>
<key>hash</key>
<data>
wfW/FSLqnWLcNollxT+5k9p0xYI=
RYvGLk9NxfGf3yLt0TtgMvEw0so=
</data>
<key>hash2</key>
<data>
OSfHL++HoGY8D/KgFmrpfvbWwxBdh0o3Tabc/tdLCRw=
CJI8BirmzaJFuN1ZFFikCr9zTkyOto5JRMYsYmi5Ntw=
</data>
</dict>
<key>Headers/GWP2PDefine.h</key>
<dict>
<key>hash</key>
<data>
r9RrEnUXS7+K+O5UH0HbOWOqfOk=
g24ZOaJmFMf2CfVQnEcrhF1Wkag=
</data>
<key>hash2</key>
<data>
Ob8/WyjnDAv6VByM99FsjKfTvFdZI0BZ2D613tzhiSM=
+n9MzXhkEcfqzTK2tIOGBhwYNLWz9tsDu/SvrJAuKPM=
</data>
</dict>
<key>Headers/GWP2PDevice.h</key>
<dict>
<key>hash</key>
<data>
RgsP3k7cqDz9MKc/o+C6MkJ01ws=
G8/oP9uZevx53PoZD5T/9vzN/DQ=
</data>
<key>hash2</key>
<data>
li6sGL0KHKeXgwn2DMy1d5sNaf5K4xI586VfMdVeFRk=
A4XIwRTo78MWLG8iwGYPjg849rPVbe6rhbPyh99oAhA=
</data>
</dict>
<key>Headers/GWP2PDeviceLinker.h</key>
<dict>
<key>hash</key>
<data>
0JxhyxTXFCy6G9ANACOwexCritE=
ynGGxd+LY4crGQkTI1NLbdDMvpY=
</data>
<key>hash2</key>
<data>
GGQjb2C8KCwBno1XtmFdP0mELm8psWwvljEnt4vQRww=
s8Voc6sCJn8BjsAXJJDGUDnrxEFNvhVZRRiVWeYT5PA=
</data>
</dict>
<key>Headers/GWP2PLanDevice.h</key>
@@ -324,55 +339,55 @@
<dict>
<key>hash</key>
<data>
iykJtuJYz3sGX/SbtOolvpf9tq8=
+blua7Uvw/zRvv9+evEuYFEBlgI=
</data>
<key>hash2</key>
<data>
Jqb9K/MeeBrysIqt+gFWF+p54P41nwsM3dhu2NDc/BU=
fCbJW58v8fFL2guvsn6wZ1o9t7zRonmcvDXlRV80DXY=
</data>
</dict>
<key>Headers/GWP2PPlayer.h</key>
<dict>
<key>hash</key>
<data>
BVS74XH9oIh1SzC2yr6laNrGTzc=
l7uVOYTsc/CfKJPvCUkpkiL6xHE=
</data>
<key>hash2</key>
<data>
Knlii/rz3zOtRep6fo7zWwqJHfOVDok/waC4U3BMUNQ=
nujAzHkU1eAeqoJX41QIuENbJmNST46VskCKMksstFA=
</data>
</dict>
<key>Headers/GWP2PPlayerDefine.h</key>
<dict>
<key>hash</key>
<data>
fcuQv9+oqRae0wAdcXWGDOAEFlw=
YTMpNTvqgumbSqfzU1FBvzK7xlI=
</data>
<key>hash2</key>
<data>
Fnf+HHRAxj+8iepgneNvleh8DmPWWThZSDSLOctYFy8=
edkPjmBz3IjZ3K+48tWugH1KiIPqfbDzy2fJjabfmYQ=
</data>
</dict>
<key>Headers/GWP2PVideoPlayer.h</key>
<dict>
<key>hash</key>
<data>
lOAShVbPkdpBQ+UijARKgf82rUc=
BngQ84XqDG3xpnszWomlx3Boh14=
</data>
<key>hash2</key>
<data>
Otq4vl7WvvjiyuFaYsRLgvOpz0bS0SyFQzlZjqYl0Ec=
Ra6aFpCNNl/BwtNWr3IoZMEkpNG46c+/w9XhN6+jMMU=
</data>
</dict>
<key>Headers/MD5Manager.h</key>
<dict>
<key>hash</key>
<data>
AUNlmZF9J/diTQOhzm0T2eaVNZs=
9Ap+BCQmV4CE/09z8spNS9mQ77k=
</data>
<key>hash2</key>
<data>
Y6AKHotGffuSL2JJvsdQ+xggWQ53jO07IwE2uckzWss=
Wncj1YD0K0JzELPMsoW+k1G4sC6LrnbwWY4Z1C0i/VI=
</data>
</dict>
<key>Modules/module.modulemap</key>
@@ -389,7 +404,7 @@
</dict>
<key>rules</key>
<dict>
<key>^</key>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
<dict>
@@ -420,11 +435,6 @@
<key>weight</key>
<real>11</real>
</dict>
<key>^</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
@@ -432,13 +442,6 @@
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^.*\.lproj/</key>
@@ -474,13 +477,6 @@
<key>weight</key>
<real>20</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
+2 -2
View File
@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.9.8</string>
<string>4.9.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -70,7 +70,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.8.8</string>
<string>9.9.1</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
+2
View File
@@ -515,6 +515,8 @@
+(UserModel*)getUserInfo
{
UserModel*model=[[DataCenter defaultDtacenter]valueForKey:@"UserLogIn"];
NSString *callId=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
model.callId = callId;
return model;
}
@@ -12,7 +12,6 @@
#import "IfishKankanListModel.h"
#import "LXAdScrollView.h"
#import "WoDeKanKanViewController.h"
#define TABBAR_H self.tabBarController.tabBar.frame.size.height
@@ -76,7 +75,6 @@
self.navigationItem.rightBarButtonItem = rightItem;
[self creatUI];
[self creatReatRefreshView];
//[self loadBannerData];
[self loadNewBannerData];
}
@@ -127,42 +125,11 @@
-(void)pushMyKankan{
self.hidesBottomBarWhenPushed = YES;
// WoDeKanKanViewController *wodeKakanVC=[[WoDeKanKanViewController alloc] init];
MineKankanEditViewController *editVC = [[MineKankanEditViewController alloc] init];
_isPushEdit = YES;
[self.navigationController pushViewController:editVC animated:YES];
}
#pragma mark -v4.1 前 看看banner
-(void)loadBannerData{
__weak typeof (self)weskSelf=self;
[AFHttpTool getLiveBannerSuccess:^(id response) {
NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil];
if ([reDic[@"result"] isEqualToString:@"100"]){
NSArray*bannerArr=reDic[@"data"];
for (NSDictionary *bannerDic in bannerArr) {
KanKanBanner *banner=[[KanKanBanner alloc] init];
banner.appShow = bannerDic[@"appShow"];
banner.bannerId = bannerDic[@"bannerId"];
banner.bannerImg = bannerDic[@"bannerImg"];
banner.bannerLink = bannerDic[@"bannerLink"];
banner.bannerType = bannerDic[@"bannerType"];
[_bannerImgArr addObject:banner.bannerImg];
[_bannerArray addObject:banner];
}
[weskSelf setingBannerViewData];
}
} failure:^(NSError *err) {
NSLog(@"loadBannererr%@",err);
}];
}
#pragma mark -v4.1 后看看banner
-(void)loadNewBannerData{
@@ -194,7 +161,6 @@
_tableView.delegate=self;
_tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor= TABLE_BACKGROUD_COLOR;
//_tableView.backgroundColor= [UIColor redColor];
UIView *footerView=[[UIView alloc] initWithFrame:CGRectMake(0,0, kScreenSize.width, 0.1)];
footerView.backgroundColor = [UIColor clearColor];
_tableView.tableFooterView = footerView;
@@ -370,7 +336,7 @@
}
//
-(void)pushShareP2pView:(IfishKankanListModel *)listModel
{
KanHuListModel *kanHuCamera =[[KanHuListModel alloc] init];
@@ -7,7 +7,6 @@
//
#import "IfishP2PLivePlayViewController.h"
#import "IfishP2PVideoPlayView.h"
@interface IfishP2PLivePlayViewController ()<P2PShareViewBootomViewDelegate>
@@ -53,20 +52,6 @@
[self.view bringSubviewToFront:self.subHbottomView];
}
//
-(void)setupVideoPlayView{
IfishP2PVideoPlayView *playView=[IfishP2PVideoPlayView videoPlayView];
playView.delegate=self;
//
playView.frame = CGRectMake(0,64, self.view.bounds.size.width, self.view.bounds.size.width * 9 / 16);
[self.view addSubview:playView];
//
playView.contrainerViewController = self;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
@@ -112,7 +97,6 @@
//
-(void)chatBtnClickAction
{
}
#pragma mark- 暂停 挂断
@@ -125,9 +109,7 @@
while (self.isPlaying) {
usleep(50*1000);
}
[[P2PClient sharedClient] p2pHungUp];
self.remoteView.isQuitMonitorInterface = NO;//rtsp监控界面弹出修改
[self.player p2pStop];
}
}
@@ -151,7 +133,6 @@
///[self.remoteView getLastImgGoback];
[AppDelegate sharedDefault].canFullScreen = NO;
[self.remoteView releseromotViewSet];
[self.navigationController popViewControllerAnimated:YES];
@@ -1,152 +0,0 @@
//
// IfishP2PVideoPlayView.h
// Ifish
//
// Created by imac on 16/11/11.
// Copyright © 2016年 lianxiang. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "IfishCameraModel.h"
#import "ProgressImageView.h"
#import "OpenGLView.h"
#import "TouchButton.h"
#import<GWP2P/GWP2P.h>
#import "CustomBorderButton.h"
#import "CustomView.h"
#define FocalLength_Elongation_btnTag 300
#define FocalLength_Shorten_btnTag 301
#define FocalLength_Change_sliderTag 302
//竖屏
#define STOPBTN_TAG 1603227
#define SOUND_BUTTON_H_TAG 1603221
#define SWITCH_SCREEN_BUTTON_H_TAG 1603222
#define DEFENCE_BUTTON_H_TAG 1603223
#define TALK_BUTTON_H_TAG 1603224
#define SCREENSHOT_BUTTON_H_TAG 1603225
#define PROMPT_BUTTON_TAG 1603226
#define SCREENSHOT_BUTTON_FLIE_TAG 1603228
#define VT_STOPBTN_TAG 1603229
#define DOOR_BELLALERT 1001001
#define CAMERA_DEVICE_JIEBANG_ALERT 1001002
#define XUANDUO_GUANSHUIBENG_ALERT 1001003
#define WEIJIHUO_ALERT 1001004
#define ALERT_TAG_UPDATE 1
#import <AVFoundation/AVFoundation.h>
#import "P2PClient.h"
//暂未完成 勿yong
@protocol IfishP2PVideoPlayViewDelegate <NSObject>
-(void)btnClickToBackAction;
@end
@interface IfishP2PVideoPlayView : UIView<AVCaptureVideoDataOutputSampleBufferDelegate,UIGestureRecognizerDelegate,
TouchButtonDelegate,
OpenGLViewDelegate,
UIScrollViewDelegate,
UIAlertViewDelegate,
P2PClientDelegate>
{
CGFloat _horizontalScreenH;
CGFloat _monitorInterfaceW;//rtsp监控界面弹出修改
CGFloat _monitorInterfaceH;//rtsp监控界面弹出修改
UIButton* _btnDefence;
BOOL _isPlaying;
BOOL _isOkFirstRenderVideoFrame;//YES表示第一次成功渲染图像
BOOL _isOkRenderVideoFrame;//YES表示图像渲染出来了
BOOL _isCanAutoOrientation;//限制屏幕什么时候可以旋转
BOOL _isInItDevice; //是否连接设备
BOOL _isStop;//是否暂停 用于区分是 暂停按钮 还是 连接失败按钮
}
+ (instancetype)videoPlayView;
@property (weak, nonatomic) IBOutlet UIView *canvasView;
@property (nonatomic,strong) IfishCameraModel *contact;
@property (weak, nonatomic) IBOutlet ProgressImageView *yProgressView;
@property (weak, nonatomic) IBOutlet UIButton *promptButton;
@property (weak, nonatomic) IBOutlet OpenGLView *remoteView;
@property (weak, nonatomic) IBOutlet UIView *midToolHView;
@property(nonatomic,assign) id delegate;
@property (nonatomic, weak) UIViewController *contrainerViewController;
@property (nonatomic) BOOL isReject;
@property (nonatomic) BOOL isShowControllerBar;
@property (nonatomic) BOOL isShowVToolBar;
@property (nonatomic) BOOL isVideoModeHD;
@property (weak, nonatomic) IBOutlet UIButton *switchScreenButtonH;
@property (weak, nonatomic) IBOutlet UIButton *stopBtnH;
@property (nonatomic) BOOL isFullScreen4B3;
@property (nonatomic,strong) UIScrollView *scrollView;//监控界面缩放
@property (nonatomic) BOOL isScale;//监控界面缩放
@property (strong, nonatomic) UIView *bottomView;//重新调整监控画面
@property (strong, nonatomic) UIView *pressView;
@property (nonatomic) BOOL isTalking;
@property (strong, nonatomic) UIView *controllerRight;
@property (strong, nonatomic) UIView *controllerRightBg;//重新调整监控画面
@property (strong, nonatomic) UIView *bottomBarView;//重新调整监控画面
@property (strong, nonatomic) UIView *controllBar;
@property (nonatomic) BOOL isAlreadyShowResolution;//重新调整监控画面
@property (nonatomic) BOOL isDefenceOn;//重新调整监控画面
//GPIO 口控制参数记录
@property(strong, nonatomic) CustomBorderButton *customBorderButton;
@property(strong, nonatomic) CustomView *leftView;
@property(nonatomic) BOOL isShowLeftView;
@property(nonatomic) int lastGroup;
@property(nonatomic) int lastPin;
@property(nonatomic) int lastValue;
@property(nonatomic) int *lastTime;
@property(nonatomic, strong) UIButton *clickGPIO0_0Button;
@property(nonatomic, strong) UIButton *clickGPIO0_1Button;
@property(nonatomic, strong) UIButton *clickGPIO0_2Button;
@property(nonatomic, strong) UIButton *clickGPIO0_3Button;
@property(nonatomic, strong) UIButton *clickGPIO0_4Button;
@property(nonatomic, strong) UIButton *clickGPIO2_6Button;
@property(nonatomic, strong) UIButton *lightButton;
@property (nonatomic) BOOL isLightSwitchOn;
@property (strong, nonatomic) UIActivityIndicatorView *progressView;
@property (nonatomic) BOOL isSupportLightSwitch;
//YES表示当前处于监控中,且接收到推送,点击观看监控
@property (assign,nonatomic) BOOL isIntoMonitorFromMonitor;
@property (strong, nonatomic) UIView *focalLengthView;
@property (nonatomic) BOOL isSupportFocalLength;
@property (strong, nonatomic) UIPinchGestureRecognizer *pinchGestureRecognizer;
//判断当前监控处于横屏还是竖屏界面
@property (assign,nonatomic) BOOL isFullScreen;
@property (strong, nonatomic) UIView *fullScreenBgView;
@end
@@ -1,934 +0,0 @@
//
// IfishP2PVideoPlayView.m
// Ifish
//
// Created by imac on 16/11/11.
// Copyright © 2016 lianxiang. All rights reserved.
//
#import "IfishP2PVideoPlayView.h"
#import "Utils.h"
#import "P2PClient.h"
#pragma mark - 监控竖屏时,各控件初始化
#define BOTTOM_BAR_HEIGHT (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 95.0:50.0)
#define PRESS_LAYOUT_WIDTH_AND_HEIGHT 38
#define CONTROLLER_BTN_COUNT 5
#define PUBLIC_WIDTH_OR_HEIGHT (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 95.0:50.0)
#define CONTROLLER_BTN_H_W (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 70.0:40.0) //布防、声音...高度宽度
#define RESOLUTION_BTN_H (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 44.0:30.0) //分辨率按钮高度
#define CONTROLLER_RIGHT_ITEM_WIDTH 70
#define CONTROLLER_RIGHT_ITEM_HEIGHT 40
#define CONTROLLER_LEFT_ITEM_WIDTH 20
#define CONTROLLER_BTN_TAG_HUNGUP 0
#define CONTROLLER_BTN_TAG_SOUND 1
#define CONTROLLER_BTN_TAG_SCREENSHOT 2
#define CONTROLLER_BTN_TAG_PRESS_TALK 3
#define CONTROLLER_BTN_TAG_DEFENCE_LOCK 4
#define CONTROLLER_BTN_TAG_HD 5
#define CONTROLLER_BTN_TAG_SD 6
#define CONTROLLER_BTN_TAG_LD 7
#define CONTROLLER_BTN_TAG_RESOLUTION 8
#define CONTROLLER_LABEL_TAG_HD 10
#define CONTROLLER_LABEL_TAG_SD 11
#define CONTROLLER_LABEL_TAG_LD 12
#define CONTROLLER_BTN_TAG_GPIO1_0 13 //lock
#define LEFTVIEW_WIDTH (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 88:88)
#define LEFTVIEW_HEIGHT (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 120:120)
#define CUSTOM_BORDER_BUTTON_WIDTH 20
#define CUSTOM_BORDER_BUTTON_HEIGHT 45
#define LEFT_BAR_BTN_WIDTH (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 90:60)
#define LEFT_BAR_BTN_MARGIN (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 15:10)
#define LOADINGPRESSVIEW_WIDTH_HEIGHT (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 50:80)
@implementation IfishP2PVideoPlayView
// View的方法
+ (instancetype)videoPlayView
{
return [[[NSBundle mainBundle] loadNibNamed:@"IfishP2PVideoPlayView" owner:nil options:nil] firstObject];
}
-(void)awakeFromNib{
[super awakeFromNib];
[self connectDevice];
self.isShowControllerBar = YES;
self.isVideoModeHD = NO;
_isReject=YES;
_isStop = NO;
_isOkFirstRenderVideoFrame = YES;
//()
[self initComponentForPortrait];
//()
[self initComponentForHorizontalScreen];
[self cameraConnectSeting];
}
-(void)cameraConnectSeting{
//rtsp监控界面弹出修改
[self monitorP2PCall];
//
[[P2PClient sharedClient] setDelegate:self];
[self hiddenMonitoringUI:NO callErrorInfo:nil isReCall:YES];
}
//rtsp监控界面弹出修改
-(void)monitorP2PCall{
NSString *newPassword = GIWEI_INITPASS;
NSString *cameraPass = [Utils GetTreatedPassword:newPassword];
NSString *cameraId = @"3573889";
[[P2PClient sharedClient] p2pCallWithId:cameraId password:cameraPass callType:P2PCALL_TYPE_MONITOR];
// [[P2PClient sharedClient] p2pCallWithId:self.contact.cameraId password:self.contact.cameraPass callType:P2PCALL_TYPE_MONITOR];
[[P2PClient sharedClient] setP2pCallState:P2PCALL_STATUS_CALLING];
BOOL isBCalled = [[P2PClient sharedClient] isBCalled];
P2PCallType type = [[P2PClient sharedClient] p2pCallType];
NSString *callId = [[P2PClient sharedClient] callId];
if(!isBCalled){
BOOL isApMode = ([[AppDelegate sharedDefault]dwApContactID] != 0);
if (!isApMode)
{
//[[P2PClient sharedClient] p2pCallWithId:callId password:self.contact.cameraPass callType:type];
[[P2PClient sharedClient] p2pCallWithId:callId password:cameraPass callType:type];
}
else
{
//[[P2PClient sharedClient] p2pCallWithId:@"1" password:self.contact.cameraPass callType:type];
[[P2PClient sharedClient] p2pCallWithId:@"1" password:cameraPass callType:type];
}
}
}
-(void)initComponentForPortrait{
//
NSString *filePath = [Utils getHeaderFilePathWithId:self.contact.cameraId];
UIImage *headImg = [UIImage imageWithContentsOfFile:filePath];
if(headImg==nil){
headImg = LXImageWithImageName(@"ic_header.png");
}
self.canvasView.layer.contents = (id)headImg.CGImage;
_yProgressView.backgroundView.image = LXImageWithImageName(@"monitor_press.png");
[_yProgressView start];
self.remoteView.delegate= self;
[self.remoteView.layer setMasksToBounds:YES];
//_remoteView midToolHView
UITapGestureRecognizer *appermidToolView=[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onSingleTap)];
[appermidToolView setCancelsTouchesInView:YES];
[appermidToolView setDelaysTouchesEnded:YES];
[self.canvasView addGestureRecognizer:appermidToolView];
}
#pragma mark - 监控横屏时,各控件初始化
-(void)initComponentForHorizontalScreen{
CGRect rect = [AppDelegate getScreenSize:NO isHorizontal:YES];
CGFloat width = rect.size.width;
_monitorInterfaceW = width;
CGFloat height = rect.size.height;
if(CURRENT_VERSION<7.0){
height +=20;
}
_monitorInterfaceH = height;
_horizontalScreenH = height;
//
//
UIView *fullScreenBgView = [[UIView alloc] initWithFrame:CGRectMake(0.0, 0.0, width, height)];
fullScreenBgView.backgroundColor = XBlack;
self.fullScreenBgView = fullScreenBgView;
//onDoubleTap
//退onDoubleTap
UITapGestureRecognizer *doubleTapG = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onDoubleTap)];
doubleTapG.delegate = self;
[doubleTapG setNumberOfTapsRequired:2];
[self.remoteView addGestureRecognizer:doubleTapG];
//onSingleTap
//退onSingleTap
UITapGestureRecognizer *singleTapG = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onSingleTap)];
singleTapG.delegate = self;
[singleTapG setNumberOfTapsRequired:1];
[singleTapG requireGestureRecognizerToFail:doubleTapG];
[self.remoteView addGestureRecognizer:singleTapG];
//localLengthPinchToZoom
//退localLengthPinchToZoom
NSString * plist = [[NSBundle mainBundle] pathForResource:@"Common-Configuration" ofType:@"plist"];
NSDictionary * dic = [NSDictionary dictionaryWithContentsOfFile:plist];
BOOL isSupportZoom = [dic[@"isSupportZoom"] boolValue];
UIPinchGestureRecognizer *pinchGestureRecognizer = [[UIPinchGestureRecognizer alloc] init];
if (!isSupportZoom) {//
[_remoteView addGestureRecognizer:pinchGestureRecognizer];
}
self.pinchGestureRecognizer = pinchGestureRecognizer;
//
//
//退
int rightItemCount = 3;
//
UIView *controllerRightBg = [[UIView alloc] initWithFrame:CGRectMake(5.0, height, CONTROLLER_RIGHT_ITEM_WIDTH, CONTROLLER_RIGHT_ITEM_HEIGHT*rightItemCount)];
controllerRightBg.layer.cornerRadius = 1.0f;
[controllerRightBg setAlpha:0.5];
[controllerRightBg setBackgroundColor:XBlack];
self.controllerRightBg = controllerRightBg;
[self addSubview:controllerRightBg];
[self.controllerRightBg setHidden:YES];
UIView *controllerRight = [[UIView alloc] initWithFrame:CGRectMake(5.0, height, CONTROLLER_RIGHT_ITEM_WIDTH, CONTROLLER_RIGHT_ITEM_HEIGHT*rightItemCount)];
self.controllerRight = controllerRight;
[self addSubview:controllerRight];
[self.controllerRight setHidden:YES];
//线
for (int i=1; i < rightItemCount; i++) {
UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0.0, i*CONTROLLER_RIGHT_ITEM_HEIGHT+1.0*(i-1), CONTROLLER_RIGHT_ITEM_WIDTH, 1.0)];
lineView.backgroundColor = XWhite;
[controllerRight addSubview:lineView];
}
for(int i=0;i<rightItemCount;i++){
TouchButton *button = [self getBottomBarButton];
button.frame = CGRectMake(0, (CONTROLLER_RIGHT_ITEM_HEIGHT+1.0)*i, CONTROLLER_RIGHT_ITEM_WIDTH, CONTROLLER_RIGHT_ITEM_HEIGHT);
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, button.frame.size.width, button.frame.size.height)];
label.backgroundColor = [UIColor clearColor];
label.textAlignment = NSTextAlignmentCenter;
label.textColor = XWhite;
label.font = [UIFont boldSystemFontOfSize:16.0];
if(rightItemCount==2){//NPC
//
if(i==0){
//label.text = NSLocalizedString(@"SD", nil);
label.text = NSLocalizedString(@"标清", nil);
label.tag = CONTROLLER_LABEL_TAG_SD;
button.tag = CONTROLLER_BTN_TAG_SD;
}else if(i==1){
//label.text = NSLocalizedString(@"LD", nil);
label.text = NSLocalizedString(@"流畅", nil);
label.tag = CONTROLLER_LABEL_TAG_LD;
label.textColor = XBlue;
button.tag = CONTROLLER_BTN_TAG_LD;
}
}else if(rightItemCount==3){//IPC
//
if(i==0){
//label.text = NSLocalizedString(@"HD", nil);
label.text = NSLocalizedString(@"高清", nil);
label.tag = CONTROLLER_LABEL_TAG_HD;
button.tag = CONTROLLER_BTN_TAG_HD;
}else if(i==1){
label.text = NSLocalizedString(@"标清", nil);
//label.text = NSLocalizedString(@"SD", nil);
label.tag = CONTROLLER_LABEL_TAG_SD;
label.textColor = XBlue;
button.tag = CONTROLLER_BTN_TAG_SD;
}else if(i==2){
label.text = NSLocalizedString(@"流畅", nil);
//label.text = NSLocalizedString(@"LD", nil);
label.tag = CONTROLLER_LABEL_TAG_LD;
button.tag = CONTROLLER_BTN_TAG_LD;
//
}
}
[button addSubview:label];
[button addTarget:self action:@selector(onControllerBtnPress:) forControlEvents:UIControlEventTouchUpInside];
[controllerRight addSubview:button];
}
//
//退
//
UIView *bottomView = [[UIView alloc] initWithFrame:CGRectMake(0.0, height-BOTTOM_BAR_HEIGHT, width, BOTTOM_BAR_HEIGHT)];
[bottomView setAlpha:0.5];
[bottomView setBackgroundColor:XBlack];
self.bottomView = bottomView;
[self addSubview:bottomView];
[self.bottomView setHidden:YES];
UIView *bottomBarView = [[UIView alloc] initWithFrame:CGRectMake(0.0, height-BOTTOM_BAR_HEIGHT, width, BOTTOM_BAR_HEIGHT)];
self.bottomBarView = bottomBarView;
[self addSubview:bottomBarView];
[self.bottomBarView setHidden:YES];
//
//
TouchButton *resolutionButton = [self getBottomBarButton];
[resolutionButton setFrame:CGRectMake(5.0, (BOTTOM_BAR_HEIGHT-RESOLUTION_BTN_H)/2.0, CONTROLLER_RIGHT_ITEM_WIDTH, RESOLUTION_BTN_H)];
resolutionButton.tag = CONTROLLER_BTN_TAG_RESOLUTION;
if (rightItemCount == 2) {
[resolutionButton setTitle:NSLocalizedString(@"LD", nil) forState:UIControlStateNormal];
}else{
[resolutionButton setTitle:NSLocalizedString(@"SD", nil) forState:UIControlStateNormal];
}
[resolutionButton setBackgroundImage:LXImageWithImageName(@"ic_ctl_resolution.png") forState:UIControlStateNormal];
[resolutionButton addTarget:self action:@selector(selectResolutionClick:) forControlEvents:UIControlEventTouchUpInside];
//
[bottomBarView addSubview:resolutionButton];
// openGlView scale改变
// _HorizontalStopBtn=[UIButton buttonWithType:UIButtonTypeCustom];
//
// _HorizontalStopBtn.frame = CGRectMake(5.0, (BOTTOM_BAR_HEIGHT-RESOLUTION_BTN_H)/2.0, CONTROLLER_LEFT_ITEM_WIDTH, RESOLUTION_BTN_H);
// _HorizontalStopBtn.tag =VT_STOPBTN_TAG;
// [_HorizontalStopBtn setBackgroundImage:LXImageWithImageName(@"monitor_stop_h.png") forState:UIControlStateNormal];
// [_HorizontalStopBtn addTarget:self action:@selector(HorizontalStopBtnPress:) forControlEvents:UIControlEventTouchUpInside];
// [bottomBarView addSubview:_HorizontalStopBtn];
//
//
TouchButton *switchScreenButton = [self getBottomBarButton];
[switchScreenButton setFrame:CGRectMake(width-CONTROLLER_BTN_H_W-5.0, (BOTTOM_BAR_HEIGHT-CONTROLLER_BTN_H_W)/2.0, CONTROLLER_BTN_H_W, CONTROLLER_BTN_H_W)];
switchScreenButton.tag = SWITCH_SCREEN_BUTTON_H_TAG;
[switchScreenButton setBackgroundImage:LXImageWithImageName(@"monitor_half_screen.png") forState:UIControlStateNormal];
[switchScreenButton addTarget:self action:@selector(onVerticalBtnPress:) forControlEvents:UIControlEventTouchUpInside];
[bottomBarView addSubview:switchScreenButton];
//
TouchButton *hungUpButton = [self getBottomBarButton];
[hungUpButton setFrame:CGRectMake(switchScreenButton.frame.origin.x-CONTROLLER_BTN_H_W-5.0, (BOTTOM_BAR_HEIGHT-CONTROLLER_BTN_H_W)/2.0, CONTROLLER_BTN_H_W, CONTROLLER_BTN_H_W)];
hungUpButton.tag = CONTROLLER_BTN_TAG_HUNGUP;
[hungUpButton setBackgroundImage:LXImageWithImageName(@"ic_ctl_new_hungup.png") forState:UIControlStateNormal];
[hungUpButton addTarget:self action:@selector(onControllerBtnPress:) forControlEvents:UIControlEventTouchUpInside];
// [bottomBarView addSubview:hungUpButton];
//
UIView *controllBar = [[UIView alloc] initWithFrame:CGRectMake(CONTROLLER_RIGHT_ITEM_WIDTH+5.0, 0.0, width-CONTROLLER_RIGHT_ITEM_WIDTH-5.0-PUBLIC_WIDTH_OR_HEIGHT*2-5.0*2, PUBLIC_WIDTH_OR_HEIGHT)];
controllBar.backgroundColor = [UIColor clearColor];
self.controllBar = controllBar;
int btnCount = CONTROLLER_BTN_COUNT;
CGFloat firstControllerBtnX = (controllBar.frame.size.width-PUBLIC_WIDTH_OR_HEIGHT*btnCount)/2.0;
for(int i=0;i<btnCount;i++){
TouchButton *controllerBtn = [self getBottomBarButton];
controllerBtn.frame = CGRectMake(PUBLIC_WIDTH_OR_HEIGHT*i+firstControllerBtnX, (BOTTOM_BAR_HEIGHT-CONTROLLER_BTN_H_W)/2.0, CONTROLLER_BTN_H_W,CONTROLLER_BTN_H_W);
if(i==0){//
_btnDefence = controllerBtn;
_btnDefence.hidden = YES;
//LXImageWithImageName(@"long_press_lock.png")
controllerBtn.tag = CONTROLLER_BTN_TAG_DEFENCE_LOCK;
// if ([AppDelegate sharedDefault].mainController.contact.defenceState == DEFENCE_STATE_ON || [AppDelegate sharedDefault].contact.defenceState == DEFENCE_STATE_ON) {
// [controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_lock_on.png") forState:UIControlStateNormal];
// self.isDefenceOn = YES;
// }else if([AppDelegate sharedDefault].mainController.contact.defenceState == DEFENCE_STATE_OFF || [AppDelegate sharedDefault].contact.defenceState == DEFENCE_STATE_OFF){
// [controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_lock_off.png") forState:UIControlStateNormal];
// self.isDefenceOn = NO;
// }
}else if(i==1){//
controllerBtn.tag = CONTROLLER_BTN_TAG_SOUND;
[controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_new_sound_on.png") forState:UIControlStateNormal];
controllerBtn.hidden = YES;
}else if(i==2){//
controllerBtn.tag = CONTROLLER_BTN_TAG_PRESS_TALK;
[controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_new_send_audio.png") forState:UIControlStateNormal];
[controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_new_send_audio_p.png") forState:UIControlStateHighlighted];
controllerBtn.hidden = YES;
}else if(i==3){//
controllerBtn.tag = CONTROLLER_BTN_TAG_SCREENSHOT;
[controllerBtn setBackgroundImage:LXImageWithImageName(@"ic_ctl_new_screenshot.png") forState:UIControlStateNormal];
controllerBtn.hidden = YES;
}else if(i==4){//6
controllerBtn.tag = CONTROLLER_BTN_TAG_GPIO1_0;
[controllerBtn setBackgroundImage:LXImageWithImageName(@"long_press_lock.png") forState:UIControlStateNormal];
controllerBtn.hidden = YES;
}
if(i==2){
//
}else{
[controllerBtn addTarget:self action:@selector(onControllerBtnPress:) forControlEvents:UIControlEventTouchUpInside];
}
[controllBar addSubview:controllerBtn];
}
[bottomBarView addSubview:controllBar];
//button arrow
//
//退
CGFloat customBorderButtonY = (height - CUSTOM_BORDER_BUTTON_HEIGHT)/2.0;
CustomBorderButton *customBorderButton=[CustomBorderButton buttonWithType:UIButtonTypeCustom];
customBorderButton.frame = CGRectMake(0, customBorderButtonY, CUSTOM_BORDER_BUTTON_WIDTH, CUSTOM_BORDER_BUTTON_HEIGHT);
[customBorderButton setNeedLineTop:true left:true bottom:true right:true];
[customBorderButton setLineColorTop:[UIColor blackColor] left:[UIColor clearColor] bottom:[UIColor blackColor] right:[UIColor blackColor]];//线
[customBorderButton setLineWidthTop:2.0 left:2.0 bottom:2.0 right:2.0];//线
[customBorderButton setRadiusTopLeft:0 topRight:8.0 bottomLeft:0 bottomRight:8.0];//线
[customBorderButton setClipsToBoundsWithBorder:true];//线
[customBorderButton setFillColor:[UIColor darkGrayColor]];//
[customBorderButton setAlpha:0.5];
[customBorderButton setOpaque:YES];
[customBorderButton setImage:[UIImage imageNamed:@"button_right"] forState:UIControlStateNormal];
[customBorderButton setImage:[UIImage imageNamed:@"button_right_selected"] forState:UIControlStateHighlighted];
[customBorderButton addTarget:self action:@selector(showLeftView:) forControlEvents:UIControlEventTouchUpInside];
self.customBorderButton = customBorderButton;
//
//
//退
CGFloat leftViewY = (height - LEFTVIEW_HEIGHT)/2.0;
CustomView *leftView = [[CustomView alloc] initWithFrame:CGRectMake(-LEFTVIEW_WIDTH, leftViewY, LEFTVIEW_WIDTH, LEFTVIEW_HEIGHT)];
[leftView setNeedLineTop:true left:true bottom:true right:true];
[leftView setLineColorTop:[UIColor blackColor] left:[UIColor blackColor] bottom:[UIColor blackColor] right:[UIColor blackColor]];//线
[leftView setLineWidthTop:2.0 left:2.0 bottom:2.0 right:2.0];//线
[leftView setRadiusTopLeft:8.0 topRight:8.0 bottomLeft:8.0 bottomRight:8.0];//线
[leftView setClipsToBoundsWithBorder:true];//线
[leftView setFillColor:[UIColor darkGrayColor]];//
[leftView setAlpha:0.5];
[leftView setOpaque:YES];
self.leftView = leftView;
//[self.leftView setHidden:YES];
CGFloat xSpace = 4.0;
CGFloat ySpace = 4.0;
CGFloat numLabelW = 12.0;
CGFloat buttonW = (leftView.frame.size.width - numLabelW - xSpace*4)/2.0;
CGFloat buttonH = (leftView.frame.size.height - ySpace*4)/3.0;
int tag = 10;
for (int i = 0; i < 3; i++) {
UIButton *onButton = [UIButton buttonWithType:UIButtonTypeCustom];
onButton.frame = CGRectMake(xSpace, (buttonH+ySpace)*i+ySpace, buttonW, buttonH);
onButton.tag = tag++;
[onButton setTitle:@"ON" forState:UIControlStateNormal];
[onButton setTitleColor:XWhite forState:UIControlStateNormal];
onButton.titleLabel.font = XFontBold_12;
[onButton addTarget:self action:@selector(onOrOffButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.leftView addSubview:onButton];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(2*xSpace+buttonW, (buttonH+ySpace)*i+ySpace, numLabelW, buttonH)];
label.backgroundColor = [UIColor clearColor];
label.textColor = XWhite;
label.text = [NSString stringWithFormat:@"%d",i + 1];
label.font = XFontBold_12;
label.textAlignment = NSTextAlignmentCenter;
[self.leftView addSubview:label];
UIButton *offButton = [UIButton buttonWithType:UIButtonTypeCustom];
offButton.frame = CGRectMake(3*xSpace+buttonW +numLabelW, (buttonH+ySpace)*i+ySpace, buttonW, buttonH);
offButton.tag = tag++;
[offButton setTitle:@"OFF" forState:UIControlStateNormal];
[offButton setTitleColor:XWhite forState:UIControlStateNormal];
offButton.titleLabel.font = XFontBold_12;
[offButton addTarget:self action:@selector(onOrOffButtonClick:) forControlEvents:UIControlEventTouchUpInside];
[self.leftView addSubview:offButton];
}
//
//,frame
//退
//
UIActivityIndicatorView *progressView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
progressView.frame = CGRectMake(self.remoteView.frame.size.width-30.0-20.0, (self.remoteView.frame.size.height-30.0)/2, 30.0, 30.0);
[self.remoteView addSubview:progressView];
self.progressView = progressView;
[self.progressView setHidden:YES];
//
UIButton *lightButton = [UIButton buttonWithType:UIButtonTypeCustom];
lightButton.frame = CGRectMake(self.remoteView.frame.size.width-30.0-20.0, (self.remoteView.frame.size.height-30.0)/2, 30.0, 30.0);
lightButton.backgroundColor = [UIColor clearColor];
[lightButton setBackgroundImage:[UIImage imageNamed:@"lighton.png"] forState:UIControlStateNormal];
[lightButton addTarget:self action:@selector(btnClickToSetLightState:) forControlEvents:UIControlEventTouchUpInside];
[self.remoteView addSubview:lightButton];
[lightButton setHidden:YES];
self.lightButton = lightButton;
//
//退
//
//
CGFloat focalLengthView_w = 40.0;
CGFloat focalLengthView_h = 180.0;
//
CGFloat space_FocalLView_Screen = (width - self.remoteView.frame.size.width)/2+20+focalLengthView_w;
UIView *focalLengthView = [[UIView alloc] initWithFrame:CGRectMake(width-space_FocalLView_Screen, height-self.bottomBarView.frame.size.height-20.0-focalLengthView_h, focalLengthView_w, focalLengthView_h)];
if (!isSupportZoom) {//
[self addSubview:focalLengthView];
}
[focalLengthView setHidden:YES];
self.focalLengthView = focalLengthView;
//
//
CGFloat elongationButton_w = 34.0;
CGFloat elongationButton_h = elongationButton_w*(46/43);
UIButton *elongationButton = [UIButton buttonWithType:UIButtonTypeCustom];
elongationButton.frame = CGRectMake((focalLengthView_w-elongationButton_w)/2, 0.0, elongationButton_w, elongationButton_h);
[elongationButton setBackgroundImage:[UIImage imageNamed:@"monitor_localLenght_zoom_normal.png"] forState:UIControlStateNormal];
[elongationButton setBackgroundImage:[UIImage imageNamed:@"monitor_localLenght_zoom_highlighted.png"] forState:UIControlStateHighlighted];
elongationButton.tag = FocalLength_Elongation_btnTag;
[elongationButton addTarget:self action:@selector(btnClickToChangeFocalLength:) forControlEvents:UIControlEventTouchUpInside];
[self.focalLengthView addSubview:elongationButton];
//
UISlider *focalLengthSlider = [[UISlider alloc] initWithFrame:CGRectMake(0.0, 0.0, focalLengthView_h-elongationButton_h*2, 30.0)];
focalLengthSlider.center = CGPointMake(self.focalLengthView.center.x-self.focalLengthView.frame.origin.x, self.focalLengthView.center.y-self.focalLengthView.frame.origin.y);
//90
focalLengthSlider.transform = CGAffineTransformMakeRotation(90*M_PI/180);
focalLengthSlider.minimumValue = 1.0;
focalLengthSlider.maximumValue = 15.0;
focalLengthSlider.value = 7.5;
focalLengthSlider.continuous = NO;//valueChange事件valueChange事件
focalLengthSlider.tag = FocalLength_Change_sliderTag;
[focalLengthSlider addTarget:self action:@selector(btnClickToChangeFocalLength:) forControlEvents:UIControlEventValueChanged];
[self.focalLengthView addSubview:focalLengthSlider];
//
//
CGFloat shortenButton_w = elongationButton_w;
CGFloat shortenButton_h = elongationButton_h;
UIButton *shortenButton = [UIButton buttonWithType:UIButtonTypeCustom];
shortenButton.frame = CGRectMake((focalLengthView_w-shortenButton_w)/2, focalLengthView_h-shortenButton_h, shortenButton_w, shortenButton_h);
[shortenButton setBackgroundImage:[UIImage imageNamed:@"monitor_localLenght_narrow_normal.png"] forState:UIControlStateNormal];
[shortenButton setBackgroundImage:[UIImage imageNamed:@"monitor_localLenght_narrow_highlighted.png"] forState:UIControlStateHighlighted];
shortenButton.tag = FocalLength_Shorten_btnTag;
[shortenButton addTarget:self action:@selector(btnClickToChangeFocalLength:) forControlEvents:UIControlEventTouchUpInside];
[self.focalLengthView addSubview:shortenButton];
}
- (TouchButton *)getBottomBarButton//
{
TouchButton *button = [TouchButton buttonWithType:UIButtonTypeCustom];
[button setFrame:CGRectMake(0.0, 0.0, 50.0, 50.0)];
return button;
}
#pragma mark - 初始化设备 p2pConnect
-(void)connectDevice{
//LoginResult *loginResult = [UDManager getLoginInfo];
//8225
// NSString * P2PVerifyCode1 = @"1528438234";
// NSString * P2PVerifyCode2 = @"992805759";
// NSString *UserID = @"-2144354932";
UserModel *model=[[DataCenter defaultDtacenter] valueForKey:@"UserLogIn"];
NSString *userIDName=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
//
if (!_isInItDevice) {
NSLog(@"正在初始化设备");
_isInItDevice = [[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
// _isInItDevice = [[P2PClient sharedClient] p2pConnectWithId:model.gwellUserID codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
}
if(_isInItDevice){
NSLog(@"p2pConnect success. 成功 可以操作设备了");
//
usleep(600000);
[self startMonitor];
}else{//new added
NSLog(@"p2pConnect failure.失败,不能操作设备");
//[self connectDevice];
return;
}
}
-(void)startMonitor{
if (_isReject&&_isInItDevice) {
NSLog(@"发送呼叫命令");
[[P2PClient sharedClient] setIsBCalled:NO];
[[P2PClient sharedClient] setP2pCallState:P2PCALL_STATUS_CALLING];
//Contact *contact = self.deviceArr[0];
NSString *newPassword = GIWEI_INITPASS;
NSString *cameraPass = [Utils GetTreatedPassword:newPassword];
NSString *cameraId = @"3573889";
[[P2PClient sharedClient] p2pCallWithId:cameraId password:cameraPass callType:P2PCALL_TYPE_MONITOR];
//[[P2PClient sharedClient] p2pCallWithId:self.contact.cameraId password:self.contact.cameraPass callType:P2PCALL_TYPE_MONITOR];
//NSLog(@"contact.contactPassword%@",self.contact.cameraPass);
}
}
#pragma mark - 协议的实现
- (void)P2PClientCalling:(nullable NSDictionary*)info{
NSLog(@"正在呼叫");
}
- (void)P2PClientReject:(nullable NSDictionary*)info{
_isReject=YES;
_isOkRenderVideoFrame = NO;
NSLog(@"视频挂断");
//[self addLogs:@"视频挂断"];
while (_isPlaying) {
usleep(50*1000);
}
if (self.isIntoMonitorFromMonitor) {
self.isIntoMonitorFromMonitor = NO;
[self hiddenMonitoringUI:NO callErrorInfo:nil isReCall:YES];
// [self monitorP2PCall];
}else{
[self hiddenMonitoringUI:NO callErrorInfo:info isReCall:NO];
}
}
- (void)P2PClientAccept:(nullable NSDictionary*)info{
NSLog(@"接收数据");
}
- (void)P2PClientReady:(nullable NSDictionary*)info{
NSLog(@"准备就绪");
[[P2PClient sharedClient] setP2pCallState:P2PCALL_STATUS_READY_P2P];
if([[P2PClient sharedClient] p2pCallType]==P2PCALL_TYPE_MONITOR){
//
[self monitorStartRender];
}
}
#pragma mark - 准备渲染监控界面
-(void)monitorStartRender{
//[self addLogs:@"渲染>>>你可以看到画面了"];
_isReject = NO;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[self renderView];
});
//[[PAIOUnit sharedUnit] setMuteAudio:YES];
// [[PAIOUnit sharedUnit] setSpeckState:YES];
}
#pragma mark - 开始渲染监控画面
- (void)renderView
{
_isPlaying = YES;
/* GAVFrame * m_pAVFrame ;
while (!self.isReject)
{
NSLog(@" while 渲染监控画面");
if(fgGetVideoFrameToDisplay(&m_pAVFrame))
{
if (!_isOkRenderVideoFrame) {
_isOkRenderVideoFrame = YES;
_isOkFirstRenderVideoFrame = YES;
dispatch_async(dispatch_get_main_queue(), ^{
//UI
[self hiddenMonitoringUI:YES callErrorInfo:nil isReCall:NO];
[self didHiddenMonitorUIWith:YES];
});
//
[self setGaoQingHuoBiaoQing];
}
[self.remoteView render:m_pAVFrame];
vReleaseVideoFrame();
}
usleep(10000);
}
_isPlaying = NO;
*/
}
#pragma mark - 设置标清或高清
//
-(void)setGaoQingHuoBiaoQing{
BOOL is16B9 = [[P2PClient sharedClient] is16B9];
BOOL is960P = [[P2PClient sharedClient] is960P];
//
int rightItemCount = 0;
if(is16B9 || is960P){
rightItemCount = 3;
}else{
rightItemCount = 2;
}
//
if (rightItemCount==3) {
[[P2PClient sharedClient] sendCommandType:USR_CMD_VIDEO_CTL andOption:7];
[self updateRightButtonState:CONTROLLER_BTN_TAG_HD];
}else if (rightItemCount == 2){
//
[[P2PClient sharedClient] sendCommandType:USR_CMD_VIDEO_CTL andOption:5];
[self updateRightButtonState:CONTROLLER_BTN_TAG_SD];
}
}
#pragma mark - 设置高清、标清选中
-(void)updateRightButtonState:(NSInteger)tag{
for(UIView *view in self.controllerRight.subviews){
UILabel *labelHD = (UILabel *)[view viewWithTag:CONTROLLER_LABEL_TAG_HD];
if (labelHD) {
labelHD.textColor = XWhite;
}
UILabel *labelSD = (UILabel *)[view viewWithTag:CONTROLLER_LABEL_TAG_SD];
if (labelSD) {
labelSD.textColor = XWhite;
}
UILabel *labelLD = (UILabel *)[view viewWithTag:CONTROLLER_LABEL_TAG_LD];
if (labelLD) {
labelLD.textColor = XWhite;
}
}
UIButton *button = (UIButton*)[self.controllerRight viewWithTag:tag];
//
UIButton *rButton = (UIButton *)[self.bottomBarView viewWithTag:CONTROLLER_BTN_TAG_RESOLUTION];
if (tag == CONTROLLER_BTN_TAG_HD) {
UILabel *label = (UILabel *)[button viewWithTag:CONTROLLER_LABEL_TAG_HD];
label.textColor = XBlue;
//[rButton setTitle:NSLocalizedString(@"HD", nil) forState:UIControlStateNormal];
[rButton setTitle:NSLocalizedString(@"高清", nil) forState:UIControlStateNormal];
}else if(tag == CONTROLLER_BTN_TAG_SD){
UILabel *label = (UILabel *)[button viewWithTag:CONTROLLER_LABEL_TAG_SD];
label.textColor = XBlue;
[rButton setTitle:NSLocalizedString(@"标清", nil) forState:UIControlStateNormal];
//[rButton setTitle:NSLocalizedString(@"SD", nil) forState:UIControlStateNormal];
}else if (tag == CONTROLLER_BTN_TAG_LD){
UILabel *label = (UILabel *)[button viewWithTag:CONTROLLER_LABEL_TAG_LD];
label.textColor = XBlue;
[rButton setTitle:NSLocalizedString(@"流畅", nil) forState:UIControlStateNormal];
//[rButton setTitle:NSLocalizedString(@"LD", nil) forState:UIControlStateNormal];
}
[self didHiddenResolutionInterface];
}
-(void)didHiddenResolutionInterface{
[UIView animateWithDuration:0.2 animations:^{
CGRect controllerRight = self.controllerRight.frame;
controllerRight.origin.y = _horizontalScreenH;
self.controllerRight.frame = controllerRight;
self.controllerRightBg.frame = controllerRight;
} completion:^(BOOL finished) {
self.isAlreadyShowResolution = NO;
}];
}
#pragma mark - 隐藏监控连接中的UI
-(void)hiddenMonitoringUI:(BOOL)isHidden callErrorInfo:(NSDictionary*)info isReCall:(BOOL)isReCall{
if (isHidden) {
[self.yProgressView stop];
[self.yProgressView setHidden:YES];
//
// [self.labelTip setHidden:YES];
[self.promptButton setEnabled:NO];
[self.promptButton setHidden:YES];
[self.stopBtnH setEnabled:YES];
}else{
if (isReCall) {
self.yProgressView.backgroundView.image = LXImageWithImageName(@"monitor_press.png");
[self.yProgressView start];
// self.labelTip.text = [NSString stringWithFormat:@"%@",NSLocalizedString(@"monitor_out_prompt", nil)];
[self.promptButton setEnabled:NO];
//self.stopImageViewH.image = LXImageWithImageName(@"monitor_stop_h.png");
[self.stopBtnH setBackgroundImage:LXImageWithImageName(@"monitor_stop_h.png") forState:UIControlStateNormal];
//
[self.stopBtnH setEnabled:NO];
}else{
if (_isStop) {
//
self.yProgressView.angle = 0.0f;
self.yProgressView.backgroundView.image = LXImageWithImageName(@"ifishCamera_start");
//int errorFlag = [[info objectForKey:@"errorFlag"] intValue];
// self.labelTip.text = [self getCallErrorStringWith:errorFlag];
//self.stopImageViewH.image = LXImageWithImageName(@"monitor_on_h.png");
[self.stopBtnH setBackgroundImage:LXImageWithImageName(@"monitor_on_h.png") forState:UIControlStateNormal];
}else{
self.yProgressView.angle = 0.0f;
self.yProgressView.backgroundView.image = LXImageWithImageName(@"ifishCamera_start");
//int errorFlag = [[info objectForKey:@"errorFlag"] intValue];
//int errorFlag = CALL_ERROR_HANGUP ;
// self.labelTip.text = [self getCallErrorStringWith:errorFlag];
[self.stopBtnH setBackgroundImage:LXImageWithImageName(@"monitor_on_h.png") forState:UIControlStateNormal];
}
self.yProgressView.angle = 0.0f;
[self.yProgressView stop];
//int errorFlag = [[info objectForKey:@"errorFlag"] intValue];
//self.labelTip.text = [self getCallErrorStringWith:errorFlag];
[self.promptButton setEnabled:YES];
[self.stopBtnH setEnabled:YES];
}
[self.yProgressView setHidden:NO];
// [self.labelTip setHidden:NO];
[self.promptButton setHidden:NO];
[self.canvasView bringSubviewToFront:self.promptButton];
}
}
-(void)didHiddenMonitorUIWith:(BOOL)isAfterRender{
if (!isAfterRender) {
[self.controllerRightBg setAlpha:0.0];
[self.controllerRight setAlpha:0.0];
[self.bottomView setAlpha:0.0];
[self.bottomBarView setAlpha:0.0];
[self.customBorderButton setAlpha:0.0];
[self.leftView setAlpha:0.0];
[self.focalLengthView setAlpha:0.0];
[self.pressView setAlpha:0.0];
}else{
[self.controllerRightBg setAlpha:0.5];
[self.controllerRight setAlpha:1.0];
[self.bottomView setAlpha:0.5];
[self.bottomBarView setAlpha:1.0];
[self.customBorderButton setAlpha:0.5];
[self.leftView setAlpha:0.5];
[self.focalLengthView setAlpha:1.0];
[self.pressView setAlpha:1.0];
}
}
#pragma mark - 点击手势(单击)
-(void)onSingleTap
{
}
#pragma mark - openGLViewDelegate
-(void)onScreenShotted:(UIImage*)image
{
}
@end
@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB" customClass="IfishP2PVideoPlayView">
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Rqq-4f-ctH">
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WZn-QN-Ofd">
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="KhV-XU-A6Q" customClass="ProgressImageView">
<rect key="frame" x="135" y="64" width="50" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vyn-Jm-LDF" customClass="OpenGLView">
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<view alpha="0.5" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bBc-Xz-ZzV">
<rect key="frame" x="0.0" y="144" width="320" height="36"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES" heightSizable="YES"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gek-5l-Orh">
<rect key="frame" x="8" y="7" width="24" height="22"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="monitor_stop_h.png"/>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uPB-Ne-IO9">
<rect key="frame" x="286" y="5" width="26" height="26"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<state key="normal" backgroundImage="monitor_switch_screen_img_h.png"/>
</button>
</subviews>
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<gestureRecognizers/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<connections>
<outlet property="canvasView" destination="Rqq-4f-ctH" id="Zfd-bY-3al"/>
<outlet property="midToolHView" destination="bBc-Xz-ZzV" id="h13-hh-vgr"/>
<outlet property="promptButton" destination="WZn-QN-Ofd" id="TSg-yd-YjJ"/>
<outlet property="remoteView" destination="vyn-Jm-LDF" id="0CE-M1-Fdo"/>
<outlet property="stopBtnH" destination="gek-5l-Orh" id="3rL-UF-6Lh"/>
<outlet property="switchScreenButtonH" destination="uPB-Ne-IO9" id="U6m-yX-OiT"/>
<outlet property="yProgressView" destination="KhV-XU-A6Q" id="p87-Hy-cqD"/>
</connections>
<point key="canvasLocation" x="-332" y="-226"/>
</view>
</objects>
<resources>
<image name="monitor_stop_h.png" width="46" height="68"/>
<image name="monitor_switch_screen_img_h.png" width="90" height="68"/>
</resources>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
</simulatedMetricsContainer>
</document>
@@ -1,14 +0,0 @@
//
// WoDeKanKanViewCell.h
// Ifish
//
// Created by imac on 16/11/9.
// Copyright © 2016年 lianxiang. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface WoDeKanKanViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet UIButton *editBtn;
@end
@@ -1,24 +0,0 @@
//
// WoDeKanKanViewCell.m
// Ifish
//
// Created by imac on 16/11/9.
// Copyright © 2016 lianxiang. All rights reserved.
//
#import "WoDeKanKanViewCell.h"
@implementation WoDeKanKanViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end
@@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_0" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="WoDeKanKanViewCell" id="KGk-i7-Jjw" customClass="WoDeKanKanViewCell">
<rect key="frame" x="0.0" y="0.0" width="320" height="210"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="320" height="209"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankan_listbanner.jpg" translatesAutoresizingMaskIntoConstraints="NO" id="bJs-Is-3Jm">
<rect key="frame" x="8" y="8" width="304" height="170"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankanlook_icon_attention.png" translatesAutoresizingMaskIntoConstraints="NO" id="cJK-on-p4b">
<rect key="frame" x="8" y="186" width="12" height="12"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankanlook_icon_sentiment.png" translatesAutoresizingMaskIntoConstraints="NO" id="mCQ-ze-x6U">
<rect key="frame" x="74" y="186" width="12" height="12"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankanlook_icon_active.png" translatesAutoresizingMaskIntoConstraints="NO" id="jvh-za-aWz">
<rect key="frame" x="146" y="186" width="12" height="12"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="10000人关注" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fd3-BS-Gaf">
<rect key="frame" x="22" y="183" width="44" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="7"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="100人气" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nSG-KF-SM0">
<rect key="frame" x="94" y="182" width="38" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="7"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="活跃度:优" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="HsV-mT-5eu">
<rect key="frame" x="166" y="183" width="42" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="7"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankanlook_icon_clock.png" translatesAutoresizingMaskIntoConstraints="NO" id="Aho-Ot-rEi">
<rect key="frame" x="250" y="186" width="12" height="12"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="已开播10天" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PLz-E0-k1v">
<rect key="frame" x="270" y="183" width="42" height="21"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="7"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="dDY-xU-j3a">
<rect key="frame" x="22" y="155" width="12" height="13"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.40784313725490196" green="0.65490196078431373" blue="0.99215686274509807" alpha="1" colorSpace="calibratedRGB"/>
</view>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0L3-IR-bvv">
<rect key="frame" x="232" y="26" width="65" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.40318834460000003" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<state key="normal" title="编辑资料"/>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="kankanlook_icon_editor.png" translatesAutoresizingMaskIntoConstraints="NO" id="D6S-Uh-hl4">
<rect key="frame" x="232" y="27" width="17" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" heightSizable="YES" flexibleMaxY="YES"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="right" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JFr-4m-Agk">
<rect key="frame" x="14" y="152" width="61" height="18"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.40318834459459457" colorSpace="calibratedRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="10"/>
<state key="normal" title="直播中"/>
</button>
</subviews>
</tableViewCellContentView>
<connections>
<outlet property="editBtn" destination="0L3-IR-bvv" id="ZKB-71-Ook"/>
</connections>
<point key="canvasLocation" x="-140" y="-45"/>
</tableViewCell>
</objects>
<resources>
<image name="kankan_listbanner.jpg" width="1080" height="503"/>
<image name="kankanlook_icon_active.png" width="9" height="9"/>
<image name="kankanlook_icon_attention.png" width="9" height="9"/>
<image name="kankanlook_icon_clock.png" width="9" height="9"/>
<image name="kankanlook_icon_editor.png" width="10" height="10"/>
<image name="kankanlook_icon_sentiment.png" width="8" height="10"/>
</resources>
</document>
@@ -1,15 +0,0 @@
//
// WoDeKanKanViewController.h
// Ifish
//
// Created by imac on 16/11/9.
// Copyright © 2016年 lianxiang. All rights reserved.
//
#import "BaseViewController.h"
@interface WoDeKanKanViewController : BaseViewController
@end
@@ -1,136 +0,0 @@
//
// WoDeKanKanViewController.m
// Ifish
//
// Created by imac on 16/11/9.
// Copyright © 2016 lianxiang. All rights reserved.
//
#import "WoDeKanKanViewController.h"
#import "WoDeKanKanViewCell.h"
#import "MineKankanEditViewController.h"
@interface WoDeKanKanViewController ()<UITableViewDelegate,UITableViewDataSource>
@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong) NSMutableArray *dataArr;
@end
@implementation WoDeKanKanViewController
- (void)viewDidLoad {
[super viewDidLoad];
//
[self addTitleViewWithTitle:@"我的看看"];
[self creatTab];
}
-(void)creatTab{
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0,0,self.view.frame.size.width,self.view.frame.size.height ) style:UITableViewStylePlain];
self.tableView.delegate = self;
self.tableView.dataSource = self;
self.tableView.scrollEnabled = YES;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.showsVerticalScrollIndicator = NO;
self.tableView.backgroundColor = TABLE_BACKGROUD_COLOR;
[self.view addSubview:self.tableView];
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 20;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
WoDeKanKanViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"WoDeKanKanViewCell"];
if (!cell) {
cell = [[[NSBundle mainBundle]loadNibNamed:@"WoDeKanKanViewCell" owner:self options:nil]lastObject];
}
[cell.editBtn addTarget:self action:@selector(editBtnAction) forControlEvents:UIControlEventTouchUpInside];
return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
if (section == 0) {
return 0;
}else{
return 20;
}
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return kScreenSize.width*0.65;
}
-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
UIView*view = nil;
if (section!=0) {
view= [[UIView alloc] initWithFrame:CGRectMake(0, 0, kScreenSize.width, 20)];
view.backgroundColor = RGB(242, 242, 242);
}
return view;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[tableView deselectRowAtIndexPath:indexPath animated:YES];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)editBtnAction{
MineKankanEditViewController *editVC = [[MineKankanEditViewController alloc] init];
[self.navigationController pushViewController:editVC animated:YES];
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
@@ -23,7 +23,6 @@
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
//[self creatPalyer];
self.view.backgroundColor= [UIColor colorWithPatternImage:[UIImage imageNamed:@"enter_background"]];
//
[self.moviePlayer play];
@@ -8,13 +8,12 @@
#import <UIKit/UIKit.h>
#import "TouchButton.h"
#import "OpenGLView.h"
#import "P2PClient.h"
#import <AVFoundation/AVFoundation.h>
#import "CustomBorderButton.h"
#import "CustomView.h"
#import "ProgressImageView.h"
#import "KanHuListModel.h"
#import <GWP2P/GWP2P.h>
//竖屏
#define STOPBTN_TAG 1603227
#define SOUND_BUTTON_H_TAG 1603221
@@ -34,14 +33,12 @@
@interface ShopKanHuP2PViewController : BaseViewController <AVCaptureVideoDataOutputSampleBufferDelegate, UIGestureRecognizerDelegate,
TouchButtonDelegate,
OpenGLViewDelegate,
UIScrollViewDelegate,
UIAlertViewDelegate,
P2PClientDelegate,
KanHuBaoGaoViewDelegate>
@property (nonatomic, strong) OpenGLView *remoteView;
@property (nonatomic, strong) UIView *remoteView;
@property (nonatomic,strong) KanHuListModel *kanHuCamera;
@property (nonatomic) BOOL isPlaying;
@property (nonatomic) BOOL isReject;
@@ -64,7 +61,8 @@
@property (nonatomic) BOOL isAlreadyShowResolution;//重新调整监控画面
@property (nonatomic) BOOL isDefenceOn;//重新调整监控画面
//监控画面
Strong GWP2PVideoPlayer *player;
@property (assign,nonatomic) BOOL isFullScreen;
@property (strong, nonatomic) UIView *fullScreenBgView;
@@ -110,7 +108,6 @@
@property (assign,nonatomic) BOOL isIntoMonitorFromMonitor;
//下半部生成报告部分 竖屏显示 全屏时,隐藏
//@property (nonatomic,strong) KanHuBaoGaoView *baoGaoToolHView;
@property (nonatomic,strong) UIView *HbootmView;
@property (nonatomic,strong) NSDictionary*baGaoDic;
@property (nonatomic,strong) NSArray *pinFenArray;
@@ -73,6 +73,7 @@ extern BOOL launchedByNotification;
[self.rightButton addTarget:self action:@selector(rightBtnClick:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:self.tableView];
[self.view addSubview:self.comboxView];
[self.comboxView loadInfoWithTitle:@[@"删除"] Icons:@[@"ifishdropview_delect_device"]];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
@@ -123,10 +124,6 @@ extern BOOL launchedByNotification;
-(MessageAlertView *)comboxView{
if (!_comboxView) {
_comboxView = [[MessageAlertView alloc]initWithFrame:RECT(screen_width - kSizeFrom750(220), 0, kSizeFrom750(220), kSizeFrom750(90))];
_comboxView.transform = CGAffineTransformScale(self.comboxView.transform,0.01,0.01);
_comboxView.layer.position = CGPointMake(screen_width - kSizeFrom750(220)/2, 0);
_comboxView.layer.anchorPoint = CGPointMake(0.5, 0);
_comboxView.hidden = YES;
WEAK_SELF;
//
_comboxView.comboxBlock = ^(NSInteger tag) {
@@ -210,13 +210,9 @@ extern BOOL isfromCameraView;
-(void)loginGewellWith:(UserModel *)model
{
NSString *accountId =[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
if ([accountId isEqualToString:@"0"]) {
[self.view makeToast:@"暂未检测到设备"];
return;
}
@@ -51,18 +51,15 @@
@interface IfishP2PMonitorController : UIViewController<
AVCaptureVideoDataOutputSampleBufferDelegate,UIGestureRecognizerDelegate,TouchButtonDelegate,UIScrollViewDelegate,UIAlertViewDelegate,MonitorBottomCollcetionSelectDelegate,LxPopViewDelegate,CameraBottomHViewDelegate,IfishSegmentViewDelegate>
//@property (nonatomic, strong) OpenGLView *remoteView;
@property (nonatomic, strong) GWP2PVideoPlayer *player;//摄像头页面
@property (nonatomic) BOOL isReject;
@property (nonatomic) BOOL isFullScreen4B3;
@property (nonatomic) BOOL isShowControllerBar;
@property (nonatomic) BOOL isShowVToolBar;
@property (nonatomic) BOOL isVideoModeHD;
//@property (strong, nonatomic) MBProgressHUD *progressAlert;
@property (nonatomic,strong) IfishCameraModel *contact;
@property (nonatomic,strong) UIScrollView *scrollView;//监控界面缩放
@property (nonatomic) BOOL isScale;//监控界面缩放
@property (strong, nonatomic) UIView *bottomView;//重新调整监控画面
@property (strong, nonatomic) UIView *pressView;
@property (nonatomic) BOOL isTalking;
@@ -113,7 +110,6 @@
@property (nonatomic,strong) UIView *canvasView; //显示监控画面的载体
@property (assign,nonatomic) CGRect canvasframe;
@property (nonatomic,strong) UIButton *promptButton;
@property (nonatomic,strong) UILabel *labelTip;
@property (strong, nonatomic) ProgressImageView *yProgressView;
@property (nonatomic,strong) UIView *midToolHView; //全屏时,隐藏
@property (nonatomic,strong) CameraBottomHView *bottomToolHView; //全屏时,隐藏
@@ -121,13 +117,7 @@
//YES表示当前处于监控中,且接收到推送,点击观看监控
@property (assign,nonatomic) BOOL isIntoMonitorFromMonitor;
//分享工具栏 竖屏显示 全屏时,隐藏
//@property (nonatomic,strong) UIView *midSecondToolHView;
//@property (nonatomic,strong) UISegmentedControl *segmentControl;
@property (nonatomic,strong) IifshSegmentView *segControl;
//@property (nonatomic,strong) UIButton *soundButtonH;
@property (nonatomic,strong) UIButton *stopBtnH;
@property (nonatomic,strong) UIImageView *stopImageViewH;
@property (nonatomic,strong) UIButton *switchScreenButtonH;
File diff suppressed because it is too large Load Diff
@@ -7,55 +7,34 @@
//
#import "YooseeNextConnectViewController.h"
#import "elian.h"
#import "WaitingPageView.h"
#define WAITING_CONTENT_VIEW_HEIGHT 300
#define NAVIGATION_BAR_HEIGHT ([[[UIDevice currentDevice] systemVersion] floatValue] < 7.0 ? (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 44:44):(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad ? 64:64))
#import "AppDelegate.h"
#include <arpa/inet.h>
#include <ifaddrs.h>
#import <SystemConfiguration/CaptiveNetwork.h>
#import "Toast+UIView.h"
#import "ContactDAO.h"
#import "Contact.h"
#import "AppDelegate.h"
#import "Constants.h"
#import "P2PClient.h"
#import "FListManager.h"
#import "Toast+UIView.h"
#import "MBProgressHUD.h"
#import "UDManager.h"
#import "LoginResult.h"
#import "Utils.h"
#import <GWP2P/MD5Manager.h>
#import "RightViewController.h"
#import "LeftViewController.h"
#import "ICSDrawerController.h"
#import "UDPManager.h"
#import "YooseeCenterViewController.h"
#import "Socketsingleton.h"
#import "IfishCameraModel.h"
#import "FListManager.h"
#define GIWEI_INITPASS @"123"
#import "IfishP2PMonitorController.h"
#import "LSemTMFSet.h"
#import "LXWaveProgressView.h"
#import "IfishConnectingView.h"
#import "PushMasssageWebViewController.h"
#import "IfishUserObsever.h"
#import <GWP2P/GWP2P.h>
typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
lodingViewdissMissSuccsess=0,// default is 0
lodingViewdissMissfail,
lodingViewdissMissAlreadyBinded
};
@interface YooseeNextConnectViewController ()<UITextFieldDelegate,P2PClientDelegate,LSemTMFSetDelegate,UIAlertViewDelegate>
@interface YooseeNextConnectViewController ()<UITextFieldDelegate,UIAlertViewDelegate>
{
void *_context;
BOOL _bQuit;
@@ -84,6 +63,8 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
@property(nonatomic,strong) LXWaveProgressView *waveProgressView;;
@property(nonatomic,strong) IfishConnectingView *connectingView;
@property (copy, nonatomic) NSString *deviceID;//设备id
@property (assign, nonatomic) BOOL isDeviceLinkIn;//是否已经连接智能设备
@end
@@ -93,18 +74,16 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
[super viewDidLoad];
//智能联机
_initPwSuc = NO;
_isDeviceLinkIn = NO;
self.conectType = conectType_Intelligent;
self.addresses = [[NSMutableDictionary alloc] initWithCapacity:1];
self.view.backgroundColor = [UIColor whiteColor];
[self addTitleViewWithTitle:@"连接摄像头"];
[self initComponent];
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
self.navigationItem.backBarButtonItem = item;
//
[self soundInit];
_canDissMissController = YES;
//添加警告内容
[self redTipLable];
}
@@ -116,29 +95,12 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
_redTipLable.font=[UIFont systemFontOfSize:13];
_redTipLable.textColor=[UIColor redColor];
[_redTipLable sizeToFit];
// _redTipLable.backgroundColor=[UIColor blackColor];
[self.view addSubview:_redTipLable];
[self.view bringSubviewToFront:_redTipLable];
}
return _redTipLable;
}
#pragma mark - 声波SDK初始化
-(void)soundInit{
[[LSemTMFSet sharedInstance] setDelegate:self];
int soundCode=[[LSemTMFSet sharedInstance]initSDK:@"gwelltimes"
client:@"gwelltimes"
productModel:@"gm8135s-8136"
license:@"11625ae8060111e6b5123e1d05defe78"];
NSLog(@"声波初始化的结果码:%d",soundCode);
_soundInitCode = soundCode;
if (soundCode!=1) {//如果不能正常使用SDK,就不让发送SDK
//
[self.view makeToast:@"声波初始化失败"];
}
}
//获取WiFi信息
- (id)fetchSSIDInfo
{
NSArray *ifs = (id)CFBridgingRelease(CNCopySupportedInterfaces());
@@ -161,401 +123,22 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:RECEIVE_REMOTE_MESSAGE object:nil];
_bQuit = YES;
if (_context){
elianStop(_context);
elianDestroy(_context);
_context = NULL;
}
self.isWaiting = NO;//isWaiting is NO
self.isFinish = YES;
self.isRun = NO;
if(self.socket){
[self.socket close];
self.socket=nil;
}
[self soundExit];
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
}
-(void)viewWillAppear:(BOOL)animated{
[super viewWillAppear:animated];
_bQuit = NO;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveRemoteMessage:) name:RECEIVE_REMOTE_MESSAGE object:nil];
//[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(wifiviewkeyboradWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil];
[self setSoket];
}
- (void)receiveRemoteMessage:(NSNotification *)notification{
_initPwSuc = YES;
NSDictionary *parameter = [notification userInfo];
int key = [[parameter valueForKey:@"key"] intValue];
NSString * contactName = [NSString stringWithFormat:@"Cam%@", self.contactID];
switch(key){
case RET_SET_INIT_PASSWORD:
{
int result = [[parameter valueForKey:@"result"] intValue];
if(result==0){
ContactDAO *contactDAO = [[ContactDAO alloc] init];
Contact *contact = [contactDAO isContact:self.contactID];
if(contact!=nil){
contact.contactName = contactName;
contact.contactPassword = self.lastSetPassword;//updatepwd
[[FListManager sharedFList] updatee:contact];
dispatch_async(dispatch_get_main_queue(), ^{
// [self.view makeToast:NSLocalizedString(@"operator_success", nil)];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
//不同
//设置密码成功后爱鱼奇用户绑定摄像头
//
[self ifishUserBindcameraIdBy:self.contactID];
});
});
});
}else{
Contact *contact = [[Contact alloc] init];
contact.contactId = self.contactID;
contact.contactName = contactName;
contact.contactPassword = self.lastSetPassword;
contact.contactType = CONTACT_TYPE_UNKNOWN;
[[FListManager sharedFList] insert:contact];
[[P2PClient sharedClient] getContactsStates:[NSArray arrayWithObject:contact.contactId]];
[[P2PClient sharedClient] getDefenceState:contact.contactId password:contact.contactPassword];
//contact 原始数据暂不动 现在摄像头数据 模型用IfishCameraModel
dispatch_async(dispatch_get_main_queue(), ^{
// [self.view makeToast:NSLocalizedString(@"operator_success", nil)];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
//设置密码成功后爱鱼奇用户绑定摄像头
[self ifishUserBindcameraIdBy:self.contactID];
});
});
});
}
}else if(result==43){
dispatch_async(dispatch_get_main_queue(), ^{
self.lodviewMissStyle =lodingViewdissMissSuccsess;
[self mmPogressHUDdismiss];
[self connectNormalView];
_canDissMissController = YES;
[self.view makeToast:NSLocalizedString(@"device_already_exist_password", nil)];
});
}else{
dispatch_async(dispatch_get_main_queue(), ^{
//只为做 dissPogress处理并非成功
self.lodviewMissStyle =lodingViewdissMissSuccsess;
[self mmPogressHUDdismiss];
[self connectNormalView];
_canDissMissController = YES;
[self.view makeToast:NSLocalizedString(@"operator_failure", nil)];
});
}
}
break;
case RET_SET_DEVICE_PASSWORD:
{
NSInteger result = [[parameter valueForKey:@"result"] intValue];
if(result==0){
dispatch_async(dispatch_get_main_queue(), ^{
//[self.view makeToast:NSLocalizedString(@"operator_success", nil)];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
[self ifishUserBindcameraIdBy:self.contactID];
});
});
});
}else{
dispatch_async(dispatch_get_main_queue(), ^{
self.lodviewMissStyle =lodingViewdissMissSuccsess;
[self mmPogressHUDdismiss];
[self connectNormalView];
_canDissMissController = YES;
[self.view makeToast:NSLocalizedString(@"operator_failure", nil)];
});
}
}
break;
}
}
-(void)setWindowRootWith:(IfishCameraModel *)cameraMdel{
Socketsingleton *soket=[Socketsingleton sharedInstance];
if (soket.clientSocket.isConnected) {
[soket cutOffSocket];
}
IfishP2PMonitorController *monitorVC=[[IfishP2PMonitorController alloc] init];
monitorVC.contact = cameraMdel;
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:monitorVC];
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
app1.window.rootViewController=nav;
//绑定成功 加 经验值
[[IfishUserObsever sharedInstance] xinZengJingYanZhi:IFISHADDEXP_BIDCAMERA addType:IFISHADDEXPTYPE1];
}
-(void)viewDidAppear:(BOOL)animated{
[super viewDidAppear:animated];
}
-(void)setSoket{
self.isRun = YES;
self.isPrepared = NO;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
while(self.isRun){//不断广播获取设置好WIFI的设备
if(!self.isPrepared){
[self prepareSocket];
}
usleep(1000000);
}
});
}
-(BOOL)prepareSocket{
GCDAsyncUdpSocket *socket = [[GCDAsyncUdpSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)];
NSError *error = nil;
if (![socket bindToPort:9988 error:&error])
{
//NSLog(@"Error binding: %@", [error localizedDescription]);
return NO;
}
if (![socket beginReceiving:&error])
{
NSLog(@"Error receiving: %@", [error localizedDescription]);
return NO;
}
if (![socket enableBroadcast:YES error:&error])
{
NSLog(@"Error enableBroadcast: %@", [error localizedDescription]);
return NO;
}
self.socket = socket;
self.isPrepared = YES;
return YES;
}
#pragma mark - 空中发包,给设备设置wifi
- (void)startSetWifiLoop
{
//ssid
const char *ssid = [self.wifiName cStringUsingEncoding:NSUTF8StringEncoding];
//authmode
int authmode = 9;//delete
//pwd
const char *password = [self.wifiSecFiled.text cStringUsingEncoding:NSUTF8StringEncoding];//NSASCIIStringEncoding
//target
unsigned char target[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
_context = elianNew(NULL, 0, target, ELIAN_SEND_V1 | ELIAN_SEND_V4);
elianPut(_context, TYPE_ID_AM, (char *)&authmode, 1);//delete
elianPut(_context, TYPE_ID_SSID, (char *)ssid, strlen(ssid));
elianPut(_context, TYPE_ID_PWD, (char *)password, strlen(password));
elianStart(_context);
}
#pragma mark - 使用90秒来进行空中发包,给设备设置wifi
-(void)setWifiAniminte{
self.isWaiting = YES;
__weak typeof(self) weakself= self;
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
int index = 0;
while(weakself.isWaiting){
NSLog(@"%i",index);
index++;
if (weakself.conectType == conectType_Intelligent){
//startSetWifiLoop
if (index >= 21 && index <= 30)
{
if (index == 21)
{
elianStop(_context);
}
}
else if (index >= 51 && index <= 60)
{
if (index == 51)
{
elianStop(_context);
}
}
else if (index >= 81)
{
if (index == 81)
{
elianStop(_context);
}
}
else
{
if (index==31 || index==61)
{
elianStart(_context);
}
}
if(index>=90)
{//90
[weakself soundSendStop];
NSLog(@"声波发送时间达上限,停止发送");
break;
}
}
else
{
if(index>=60)
{//60
break;
}
}
sleep(1.0);
}
if(!weakself.isFinish){
if (weakself.conectType == conectType_Intelligent){//startSetWifiLoop
if (_context){
elianStop(_context);
elianDestroy(_context);
_context = NULL;
//dispatch_async(, <#^(void)block#>)
[weakself connectNormalView];
_canDissMissController = YES;
weakself.lodviewMissStyle =lodingViewdissMissfail;
[weakself mmPogressHUDdismiss];
NSLog(@"设置WIFI失败,停止");
}//设置WIFI失败,停止
}
}
});
}
#pragma mark - 声波开始发送
-(void)soundSendStart{
NSLog(@"开始发送声波");
NSString* strWiFiName=self.wifiName;
NSString* strWiFiPwd=self.wifiSecFiled.text;
NSLog(@"要发送的WiFi是:%@,其密码是:%@",self.wifiName,self.wifiSecFiled.text);
[[LSemTMFSet sharedInstance] sendWiFiSet:strWiFiName password:strWiFiPwd];
}
#pragma mark - 声波停止发送
-(void)soundSendStop{
NSLog(@"停止发送声波");
[[LSemTMFSet sharedInstance] stopSend];
[[LSemTMFSet sharedInstance] cancleConnectTimer];
}
#pragma mark - 声波SDK退出和释放
-(void)soundExit{
NSLog(@"退出声波SDK");
[self soundSendStop];
[[LSemTMFSet sharedInstance] exitEMTMFSDK];
}
#pragma mark - 声波的几个协议
- (void)didSetWifiResultErrcode:(EMTMFErrcodeType*)errcode content:(NSString*)content{
if (errcode==(EMTMFErrcodeType*)EMTMFErrcodeType_SUCESS){
NSLog(@"声波配对成功");
NSLog(@"content%@",content);
[self soundSendStop];
}else{
NSLog(@"声波配对失败content%@,重新发送",content);
[self soundSendStart];
}
}
- (void)didFSKSendingComplete{
[[LSemTMFSet sharedInstance] startConnectTimeOutListener:1];//暂停1秒,然后继续发送声波
}
-(void)didSDKErrcode:(int) errCode errMsg:(NSString*)errMsg{
NSLog(@"声波初始化结果码:%d,结果码解释:%@",errCode,errMsg);
}
-(void)dealloc{
[self soundExit];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
@@ -704,72 +287,6 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
}
-(void)initMMProgressHUD{
NSMutableArray *images = [[NSMutableArray alloc] init];
for (int i = 1; i <= 63; i ++) {
if (i < 10) {
[images addObject:[UIImage imageNamed:[NSString stringWithFormat:@"neves000%d",i]]];
}else{
[images addObject:[UIImage imageNamed:[NSString stringWithFormat:@"neves00%d",i]]];
}
}
_autodismiss = YES;//MMProgressHUDWindowOverlayModeLinear
[MMProgressHUD setPresentationStyle:MMProgressHUDPresentationStyleNone];
/**
* status: Custom Animated Image
*/
[MMProgressHUD showWithTitle:@"" status:@"" images:images];
}
-(void)mmPogressHUDdismiss{
// if (_autodismiss == YES) {
// double delayInSeconds = 2.0;
// dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
// dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
[self setMMProgressHUDMissStayle:self.lodviewMissStyle];
// });
// }
}
-(void)setMMProgressHUDMissStayle:(lodingViewdissMissStyle)missStyle{
switch (missStyle) {
case lodingViewdissMissSuccsess:
{
//[MMProgressHUD dismissWithSuccess:@""];
//[self.view makeToast:NSLocalizedString(@"connect_success", nil)];
}
break;
case lodingViewdissMissfail:
{
//[MMProgressHUD dismissWithError:@""];
[self.view makeToast:@"再试一下!"];
}
break;
case lodingViewdissMissAlreadyBinded:
{
//[MMProgressHUD dismissWithSuccess:@""];
[self.view makeToast:@"已经绑定过了!"];
}
default:
break;
}
}
-(void)showTitle:(NSString*)title messsage:(NSString*)message{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:title message:message delegate:nil cancelButtonTitle:nil otherButtonTitles:nil, nil];
NSTimeInterval dismissSeconds=1.0;
@@ -806,97 +323,11 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
CGSize sizeToFit = [value sizeWithFont:[UIFont systemFontOfSize:fontSize] constrainedToSize:CGSizeMake(width, CGFLOAT_MAX) lineBreakMode:NSLineBreakByCharWrapping];//此处的换行类型(lineBreakMode)可根据自己的实际情况进行设置
return sizeToFit.height;
}
#pragma mark - GCDAsyncUdpSocket
- (void)udpSocket:(GCDAsyncUdpSocket *)sock didSendDataWithTag:(long)tag
{
NSLog(@"did send");
}
- (void)udpSocketDidClose:(GCDAsyncUdpSocket *)sock withError:(NSError *)error
{
NSLog(@"error %@", error);
}
#pragma mark 搜索设备
- (void)udpSocket:(GCDAsyncUdpSocket *)sock didReceiveData:(NSData *)data
fromAddress:(NSData *)address
withFilterContext:(id)filterContext
{
NSLog(@"data%@",data);
//A buffer into which to copy the receiver's data. The buffer must be at least length bytes.
if (data) {
Byte receiveBuffer[1024];
//Copies a range of bytes from the receivers data into a given buffer.
[data getBytes:receiveBuffer length:1024];
if(receiveBuffer[0]==1){
NSString *host = nil;
uint16_t port = 0;
[GCDAsyncUdpSocket getHost:&host port:&port fromAddress:address];
int contactId = *(int*)(&receiveBuffer[16]);
int type = *(int*)(&receiveBuffer[20]);
int flag = *(int*)(&receiveBuffer[24]);
self.contactID = [NSString stringWithFormat:@"%d",contactId];
self.type = type;
self.flag = flag;
[self.addresses setObject:host forKey:[NSString stringWithFormat:@"%i",contactId]];
if(self.isWaiting){
self.isWaiting = NO;//isWaiting is NO
dispatch_async(dispatch_get_main_queue(), ^{
self.isFinish = YES;
if (self.conectType == conectType_Intelligent){//startSetWifiLoop
if (_context){
elianStop(_context);
elianDestroy(_context);
_context = NULL;
//设置WIFI成功
}
}
if (self.flag == 0){
//没有初始化过密码
[self initPaw];
}else if (self.flag == 1){
//设备默认已经初始化密码 有设备复位后会如此
[self modifyPassW];
}
//声波停止发送 声波SDK退出和释放
[self soundExit];
});
}
}
}
}
//初始化设备密码
-(void)initPaw{
NSString *newPassword = @"123";
self.lastSetPassword = [Utils GetTreatedPassword:newPassword];
//很容易设置失败?? 定时重发
[[P2PClient sharedClient] setInitPasswordWithId:self.contactID initPassword:self.lastSetPassword];
}
//已初始化密码修改密码
-(void)modifyPassW{
//密码
-(void)resetPassWord{
NSString *newPassword = @"123";
self.lastSetPassword = [Utils GetTreatedPassword:newPassword];
//NSString *oldPass= [Utils GetTreatedPassword:@"123"];
[[P2PClient sharedClient] setDevicePasswordWithId:self.contactID password:GIWEI_INITPASS newPassword:self.lastSetPassword];
}
#pragma mark - 搜索到设备,弹出添加设备提示 暂不用
@@ -918,7 +349,7 @@ withFilterContext:(id)filterContext
NSString *newPassword = GIWEI_INITPASS;
self.lastSetPassword = [Utils GetTreatedPassword:newPassword];;
[[P2PClient sharedClient] setInitPasswordWithId:self.contactID initPassword:self.lastSetPassword];
// [[P2PClient sharedClient] setInitPasswordWithId:self.contactID initPassword:self.lastSetPassword];
}else{
@@ -929,51 +360,148 @@ withFilterContext:(id)filterContext
if (buttonIndex ==1) {
[self.wifiSecFiled resignFirstResponder];
//NSString *pwdString = self.wifiSecFiled.text;
// if (!pwdString) {//ios<7.0
// pwdString = @"";
// }
if (self.wifiSecFiled.text.length<=0||[self.wifiName isEqualToString:@"无Wi-Fi"]) {
//[self.view makeToast:NSLocalizedString(@"link_wifi", nil)];
[self.view makeToast:@"请保证手机已连接wifi,且wifi密码不能为空"];
return;
}
// BOOL isRight =[dataContorl isIncludeSpecialCharact:self.wifiSecFiled.text];
//
// if (!isRight) {
// [self.view makeToast:@"Wifi密码不能包含特殊字符,只能为数字字母下划线"];
//
// return;
// }
if (!self.wifiName) {
[self.view makeToast:@"未检测到wifi"];
return;
}
//旧连接效果已去
//[self initMMProgressHUD];
//最新连接效果
self.wifiPwd = self.wifiSecFiled.text;
//显示连接中效果
[self connectNotNormalView];
_canDissMissController = NO;
//空中抓包方式
self.conectType = conectType_Intelligent;
[self savePassw];
[self startSetWifiLoop];//给设备设置wifi
[self setWifiAniminte];//直接调用,不用点击“听到了”按钮
//声波智能联机
[self smartLinkConnect];
self.isFinish = NO;
//声波配置方式
[self soundSendStart];
}
}
}
//智能联机
-(void)smartLinkConnect{
WEAK_SELF;
[[GWP2PDeviceLinker shareInstance] p2pSmartLinkDeviceWithWiFiSSID:weakSelf.wifiName password:weakSelf.wifiPwd useSimpleConfig:YES deviceLinkIn:^(NSDictionary *deviceDict) {
NSLog(@"声波配网成功,返回数据:%@",deviceDict);
if (weakSelf.isDeviceLinkIn) {
return;
}
weakSelf.isDeviceLinkIn = YES;
[self.view makeToast:@"声波配网成功"];
//如果智能联机,设备配网成功,就断开发送智能联机
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
NSString *deviceID = [deviceDict[@"deviceID"] stringValue];
NSString *deviceIP = deviceDict[@"deviceIP"];
weakSelf.contactID = [NSString stringWithFormat:@"%d",deviceID];
if (![deviceDict[@"isInitPassword"] boolValue]) { //设备没有初始化密码,设置密码
[[GWP2PClient sharedClient] setDeviceInitialPassword:@"123" withDeviceID:deviceIP completionBlock:^(GWP2PClient *client, BOOL success, NSDictionary<NSString *,id> *dataDictionary) {
NSLog(@"success:%i %@",success,dataDictionary);
[weakSelf resetPassWord];//初始化密码
if (success) {
[weakSelf initPwdResault:dataDictionary];
}else{
dispatch_async(dispatch_get_main_queue(), ^{
//只为做 dissPogress处理并非成功
weakSelf.lodviewMissStyle =lodingViewdissMissSuccsess;
[weakSelf connectNormalView];
_canDissMissController = YES;
[weakSelf.view makeToast:NSLocalizedString(@"operator_failure", nil)];
});
}
}];
} else { //设备已经初始化密码,可以让用户输入正确的密码验证通过后加到本地列表,这里直接使用123
[[GWP2PClient sharedClient] getMultipleDeviceStatusWithDeviceID:deviceIP password:@"123" completionBlock:^(GWP2PClient *client, BOOL success, NSDictionary<NSString *,id> *dataDictionary) {
NSLog(@"success:%i %@",success,dataDictionary);
[weakSelf resetPassWord];//更新密码
if (success) {
dispatch_async(dispatch_get_main_queue(), ^{
//[self.view makeToast:NSLocalizedString(@"operator_success", nil)];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
[weakSelf ifishUserBindcameraIdBy:self.contactID];
});
});
});
}else{
dispatch_async(dispatch_get_main_queue(), ^{
self.lodviewMissStyle =lodingViewdissMissSuccsess;
[self connectNormalView];
_canDissMissController = YES;
[self.view makeToast:NSLocalizedString(@"operator_failure", nil)];
});
}
}];
}
}];
}
//初始化设备密码回调
-(void)initPwdResault:(NSDictionary *)parameter{
NSString * contactName = [NSString stringWithFormat:@"Cam%@", self.contactID];
ContactDAO *contactDAO = [[ContactDAO alloc] init];
Contact *contact = [contactDAO isContact:self.contactID];
if(contact!=nil){
contact.contactName = contactName;
contact.contactPassword = self.lastSetPassword;//updatepwd
[[FListManager sharedFList] updatee:contact];
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
//设置密码成功后爱鱼奇用户绑定摄像头
[self ifishUserBindcameraIdBy:self.contactID];
});
});
});
}else{
Contact *contact = [[Contact alloc] init];
contact.contactId = self.contactID;
contact.contactName = contactName;
contact.contactPassword = self.lastSetPassword;
contact.contactType = CONTACT_TYPE_UNKNOWN;
[[FListManager sharedFList] insert:contact];
dispatch_async(dispatch_get_main_queue(), ^{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
usleep(800000);
dispatch_async(dispatch_get_main_queue(), ^{
//设置密码成功后爱鱼奇用户绑定摄像头
[self ifishUserBindcameraIdBy:self.contactID];
});
});
});
}
}
-(void)dealloc{
[[GWP2PDeviceLinker shareInstance] p2pStopSmartLink];
}
#pragma mark - UI正常状态
-(void)connectNormalView
@@ -1140,7 +668,6 @@ withFilterContext:(id)filterContext
if ([resultDic[@"result"] isEqualToString:@"100"]) {
self.lodviewMissStyle =lodingViewdissMissSuccsess;
_canDissMissController = YES;
[self mmPogressHUDdismiss];
[self connectNormalView];
@@ -1182,7 +709,6 @@ withFilterContext:(id)filterContext
}else{
//lodingViewdissMissSuccsess 只做移除loding效果
self.lodviewMissStyle =lodingViewdissMissSuccsess;
[self mmPogressHUDdismiss];
[self connectNormalView];
_canDissMissController = YES;
[self.view makeToast:@"绑定失败错误码101"];
@@ -1196,7 +722,19 @@ withFilterContext:(id)filterContext
}];
}
//绑定成功之后设置
-(void)setWindowRootWith:(IfishCameraModel *)cameraMdel{
IfishP2PMonitorController *monitorVC=[[IfishP2PMonitorController alloc] init];
monitorVC.contact = cameraMdel;
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:monitorVC];
UIApplication*app=[UIApplication sharedApplication];
AppDelegate*app1=(AppDelegate*)app.delegate;
app1.window.rootViewController=nav;
//绑定成功 加 经验值
[[IfishUserObsever sharedInstance] xinZengJingYanZhi:IFISHADDEXP_BIDCAMERA addType:IFISHADDEXPTYPE1];
}
@end
@@ -280,6 +280,7 @@
"cur_version_is" = "Current version is";
"can_update_to" = "Will update to";
"is_latest_version" = "Is the latest version";
"can_update_sd" = "Will update from SD card";
"start_update" = "Start to update";
"update_failed" = "Update Failed";
@@ -280,6 +280,7 @@
"cur_version_is" = "当前版本为";
"can_update_to" = "可升级至";
"is_latest_version" = "为最新版本";
"can_update_sd" = "能够从SD卡升级";
"start_update" = "开始更新";
"update_failed" = "更新失败";
@@ -10,11 +10,12 @@
NS_ASSUME_NONNULL_BEGIN
/**
*/
typedef void (^MessageComboBoxBlock)(NSInteger tag);
@interface MessageAlertView : UIView
Copy MessageComboBoxBlock comboxBlock;
-(void)loadInfoWithTitle:(NSArray *)titleArray Icons:(NSArray *)iconsArray;
@end
NS_ASSUME_NONNULL_END
@@ -12,46 +12,85 @@
-(instancetype)initWithFrame:(CGRect)frame{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = [UIColor blackColor];
UIRectCorner rectCorner = UIRectCornerBottomLeft|UIRectCornerBottomRight;
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:RECT(0, 0, kSizeFrom750(220), kSizeFrom750(90)) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(kSizeFrom750(6), kSizeFrom750(6))];
CAShapeLayer *shaperLayer = [CAShapeLayer layer];
shaperLayer.path = path.CGPath;
self.layer.mask = shaperLayer;
CAShapeLayer *borderLayer=[CAShapeLayer layer];
borderLayer.path = path.CGPath;
borderLayer.fillColor = [UIColor clearColor].CGColor;
// borderLayer.strokeColor = [UIColor blackColor].CGColor;
// borderLayer.lineWidth = 1;
borderLayer.frame = self.bounds;
[self initSubViews];
self.backgroundColor = RGB(40, 40, 40);
}
return self;
}
-(void)initSubViews
//-(void)initSubViews
//{
//
// NSArray *imageArr = @[@"ifishdropview_delect_device"];
// NSArray *titleArr = @[@"删除"];
// CGFloat contentHeight = kSizeFrom750(90);
// for (int i=0; i<imageArr.count; i++) {
// UIImageView *icons = [[UIImageView alloc]init];
//// [icons setContentMode:UIViewContentModeCenter];
// [self addSubview:icons];
// [icons setImage:IMAGEBYENAME([imageArr objectAtIndex:i])];
// [icons mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(kSizeFrom750(22)+contentHeight*i);
// make.left.mas_equalTo(kSizeFrom750(30));
// make.width.height.mas_equalTo(kSizeFrom750(46));
// }];
//
// UILabel *titleL = InitObject(UILabel);
// [titleL setTextColor:[UIColor whiteColor]];
// [titleL setFont:SYSTEMSIZE(30)];
// titleL.textAlignment = NSTextAlignmentCenter;
// [titleL setText:[titleArr objectAtIndex:i]];
// [self addSubview:titleL];
// [titleL mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.mas_equalTo(icons.mas_right);
// make.right.mas_equalTo(self);
// make.centerY.mas_equalTo(icons);
// make.height.mas_equalTo(kSizeFrom750(30));
//
// }];
//
// if (i!=imageArr.count-1) {
// UIView *line = InitObject(UIView);
// [line setBackgroundColor:[UIColor whiteColor]];
// [self addSubview:line];
// [line mas_makeConstraints:^(MASConstraintMaker *make) {
// make.left.mas_equalTo(icons.mas_right);
// make.height.mas_equalTo(1);
// make.right.mas_equalTo(self);
// make.bottom.mas_equalTo(icons);
// }];
// }
//
//
// UIButton *btn = InitObject(UIButton);
// [self addSubview:btn];
// btn.tag = i;
// [btn addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
// [btn mas_makeConstraints:^(MASConstraintMaker *make) {
// make.top.mas_equalTo(contentHeight*i);
// make.left.right.mas_equalTo(self);
// make.height.mas_equalTo(contentHeight);
// }];
// }
//}
-(void)loadInfoWithTitle:(NSArray *)titleArray Icons:(NSArray *)iconsArray
{
NSArray *imageArr = @[@"ifishdropview_delect_device"];
NSArray *titleArr = @[@"删除"];
CGFloat contentHeight = kSizeFrom750(90);
for (int i=0; i<imageArr.count; i++) {
for (int i=0; i<titleArray.count; i++) {
UIImageView *icons = [[UIImageView alloc]init];
// [icons setContentMode:UIViewContentModeCenter];
[icons setContentMode:UIViewContentModeScaleAspectFit];
[self addSubview:icons];
[icons setImage:IMAGEBYENAME([imageArr objectAtIndex:i])];
[icons setImage:IMAGEBYENAME([iconsArray objectAtIndex:i])];
[icons mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kSizeFrom750(22)+contentHeight*i);
make.top.mas_equalTo(kSizeFrom750(25)+contentHeight*i);
make.left.mas_equalTo(kSizeFrom750(30));
make.width.height.mas_equalTo(kSizeFrom750(46));
make.width.height.mas_equalTo(kSizeFrom750(40));
}];
UILabel *titleL = InitObject(UILabel);
[titleL setTextColor:[UIColor whiteColor]];
[titleL setFont:SYSTEMSIZE(30)];
titleL.textAlignment = NSTextAlignmentCenter;
[titleL setText:[titleArr objectAtIndex:i]];
[titleL setText:[titleArray objectAtIndex:i]];
[self addSubview:titleL];
[titleL mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(icons.mas_right);
@@ -61,18 +100,6 @@
}];
if (i!=imageArr.count-1) {
UIView *line = InitObject(UIView);
[line setBackgroundColor:[UIColor whiteColor]];
[self addSubview:line];
[line mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(icons.mas_right);
make.height.mas_equalTo(1);
make.right.mas_equalTo(self);
make.bottom.mas_equalTo(icons);
}];
}
UIButton *btn = InitObject(UIButton);
[self addSubview:btn];
@@ -80,10 +107,40 @@
[btn addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchUpInside];
[btn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(contentHeight*i);
make.left.right.mas_equalTo(self);
make.left.width.mas_equalTo(self);
make.height.mas_equalTo(contentHeight);
}];
if (i!=titleArray.count-1) {
UIView *line = InitObject(UIView);
[line setBackgroundColor:RGB(30, 30, 30)];
[self addSubview:line];
[line mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(ONE_PIXEL_SIZE);
make.left.width.mas_equalTo(self);
make.bottom.mas_equalTo(btn);
}];
}
}
self.frame = RECT(self.frame.origin.x, self.frame.origin.y, self.frame.size.width, kSizeFrom750(90)*titleArray.count);
[self layoutIfNeeded];
UIRectCorner rectCorner = UIRectCornerBottomLeft|UIRectCornerBottomRight;
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:RECT(0, 0, self.frame.size.width, self.frame.size.height) byRoundingCorners:rectCorner cornerRadii:CGSizeMake(kSizeFrom750(6), kSizeFrom750(6))];
CAShapeLayer *shaperLayer = [CAShapeLayer layer];
shaperLayer.path = path.CGPath;
self.layer.mask = shaperLayer;
CAShapeLayer *borderLayer=[CAShapeLayer layer];
borderLayer.path = path.CGPath;
borderLayer.fillColor = [UIColor clearColor].CGColor;
borderLayer.frame = self.bounds;
self.transform = CGAffineTransformScale(self.transform,0.01,0.01);
self.layer.position = CGPointMake(screen_width - kSizeFrom750(220)/2, 0);
self.layer.anchorPoint = CGPointMake(0.5, 0);
self.hidden = YES;
}
-(void)buttonClick:(UIButton *)sender{
if (self.comboxBlock) {
+2
View File
@@ -28,6 +28,8 @@
@property(nonatomic,copy) NSString *shopsUserId;
//用户类型 1 商家用户 0 普通用户
@property(nonatomic,copy) NSString *userType;
@property(nonatomic,copy) NSString *callId;//技威处理后的Id
//云信token
@property(nonatomic,copy) NSString *neteaseToken;
//v4.2 后已去字段
+1 -3
View File
@@ -30,7 +30,6 @@
}
-(void)initTabWithFrame{
UIImageView *bakc=[[UIImageView alloc] initWithFrame:CGRectMake(0, 10, self.frame.size.width, self.frame.size.height)];
@@ -38,8 +37,7 @@
//bakc.backgroundColor = [UIColor redColor];
[self addSubview:bakc];
self.tableView = [[UITableView alloc] init]
;
self.tableView = [[UITableView alloc] init];
self.tableView.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
//self.tableView.frame = CGRectMake(0,12.0, self.frame.size.width, self.frame.size.height);