EZDemo/HDLEZDemo/HDLEZDemo/AppDelegate.m
@@ -25,10 +25,10 @@ // Override point for customization after application launch. [[EZSDK sharedInstance] initLibWithAppKey:@"1aa98a90489b4838b966b57018b4b04b" globalAppKey:@"1aa98a90489b4838b966b57018b4b04b"]; // [[EZSDK sharedInstance] initLibWithAppKey:@"941b1b72b6294998acfd36c14931b675" globalAppKey:@"941b1b72b6294998acfd36c14931b675"]; [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiIyM2UwOTM3YjliNGU0YzU4YWUxMzRiODdlNzkxY2M0NSIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInRlbmFudElkIjoiMjAiLCJ1c2VyVHlwZSI6IlVTRVJfQyIsInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJOYW1lIjoiS2FlZGUiLCJ1c2VyRGF0YVJpZ2h0IjoiMSIsIm9wZW5BcHBsaWNhdGlvbklkIjoiMCIsInVzZXJJZCI6IjEzNTAyODA5OTU5OTg4NjMzNjEiLCJleHAiOjE2ODcxNzY4NDgsIm5iZiI6MTY4NzE2OTY0OH0.XqlQEtiyKvoVSo3HmDOW9LSRhdJI7KOGWEOLDCerb0Nod_rDnjPYvYuPct-vPGYhXklEqqcPz0vILHimmS3VpJj04O_5q_Rgsjnpp11rUJ2CxoqZmXAdpfis5HHeIj3n_UVg1exCjsyK-DOdEijIgaToGrLuHM5uvgfD_nvvNDI" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI2MWI3Y2Y4YmFlMjY0NzMyYjc5YjFiYWUzMzE3NzYxMSIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxMzUwMjgwOTk1OTk4ODYzMzYxIiwiZXhwIjoxNjg3Nzc0NDQ4LCJuYmYiOjE2ODcxNjk2NDh9.eUcIwEGgpX3xSLvLfSlyANsTNpi0IHGkspF2O3igyRIDUWcQcs8fPouLBzXf29y87_A9AuCURI6ZAj5OPnC9xafQkgnV9_KTBAG62kGTRbAGiOBiAtyJmD6HQ4zUuI8sNmzoI67ewhu2gCQPFPoHOlJ8duODpbSk3NkUrYvxL2k"]; [[EZSDK sharedInstance] setHDlAccessToken:@"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI0YThmMmEzYzEwNTc0ZmVhYjA5MjAxMjExNDY0NjZjMiIsImNvbXBhbnlJZCI6IjAiLCJyb2xlIjoiIiwiaGVhZGVyUHJlZml4IjoiQmVhcmVyICIsInRlbmFudElkIjoiMjAiLCJ1c2VyVHlwZSI6IlVTRVJfQyIsInRva2VuVHlwZSI6ImFjY2Vzc190b2tlbiIsInVzZXJOYW1lIjoiS2FlZGUiLCJ1c2VyRGF0YVJpZ2h0IjoiMSIsIm9wZW5BcHBsaWNhdGlvbklkIjoiMCIsInVzZXJJZCI6IjEzNTAyODA5OTU5OTg4NjMzNjEiLCJleHAiOjE2ODc2NzE5NzcsIm5iZiI6MTY4NzY2NDc3N30.XZlwfkpHjBFynLbt7bQt7toCV_nHtPTnPmjhbpwsnzrywE2zVZv_8HcvF6OaZZYORrb2DAHQ6hCagQ6mwwBu8dJ0IJM3GDj98WPwIJh9tbMA9zData1erk0nZto2HeP4jVVMFkBGcfdyZd2npeAOa38oAGvER18RCr_P_7u6vJs" refreshToken:@"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJqdGkiOiI4YmE0MjdmOTQ2MTU0YzUzYTAyZmZjYTE0MTY1M2YyNyIsImNvbXBhbnlJZCI6IjAiLCJoZWFkZXJQcmVmaXgiOiJCZWFyZXIgIiwidGVuYW50SWQiOiIyMCIsInRva2VuVHlwZSI6InJlZnJlc2hfdG9rZW4iLCJvcGVuQXBwbGljYXRpb25JZCI6IjAiLCJ1c2VySWQiOiIxMzUwMjgwOTk1OTk4ODYzMzYxIiwiZXhwIjoxNjg4Mjc2NjA2LCJuYmYiOjE2ODc2NzE4MDZ9.OaPGX7jUBaOJQKQdlrIACI68KKCitgH0Q_QdDX29R1LGe7wM2q2trlHgeX1si5NrJeBQo0W1zwdk5aFccAq64DqZs9Vl6B3QJZKs1EScQCHLhrZcBSL1z_mge2qkKyXTsLSMVIBYMRwcQg7dh7fXrofn50BhDjBDYqKS25t2Mn4"]; // [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://test-gz.hdlcontrol.com" platform:1 homeId:@"1547099040465408002"]; [[EZSDK sharedInstance] setRequestHttpsHostAndPlatform:@"https://nearest.hdlcontrol.com" platform:1 homeId:@"1546324800135176193"]; [[EZSDK sharedInstance] setEZAccessToken:@"ra.6noaub1s86aqfnbz56vp17q2cn7w5bqp-1lbac5acq7-1m25l9w-ai5d2u8gp"]; [[EZSDK sharedInstance] setEZAccessToken:@"ra.6zihimwgdtix1asfaq5ter8a37ukrvzl-9697ojgbfn-0xo05zz-tgxzohe4l"]; // [[EZSDK sharedInstance] setEZAccessToken:@"ra.3hkirwcadrpfmaa89wep99io3wto4yds-7zptb10d20-1wxg4f3-ygiojudee"]; EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_balance.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_balance@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_balance@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_balance.imageset/hdl_ez_cat_eyes_full_balance@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_balance.imageset/hdl_ez_cat_eyes_full_balance@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_exit.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_exit@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_exit@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_exit.imageset/hdl_ez_cat_eyes_full_exit@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_exit.imageset/hdl_ez_cat_eyes_full_exit@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hang_up.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_hang_up@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_hang_up@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hang_up.imageset/hdl_ez_cat_eyes_full_hang_up@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hang_up.imageset/hdl_ez_cat_eyes_full_hang_up@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hd_full.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_hd_full@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_hd_full@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hd_full.imageset/hdl_ez_cat_eyes_full_hd_full@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_hd_full.imageset/hdl_ez_cat_eyes_full_hd_full@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_pause.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_pause@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_pause@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_pause.imageset/hdl_ez_cat_eyes_full_pause@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_pause.imageset/hdl_ez_cat_eyes_full_pause@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_play.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_play@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_play@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_play.imageset/hdl_ez_cat_eyes_full_play@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_play.imageset/hdl_ez_cat_eyes_full_play@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_smooth.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_smooth@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_smooth@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_smooth.imageset/hdl_ez_cat_eyes_full_smooth@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_smooth.imageset/hdl_ez_cat_eyes_full_smooth@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_sound_off.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_sound_off@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_sound_off@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_sound_off.imageset/hdl_ez_cat_eyes_full_sound_off@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_sound_off.imageset/hdl_ez_cat_eyes_full_sound_off@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_volume.imageset/Contents.json
New file @@ -0,0 +1,22 @@ { "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "filename" : "hdl_ez_cat_eyes_full_volume@2x.png", "idiom" : "universal", "scale" : "2x" }, { "filename" : "hdl_ez_cat_eyes_full_volume@3x.png", "idiom" : "universal", "scale" : "3x" } ], "info" : { "author" : "xcode", "version" : 1 } } EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_volume.imageset/hdl_ez_cat_eyes_full_volume@2x.png
EZDemo/HDLEZDemo/HDLEZDemo/Assets.xcassets/hdl_ez_cat_eyes_full_volume.imageset/hdl_ez_cat_eyes_full_volume@3x.png
EZDemo/HDLEZDemo/HDLEZDemo/EZMain.storyboard
@@ -807,17 +807,16 @@ <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Xz-5f-ZJx"> <rect key="frame" x="0.0" y="0.0" width="375" height="211"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.047058823530000002" green="0.054901960780000002" blue="0.062745098040000002" alpha="1" colorSpace="calibratedRGB"/> <constraints> <constraint firstAttribute="width" secondItem="1Xz-5f-ZJx" secondAttribute="height" multiplier="16:9" id="7NS-WA-bEr"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="1Xz-5f-ZJx" firstAttribute="centerY" secondItem="NRj-hs-uOI" secondAttribute="centerY" id="DTc-SB-nnD"/> <constraint firstItem="1Xz-5f-ZJx" firstAttribute="top" secondItem="NRj-hs-uOI" secondAttribute="top" id="DTc-SB-nnD"/> <constraint firstAttribute="width" secondItem="NRj-hs-uOI" secondAttribute="height" multiplier="16:9" id="FHe-T4-BRJ"/> <constraint firstItem="1Xz-5f-ZJx" firstAttribute="width" secondItem="NRj-hs-uOI" secondAttribute="width" id="JfK-ti-Ys7"/> <constraint firstItem="1Xz-5f-ZJx" firstAttribute="height" secondItem="NRj-hs-uOI" secondAttribute="height" id="QcN-dO-GL9"/> <constraint firstAttribute="bottom" secondItem="1Xz-5f-ZJx" secondAttribute="bottom" id="ted-kP-rO7"/> <constraint firstAttribute="trailing" secondItem="1Xz-5f-ZJx" secondAttribute="trailing" id="wA6-Da-kWF"/> <constraint firstItem="1Xz-5f-ZJx" firstAttribute="centerX" secondItem="NRj-hs-uOI" secondAttribute="centerX" id="zUn-i2-2qZ"/> @@ -968,7 +967,7 @@ </connections> </button> </subviews> <color key="backgroundColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color key="backgroundColor" red="0.047058823529411764" green="0.054901960784313725" blue="0.062745098039215685" alpha="1" colorSpace="calibratedRGB"/> <constraints> <constraint firstItem="xSp-4i-Jwh" firstAttribute="top" secondItem="1FE-Su-4U4" secondAttribute="top" id="1W5-cF-JRC"/> <constraint firstItem="lTh-qe-8pV" firstAttribute="top" secondItem="1FE-Su-4U4" secondAttribute="top" id="HsY-AZ-lgd"/> @@ -1422,6 +1421,8 @@ <outlet property="playButton" destination="xSp-4i-Jwh" id="DUU-ap-reQ"/> <outlet property="playerPlayButton" destination="yYv-tJ-QCV" id="EIB-lc-14l"/> <outlet property="playerView" destination="1Xz-5f-ZJx" id="tYS-5X-mCe"/> <outlet property="playerViewBottomMargin" destination="ted-kP-rO7" id="oFs-an-sCu"/> <outlet property="playerViewWHRatio" destination="7NS-WA-bEr" id="nAT-Lb-Z7I"/> <outlet property="ptzCloseButton" destination="Un0-bC-uwU" id="pBM-jg-Hsv"/> <outlet property="ptzControlButton" destination="cRL-ov-Bad" id="dO9-KY-Fpn"/> <outlet property="ptzDownButton" destination="YpD-H2-J3L" id="9Hs-IT-QQk"/> EZDemo/HDLEZDemo/HDLEZDemo/ViewController.m
@@ -10,7 +10,7 @@ //萤石门锁spk #define HDLEZ_DOOR_SPK @"security.door.ezviz" #define HDLEZ_DEVICEID @"1670680809556606978" #define HDLEZ_DEVICEID @"1671450533475319810" //#define HDLEZ_DEVICESERIAL @"K36229010" #define HDLEZ_DEVICESERIAL @"J92513662" EZDemo/HDLEZDemo/HDLEZDemo/libEZSDK.aBinary files differ
EZDemo/HDLEZDemo/HDLEZDemo/resources/en.lproj/Localizable.strings
@@ -112,6 +112,12 @@ "device_callout_hang_up" = "Hang up"; "device_callout_ignore" = "Ignore"; "device_callout_answer" = "Answer"; "device_full_scene_play" = "play"; "device_full_scene_pause" = "Pause"; "device_full_scene_sound" = "Sound"; "device_full_scene_sound_off" = "Sound off"; "device_full_scene_quality" = "Articulation"; "device_full_scene_exit_full" = "Exit"; "dmessage_title"="Message"; "message_read"="Mark as Read"; EZDemo/HDLEZDemo/HDLEZDemo/resources/zh-Hans.lproj/Localizable.strings
@@ -72,6 +72,12 @@ "device_callout_hang_up" = "挂断"; "device_callout_ignore" = "忽略"; "device_callout_answer" = "接听"; "device_full_scene_play" = "播放"; "device_full_scene_pause" = "暂停"; "device_full_scene_sound" = "音量"; "device_full_scene_sound_off" = "静音"; "device_full_scene_quality" = "清晰度"; "device_full_scene_exit_full" = "退出全屏"; "device_open"="开门"; "device_open_success"="开门成功!"; EZSDK/EZSDK.xcodeproj/project.pbxproj
@@ -8,6 +8,8 @@ /* Begin PBXBuildFile section */ 830957C32A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */; }; 8357F1DE2A42DEC000936D2E /* HDLEZVideoDoorToolView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8357F1DD2A42DEC000936D2E /* HDLEZVideoDoorToolView.m */; }; 83D69FFA2A47D32A00871258 /* HDLEZVideoQualityBoxView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */; }; 83EE503D2A41C9BA0006435D /* HDLEZOPButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 83EE503C2A41C9BA0006435D /* HDLEZOPButton.m */; }; AE31FE1F29CC2D2200678568 /* EZOpenSDKFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */; platformFilter = ios; }; AE5068D829B9DB5E009EA09A /* HDLEZTemInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = AE5068D729B9DB5E009EA09A /* HDLEZTemInfoModel.m */; }; @@ -188,6 +190,10 @@ /* Begin PBXFileReference section */ 830957C12A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoDoorMsgCell.h; sourceTree = "<group>"; }; 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoDoorMsgCell.m; sourceTree = "<group>"; }; 8357F1DC2A42DEC000936D2E /* HDLEZVideoDoorToolView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoDoorToolView.h; sourceTree = "<group>"; }; 8357F1DD2A42DEC000936D2E /* HDLEZVideoDoorToolView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoDoorToolView.m; sourceTree = "<group>"; }; 83D69FF82A47D32A00871258 /* HDLEZVideoQualityBoxView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZVideoQualityBoxView.h; sourceTree = "<group>"; }; 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZVideoQualityBoxView.m; sourceTree = "<group>"; }; 83EE503B2A41C9BA0006435D /* HDLEZOPButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HDLEZOPButton.h; sourceTree = "<group>"; }; 83EE503C2A41C9BA0006435D /* HDLEZOPButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDLEZOPButton.m; sourceTree = "<group>"; }; AE31FE1E29CC2D2200678568 /* EZOpenSDKFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = EZOpenSDKFramework.framework; sourceTree = "<group>"; }; @@ -669,6 +675,10 @@ AEDBFBA429C3072D005F6512 /* HDLEZDeviceMsgCell.m */, 830957C12A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.h */, 830957C22A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m */, 8357F1DC2A42DEC000936D2E /* HDLEZVideoDoorToolView.h */, 8357F1DD2A42DEC000936D2E /* HDLEZVideoDoorToolView.m */, 83D69FF82A47D32A00871258 /* HDLEZVideoQualityBoxView.h */, 83D69FF92A47D32A00871258 /* HDLEZVideoQualityBoxView.m */, ); path = Views; sourceTree = "<group>"; @@ -1425,6 +1435,7 @@ files = ( B9BC99D225C0FFBD00C024FE /* UIButton+DDKit.m in Sources */, B9EA4E9325C7E806000FFDA2 /* MJRefreshFooter.m in Sources */, 83D69FFA2A47D32A00871258 /* HDLEZVideoQualityBoxView.m in Sources */, B9BC99F125C0FFBD00C024FE /* UIImageView+WebCache.m in Sources */, B9BC99DA25C0FFBD00C024FE /* AFURLResponseSerialization.m in Sources */, B9BC99D525C0FFBD00C024FE /* UIRefreshControl+AFNetworking.m in Sources */, @@ -1578,6 +1589,7 @@ B9BC99A125C0FFBD00C024FE /* DDCollectionViewFlowLayout.m in Sources */, B9BC9A1E25C0FFBD00C024FE /* EZWifiInfoViewController.m in Sources */, 830957C32A3AE3E1002B68AA /* HDLEZVideoDoorMsgCell.m in Sources */, 8357F1DE2A42DEC000936D2E /* HDLEZVideoDoorToolView.m in Sources */, AEF0148F29C188ED00D014FD /* HDLEZScrollView.m in Sources */, 83EE503D2A41C9BA0006435D /* HDLEZOPButton.m in Sources */, B9BC9A1925C0FFBD00C024FE /* EZAPWiFiConfigViewController.m in Sources */, EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorToolView.h
New file @@ -0,0 +1,47 @@ // // HDLEZVideoDoorToolView.h // EZSDK // // Created by Davin on 2023/6/21. // #import <UIKit/UIKit.h> #import "HDLEZVideoQualityBoxView.h" NS_ASSUME_NONNULL_BEGIN @interface HDLEZVideoDoorToolView : UIView @property (nonatomic, copy) void(^hangUpBlock)(void); @property (nonatomic, copy) void(^playOrPauseBlock)(BOOL isPlaying); @property (nonatomic, copy) void(^soundControlBlock)(BOOL soundOn); @property (nonatomic, copy) void(^qualityControlBlock)(NSInteger videoLevel); @property (nonatomic, copy) void(^exitFullSceneBlock)(void); /// 配置视频相关信息 /// - Parameters: /// - isPlaying: 是否正在播放 /// - soundOn: 音量开 /// - videoLevel: 清晰度 /// - fullOperation: 全屏时的操作 - (void)configPlayStatus:(BOOL)isPlaying soundOn:(BOOL)soundOn videoLevel:(NSInteger)videoLevel toolOperation:(void(^)(HDLEZVideoFullSceneOperation operationType))fullOperation; /// 设置播放状态 /// - Parameter isPlaying: 播放状态 - (void)playStatus:(BOOL)isPlaying; /// 音量设置 /// - Parameter soundOn: 是否开启音量 - (void)soundOn:(BOOL)soundOn; /// 清晰度设置 /// - Parameter videoLevel: 清晰度 - (void)videoLevel:(NSInteger)videoLevel; /// 响铃信息 /// - Parameter isRing: 是否正在响铃🔔 - (void)ringRingRing:(BOOL)isRing; @end NS_ASSUME_NONNULL_END EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoDoorToolView.m
New file @@ -0,0 +1,292 @@ // // HDLEZVideoDoorToolView.m // EZSDK // // Created by Davin on 2023/6/21. // #import "HDLEZVideoDoorToolView.h" #import "HDLEZOPButton.h" @interface HDLEZVideoDoorToolView () @property (nonatomic, strong) HDLEZOPButton *hangUpButton; // 挂断按钮 @property (nonatomic, strong) UIView *baseToolView; // 工具视图 @property (nonatomic, strong) HDLEZOPButton *playButton; // 播放/暂停 @property (nonatomic, strong) HDLEZOPButton *volumeButton; // 音量开启/关闭 @property (nonatomic, strong) HDLEZOPButton *qualityButton; // 清晰度 @property (nonatomic, strong) HDLEZOPButton *fullSceneButton; // 退出全屏 @property (nonatomic, strong) HDLEZVideoQualityBoxView *qualityBox; // 清晰度弹框视图 @property (nonatomic, assign) BOOL isPlaying; // 是否正在播放 @property (nonatomic, assign) BOOL soundOn; // 音量是否开启 @property (nonatomic, assign) NSInteger videoLevel; // 清晰度 @property (nonatomic, copy) void(^fullOperation)(HDLEZVideoFullSceneOperation operationType); @end @implementation HDLEZVideoDoorToolView - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { [self createSubviews]; } return self; } - (void)createSubviews { self.backgroundColor = [UIColor clearColor]; [self addSubview:self.hangUpButton]; [self addSubview:self.baseToolView]; [self addSubview:self.playButton]; [self addSubview:self.volumeButton]; [self addSubview:self.qualityButton]; [self addSubview:self.fullSceneButton]; [self addSubview:self.qualityBox]; [self.hangUpButton mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(self.baseToolView.mas_top).offset(-40); make.centerX.mas_equalTo(self.mas_centerX); make.width.mas_equalTo(70); make.height.mas_equalTo(110); }]; [self.baseToolView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.mas_left).offset(16.); make.bottom.mas_equalTo(self.mas_bottom).offset(-37.); make.right.mas_equalTo(self.mas_right).offset(-16.); make.height.mas_equalTo(102); }]; [self.playButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.baseToolView.mas_left).offset(12.); make.centerY.mas_equalTo(self.baseToolView.mas_centerY); make.height.mas_equalTo(70); }]; [self.volumeButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.playButton.mas_right).offset(21.); make.centerY.mas_equalTo(self.baseToolView.mas_centerY); make.width.mas_equalTo(self.playButton.mas_width).multipliedBy(1.); make.height.mas_equalTo(self.playButton.mas_height).multipliedBy(1.); }]; [self.qualityButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.volumeButton.mas_right).offset(21.); make.centerY.mas_equalTo(self.baseToolView.mas_centerY); make.width.mas_equalTo(self.playButton.mas_width).multipliedBy(1.); make.height.mas_equalTo(self.playButton.mas_height).multipliedBy(1.); }]; [self.fullSceneButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.qualityButton.mas_right).offset(21.); make.right.mas_equalTo(self.baseToolView.mas_right).offset(-12); make.centerY.mas_equalTo(self.baseToolView.mas_centerY); make.width.mas_equalTo(self.playButton.mas_width).multipliedBy(1.); make.height.mas_equalTo(self.playButton.mas_height).multipliedBy(1.); }]; [self.qualityBox mas_makeConstraints:^(MASConstraintMaker *make) { make.bottom.mas_equalTo(self.baseToolView.mas_top); make.centerX.mas_equalTo(self.qualityButton.mas_centerX); make.width.mas_equalTo(80); make.height.mas_equalTo(168); }]; [self.hangUpButton addTarget:self action:@selector(hangUpAction) forControlEvents:UIControlEventTouchUpInside]; [self.playButton addTarget:self action:@selector(playAction) forControlEvents:UIControlEventTouchUpInside]; [self.volumeButton addTarget:self action:@selector(volumeAction) forControlEvents:UIControlEventTouchUpInside]; [self.qualityButton addTarget:self action:@selector(qualityAction) forControlEvents:UIControlEventTouchUpInside]; [self.fullSceneButton addTarget:self action:@selector(fullSceneAction) forControlEvents:UIControlEventTouchUpInside]; __weak HDLEZVideoDoorToolView *weakself = self; [self.qualityBox videoQualityChange:^(HDLEZVideoFullSceneOperation operationType) { if (weakself.fullOperation) { weakself.fullOperation(operationType); } [weakself qualityAction]; if (operationType == HDLEZVideoFullSceneOperationOfSmooth) { [weakself videoLevel:0]; } else if (operationType == HDLEZVideoFullSceneOperationOfSmooth) { [weakself videoLevel:1]; } else if (operationType == HDLEZVideoFullSceneOperationOfSmooth) { [weakself videoLevel:2]; } }]; } #pragma mark - PublishMethod - (void)configPlayStatus:(BOOL)isPlaying soundOn:(BOOL)soundOn videoLevel:(NSInteger)videoLevel toolOperation:(void(^)(HDLEZVideoFullSceneOperation operationType))fullOperation { // self.isPlaying = isPlaying; // self.soundOn = soundOn; // self.videoLevel = videoLevel; self.fullOperation = fullOperation; [self playStatus:isPlaying]; [self soundOn:soundOn]; [self videoLevel:videoLevel]; } /// 设置播放状态 /// - Parameter isPlaying: 播放状态 - (void)playStatus:(BOOL)isPlaying { self.isPlaying = isPlaying; self.playButton.selected = !isPlaying; } /// 音量设置 /// - Parameter soundOn: 是否开启音量 - (void)soundOn:(BOOL)soundOn { self.soundOn = soundOn; self.volumeButton.selected = !soundOn; NSLog(@"######%@声音", soundOn ? @"开启" : @"关闭"); } /// 清晰度设置 /// - Parameter videoLevel: 清晰度 - (void)videoLevel:(NSInteger)videoLevel { self.videoLevel = self.videoLevel; if (videoLevel == 0) { [self.qualityButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_smooth"] forState:UIControlStateNormal]; } else if (videoLevel == 1) { [self.qualityButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_balance"] forState:UIControlStateNormal]; } else if (videoLevel == 2) { [self.qualityButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_hd_full"] forState:UIControlStateNormal]; } } - (void)ringRingRing:(BOOL)isRing { self.hangUpButton.hidden = !isRing; } #pragma mark - PrivateMethod - (void)hangUpAction { if (self.fullOperation) { self.fullOperation(HDLEZVideoFullSceneOperationOfHangUp); } } - (void)playAction { [self playStatus:!self.isPlaying]; if (self.fullOperation) { self.fullOperation(self.isPlaying ? HDLEZVideoFullSceneOperationOfPause : HDLEZVideoFullSceneOperationOfPlay); } } - (void)volumeAction { [self soundOn:!self.soundOn]; if (self.fullOperation) { self.fullOperation(self.soundOn ? HDLEZVideoFullSceneOperationOfSound : HDLEZVideoFullSceneOperationOfSoundOff); } } - (void)qualityAction { // if (self.qualityControlBlock) { // self.qualityControlBlock(self.videoLevel); // } self.qualityButton.selected = !self.qualityButton.selected; self.qualityBox.hidden = !self.qualityButton.selected; } - (void)fullSceneAction { if (self.fullOperation) { self.fullOperation(HDLEZVideoFullSceneOperationOfExitFull); } } #pragma mark - Getter - (HDLEZOPButton *)hangUpButton { if (!_hangUpButton) { _hangUpButton = [HDLEZOPButton buttonWithType:UIButtonTypeCustom]; _hangUpButton.imagePosition = HDLEZOPButtonImagePositionTop; _hangUpButton.spacingBetweenImageAndTitle = 12.; [_hangUpButton setTitle:NSLocalizedString(@"device_callout_hang_up", @"挂断") forState:UIControlStateNormal]; [_hangUpButton setTitleColor:HDLEZ_COLOR_TEXT_WHITE forState:UIControlStateNormal]; _hangUpButton.titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); [_hangUpButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_hang_up"] forState:UIControlStateNormal]; _hangUpButton.hidden = YES; } return _hangUpButton; } - (UIView *)baseToolView { if (!_baseToolView) { _baseToolView = [[UIView alloc] init]; _baseToolView.backgroundColor = HDLEZHEXCOLOR(0xFFFFFF, 0.16); _baseToolView.layer.cornerRadius = 16.; _baseToolView.clipsToBounds = YES; } return _baseToolView; } - (HDLEZOPButton *)playButton { if (!_playButton) { _playButton = [HDLEZOPButton buttonWithType:UIButtonTypeCustom]; _playButton.imagePosition = HDLEZOPButtonImagePositionTop; _playButton.spacingBetweenImageAndTitle = 8.; [_playButton setTitle:NSLocalizedString(@"device_full_scene_pause", @"暂停") forState:UIControlStateNormal]; [_playButton setTitle:NSLocalizedString(@"device_full_scene_play", @"播放") forState:UIControlStateSelected]; [_playButton setTitleColor:HDLEZ_COLOR_TEXT_WHITE forState:UIControlStateNormal]; _playButton.titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); [_playButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_pause"] forState:UIControlStateNormal]; [_playButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_play"] forState:UIControlStateSelected]; _playButton.selected = NO; } return _playButton; } - (HDLEZOPButton *)volumeButton { if (!_volumeButton) { _volumeButton = [HDLEZOPButton buttonWithType:UIButtonTypeCustom]; _volumeButton.imagePosition = HDLEZOPButtonImagePositionTop; _volumeButton.spacingBetweenImageAndTitle = 8.; [_volumeButton setTitle:NSLocalizedString(@"device_full_scene_sound", @"音量") forState:UIControlStateNormal]; [_volumeButton setTitle:NSLocalizedString(@"device_full_scene_sound_off", @"静音") forState:UIControlStateSelected]; [_volumeButton setTitleColor:HDLEZ_COLOR_TEXT_WHITE forState:UIControlStateNormal]; _volumeButton.titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); [_volumeButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_volume"] forState:UIControlStateNormal]; [_volumeButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_sound_off"] forState:UIControlStateSelected]; _volumeButton.selected = NO; } return _volumeButton; } - (HDLEZOPButton *)qualityButton { if (!_qualityButton) { _qualityButton = [HDLEZOPButton buttonWithType:UIButtonTypeCustom]; _qualityButton.imagePosition = HDLEZOPButtonImagePositionTop; _qualityButton.spacingBetweenImageAndTitle = 8.; [_qualityButton setTitle:NSLocalizedString(@"device_full_scene_quality", @"清晰度") forState:UIControlStateNormal]; [_qualityButton setTitleColor:HDLEZ_COLOR_TEXT_WHITE forState:UIControlStateNormal]; _qualityButton.titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); [_qualityButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_smooth"] forState:UIControlStateNormal]; _qualityButton.selected = NO; } return _qualityButton; } - (HDLEZOPButton *)fullSceneButton { if (!_fullSceneButton) { _fullSceneButton = [HDLEZOPButton buttonWithType:UIButtonTypeCustom]; _fullSceneButton.imagePosition = HDLEZOPButtonImagePositionTop; _fullSceneButton.spacingBetweenImageAndTitle = 8.; [_fullSceneButton setTitle:NSLocalizedString(@"device_full_scene_exit_full", @"退出全屏") forState:UIControlStateNormal]; [_fullSceneButton setTitleColor:HDLEZ_COLOR_TEXT_WHITE forState:UIControlStateNormal]; _fullSceneButton.titleLabel.font = HDLEZ_Get_FontRegularWithSize(HDLEZ_FontSize_14); [_fullSceneButton setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_exit"] forState:UIControlStateNormal]; } return _fullSceneButton; } - (HDLEZVideoQualityBoxView *)qualityBox { if (!_qualityBox) { _qualityBox = [[HDLEZVideoQualityBoxView alloc] init]; _qualityBox.hidden = YES; } return _qualityBox; } @end EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoQualityBoxView.h
New file @@ -0,0 +1,30 @@ // // HDLEZVideoQualityBoxView.h // EZSDK // // Created by Davin on 2023/6/25. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN typedef NS_ENUM(NSInteger, HDLEZVideoFullSceneOperation) { HDLEZVideoFullSceneOperationOfHangUp = 0, // 挂断 HDLEZVideoFullSceneOperationOfPlay, // 播放 HDLEZVideoFullSceneOperationOfPause, // 暂停 HDLEZVideoFullSceneOperationOfSound, // 音量 HDLEZVideoFullSceneOperationOfSoundOff, // 静音 HDLEZVideoFullSceneOperationOfSmooth, // 流畅 HDLEZVideoFullSceneOperationOfBalance, // 均衡 HDLEZVideoFullSceneOperationOfHDFull, // 高清 HDLEZVideoFullSceneOperationOfExitFull, // 退出全屏 }; @interface HDLEZVideoQualityBoxView : UIView - (void)videoQualityChange:(void(^)(HDLEZVideoFullSceneOperation operationType))qualityBlock; @end NS_ASSUME_NONNULL_END EZSDK/EZSDK/EZ/TempPassword/Views/HDLEZVideoQualityBoxView.m
New file @@ -0,0 +1,164 @@ // // HDLEZVideoQualityBoxView.m // EZSDK // // Created by Davin on 2023/6/25. // #import "HDLEZVideoQualityBoxView.h" #define radiusValue 8. #define arrowWidth 8. @interface HDLEZVideoQualityBoxView () @property (nonatomic, strong) UIButton *smoothBtn; @property (nonatomic, strong) UIButton *balanceBtn; @property (nonatomic, strong) UIButton *hdFullBtn; @property (nonatomic, copy) void(^qualityOperation)(HDLEZVideoFullSceneOperation operationType); @end @implementation HDLEZVideoQualityBoxView - (instancetype)initWithFrame:(CGRect)frame{ if(self = [super initWithFrame:frame]){ [self createSubviews]; } return self; } - (void)createSubviews { self.backgroundColor = [UIColor clearColor]; [self addSubview:self.smoothBtn]; [self addSubview:self.balanceBtn]; [self addSubview:self.hdFullBtn]; [self.smoothBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.mas_top); make.left.mas_equalTo(self.mas_left); make.right.mas_equalTo(self.mas_right); }]; [self.balanceBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.smoothBtn.mas_bottom); make.left.mas_equalTo(self.mas_left); make.right.mas_equalTo(self.mas_right); make.height.mas_equalTo(self.smoothBtn.mas_height); }]; [self.hdFullBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.balanceBtn.mas_bottom); make.left.mas_equalTo(self.mas_left); make.bottom.mas_equalTo(self.mas_bottom).offset(-arrowWidth); make.right.mas_equalTo(self.mas_right); make.height.mas_equalTo(self.smoothBtn.mas_height); }]; [self.smoothBtn addTarget:self action:@selector(selectedSmooth) forControlEvents:UIControlEventTouchUpInside]; [self.balanceBtn addTarget:self action:@selector(selectedBalance) forControlEvents:UIControlEventTouchUpInside]; [self.hdFullBtn addTarget:self action:@selector(selectedHdFull) forControlEvents:UIControlEventTouchUpInside]; } - (void)drawRect:(CGRect)rect{ CGFloat w = rect.size.width; CGFloat h = rect.size.height; UIBezierPath *path = [UIBezierPath bezierPath]; UIColor *bgColor; [path moveToPoint:CGPointMake(0, h - radiusValue - arrowWidth)]; [path addArcWithCenter:CGPointMake(radiusValue, h - radiusValue - arrowWidth) radius:radiusValue startAngle:M_PI endAngle:M_PI_2 clockwise:NO]; [path addLineToPoint:CGPointMake(w/2. - arrowWidth, h - arrowWidth)]; [path addLineToPoint:CGPointMake(w/2., h)]; [path addLineToPoint:CGPointMake(w/2. + arrowWidth, h - arrowWidth)]; [path addLineToPoint:CGPointMake(w - radiusValue, h - arrowWidth)]; [path addArcWithCenter:CGPointMake(w - radiusValue, h - radiusValue - arrowWidth) radius:radiusValue startAngle:M_PI_2 endAngle:0 clockwise:NO]; [path addLineToPoint:CGPointMake(w, radiusValue)]; [path addArcWithCenter:CGPointMake(w - radiusValue, radiusValue) radius:radiusValue startAngle:0 endAngle:-M_PI_2 clockwise:NO]; [path addLineToPoint:CGPointMake(radiusValue, 0)]; [path addArcWithCenter:CGPointMake(radiusValue, radiusValue) radius:radiusValue startAngle:-M_PI_2 endAngle:-M_PI clockwise:NO]; [path addLineToPoint:CGPointMake(0, h - radiusValue - arrowWidth)]; bgColor = HDLEZHEXCOLOR(0x292929, 1.); [bgColor setFill]; [path fill]; [path setLineWidth:0.5]; [HDLEZHEXCOLOR(0x292929, 1.) setStroke]; [path stroke]; [path closePath]; } #pragma mark - PublishMethod - (void)videoQualityChange:(void(^)(HDLEZVideoFullSceneOperation operationType))qualityBlock { self.qualityOperation = qualityBlock; } #pragma mark - PrivateMethod - (void)selectedSmooth { if (self.qualityOperation) { self.qualityOperation(HDLEZVideoFullSceneOperationOfSmooth); } } - (void)selectedBalance { if (self.qualityOperation) { self.qualityOperation(HDLEZVideoFullSceneOperationOfBalance); } } - (void)selectedHdFull { if (self.qualityOperation) { self.qualityOperation(HDLEZVideoFullSceneOperationOfHDFull); } } #pragma mark - Getter - (UIButton *)smoothBtn { if (!_smoothBtn) { _smoothBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [_smoothBtn setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_smooth"] forState:UIControlStateNormal]; } return _smoothBtn; } - (UIButton *)balanceBtn { if (!_balanceBtn) { _balanceBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [_balanceBtn setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_balance"] forState:UIControlStateNormal]; } return _balanceBtn; } - (UIButton *)hdFullBtn { if (!_hdFullBtn) { _hdFullBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [_hdFullBtn setImage:[UIImage imageNamed:@"hdl_ez_cat_eyes_full_hd_full"] forState:UIControlStateNormal]; } return _hdFullBtn; } @end EZSDK/EZSDK/EZ/UIViewControllers/EZLivePlayViewController.m
@@ -25,6 +25,7 @@ #import <EZOpenSDKFramework/EZPMPlayPrivateTokenInfo.h> #import "HDLEZAlertInputView.h" #import "HDLEZOPButton.h" #import "HDLEZVideoDoorToolView.h" #define MinimumZoomScale 1.0 #define MaximumZoomScale 4.0 @@ -49,6 +50,9 @@ @property (nonatomic, strong) HIKLoadView *loadingView; @property (nonatomic, weak) IBOutlet UIButton *playerPlayButton; @property (nonatomic, weak) IBOutlet UIView *playerView; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *playerViewWHRatio; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *playerViewBottomMargin; @property (nonatomic, weak) IBOutlet UIView *toolBar; @property (nonatomic, weak) IBOutlet UIView *bottomView; @property (nonatomic, weak) IBOutlet UIButton *controlButton; @@ -98,6 +102,7 @@ @property (nonatomic, copy) NSString *streamToken; @property (nonatomic, strong) UIView *doorPlayerView;//门锁播放view @property (nonatomic, assign) CGFloat doorPlayerAspectRatio; // 门锁播放视图宽高比 // 呼叫视图相关控件 @property (weak, nonatomic) IBOutlet UIView *videoCallOutView; // 呼叫弹框 @@ -105,6 +110,8 @@ @property (weak, nonatomic) IBOutlet HDLEZOPButton *hangUpButton; // 挂断按钮 @property (weak, nonatomic) IBOutlet HDLEZOPButton *ignoreButton; // 忽略按钮 @property (weak, nonatomic) IBOutlet HDLEZOPButton *answerButton; // 接听按钮 @property (strong, nonatomic) HDLEZVideoDoorToolView *fullSceneToolView; // 全屏工具视图 @end @@ -125,6 +132,8 @@ self.isStartingTalk = NO; self.ptzView.hidden = YES; self.talkView.hidden = YES; self.videoCallOutView.hidden = YES; self.doorPlayerAspectRatio = HDLEZ_APP_SCREEN_WIDTH / HDLEZ_APP_SCREEN_HEIGHT; _landscape = NO; if (!self.deviceInfo) {//如果没有传deviceInfo,需主动获取 @@ -374,6 +383,7 @@ [self.qualityButton setTitle:NSLocalizedString(@"device_quality_low",@"流畅") forState:UIControlStateNormal]; } } #warning 不支持切换清晰度,全屏时也需要主持 if (_cameraInfo.cameraNo == 0 || [self.deviceInfo.deviceType containsString:@"CAS"]) { //不支持清晰度切换 self.qualityButton.hidden = YES; } @@ -486,6 +496,13 @@ [self.answerButton setTitle:HDLEZLocallizedString(@"device_callout_answer") forState:UIControlStateNormal]; self.answerButton.imagePosition = HDLEZOPButtonImagePositionTop; self.answerButton.spacingBetweenImageAndTitle = 12.; // 门锁全屏状态下工具栏 [self.view addSubview:self.fullSceneToolView]; __weak EZLivePlayViewController *weakSelf = self; [self.fullSceneToolView configPlayStatus:YES soundOn:YES videoLevel:1 toolOperation:^(HDLEZVideoFullSceneOperation operationType) { [weakSelf doorLockFullSceneOperation:operationType]; }]; } /*开锁 @@ -677,12 +694,13 @@ * @param width 宽度 */ - (void)player:(EZPlayer *)player didReceivedDisplayHeight:(NSInteger)height displayWidth:(NSInteger)width{ // HDLEZLog(@"画面长:%ld,宽:%ld",(long)height,(long)width); NSLog(@"画面长:%ld,宽:%ld",(long)height,(long)width); CGFloat playerVH=self.playerView.frame.size.height; // HDLEZLog(@"高:%ld",(long)playerVH); CGFloat ratio=((CGFloat)width)/((CGFloat)height); // HDLEZLog(@"比例:%f",ratio); NSLog(@"比例:%f",ratio); CGFloat playerVW=playerVH*ratio; self.doorPlayerAspectRatio = ratio; // HDLEZLog(@"宽:%ld",(long)playerVW); [self.doorPlayerView mas_updateConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(_doorPlayerView.mas_height).multipliedBy(ratio); @@ -882,6 +900,7 @@ - (IBAction)large:(id)sender { self.videoCallOutView.hidden = YES; if (_landscape == YES) { [self largeBack:self.largeBackButton]; return; @@ -890,22 +909,29 @@ if (self.isVideoDoorLock) { self.navigationController.navigationBarHidden = YES; self.localRecrodContraint.constant = 50; self.toolBar.hidden = NO; self.largeTitleLabel.hidden = NO; self.toolBar.hidden = YES; self.largeTitleLabel.hidden = YES; self.largeBackButton.hidden = YES; self.bottomView.hidden = YES; self.videoCallOutView.hidden = YES; self.scrollView.backgroundColor = [UIColor blackColor]; [self.scrollView setTranslatesAutoresizingMaskIntoConstraints:NO]; [self.toolBar setTranslatesAutoresizingMaskIntoConstraints:NO]; [NSLayoutConstraint deactivateConstraints:@[self.scrollViewTopMargin, self.scrollViewWHRatio]]; [self.playerView setTranslatesAutoresizingMaskIntoConstraints:NO]; [NSLayoutConstraint deactivateConstraints:@[self.scrollViewTopMargin, self.scrollViewWHRatio, self.playerViewWHRatio, self.playerViewBottomMargin]]; self.scrollViewTopMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.topLayoutGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:-HDLEZ_APP_STATUS_BAR_HEIGHT]; self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:HDLEZ_APP_SCREEN_WIDTH/(HDLEZ_APP_SCREEN_HEIGHT - 37.) constant:0]; [NSLayoutConstraint activateConstraints:@[self.scrollViewTopMargin, self.scrollViewWHRatio]]; self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:HDLEZ_APP_SCREEN_WIDTH/HDLEZ_APP_SCREEN_HEIGHT constant:0]; self.playerViewWHRatio = [NSLayoutConstraint constraintWithItem:self.playerView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.playerView attribute:NSLayoutAttributeHeight multiplier:self.doorPlayerAspectRatio constant:0]; CGFloat playerBottomMargin = HDLEZ_APP_SCREEN_HEIGHT - (HDLEZ_APP_SCREEN_WIDTH / self.doorPlayerAspectRatio); NSLog(@"########播放间隙:%lf", playerBottomMargin); self.playerViewBottomMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.playerView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:playerBottomMargin]; [NSLayoutConstraint activateConstraints:@[self.scrollViewTopMargin, self.scrollViewWHRatio, self.playerViewWHRatio, self.playerViewBottomMargin]]; dispatch_async(dispatch_get_main_queue(), ^{ [self.scrollView layoutIfNeeded]; [self.toolBar layoutIfNeeded]; [self.playerView layoutIfNeeded]; }); self.fullSceneToolView.hidden = NO; [self.view bringSubviewToFront:self.fullSceneToolView]; return; } if (@available(iOS 16.0, *)) { @@ -942,17 +968,22 @@ self.largeTitleLabel.hidden = YES; self.localRecrodContraint.constant = 10; self.videoCallOutView.hidden = !self.isShowAlert; self.scrollView.backgroundColor = [UIColor clearColor]; [self.scrollView setTranslatesAutoresizingMaskIntoConstraints:NO]; [self.toolBar setTranslatesAutoresizingMaskIntoConstraints:NO]; [NSLayoutConstraint deactivateConstraints:@[self.scrollViewTopMargin,self.scrollViewWHRatio]]; [self.playerView setTranslatesAutoresizingMaskIntoConstraints:NO]; [NSLayoutConstraint deactivateConstraints:@[self.scrollViewTopMargin,self.scrollViewWHRatio, self.playerViewWHRatio, self.playerViewBottomMargin]]; self.scrollViewTopMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.topLayoutGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; self.scrollViewWHRatio = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.scrollView attribute:NSLayoutAttributeHeight multiplier:16/9. constant:0]; [NSLayoutConstraint activateConstraints:@[self.scrollViewTopMargin,self.scrollViewWHRatio]]; self.playerViewWHRatio = [NSLayoutConstraint constraintWithItem:self.playerView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self.playerView attribute:NSLayoutAttributeHeight multiplier:16/9. constant:0]; self.playerViewBottomMargin = [NSLayoutConstraint constraintWithItem:self.scrollView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self.playerView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; [NSLayoutConstraint activateConstraints:@[self.scrollViewTopMargin,self.scrollViewWHRatio, self.playerViewWHRatio, self.playerViewBottomMargin]]; dispatch_async(dispatch_get_main_queue(), ^{ [self.scrollView layoutIfNeeded]; [self.toolBar layoutIfNeeded]; [self.playerView layoutIfNeeded]; }); self.fullSceneToolView.hidden = YES; return; } if (@available(iOS 16.0, *)) { @@ -1041,6 +1072,7 @@ [self.voiceButton setImage:[UIImage imageNamed:@"preview_voice_btn"] forState:UIControlStateNormal]; } _isOpenSound = !_isOpenSound; [self.fullSceneToolView soundOn:_isOpenSound]; } - (IBAction)playButtonClicked:(id)sender @@ -1069,6 +1101,11 @@ [self.loadingView startSquareClcokwiseAnimation]; } _isPlaying = !_isPlaying; [self.fullSceneToolView playStatus:_isPlaying]; } - (SEL)extracted { return @selector(hideQualityView); } - (IBAction)qualityButtonClicked:(id)sender @@ -1081,7 +1118,7 @@ { self.qualityView.hidden = NO; //停留5s以后隐藏视频质量View. [self performSelector:@selector(hideQualityView) withObject:nil afterDelay:5.0f]; [self performSelector:[self extracted] withObject:nil afterDelay:5.0f]; } self.qualityButton.selected = !self.qualityButton.selected; } @@ -1134,14 +1171,17 @@ if (sender == weakSelf.highButton) { [weakSelf.qualityButton setTitle:NSLocalizedString(@"device_quality_high", @"高清") forState:UIControlStateNormal]; [self.fullSceneToolView videoLevel:2]; } else if (sender == weakSelf.middleButton) { [weakSelf.qualityButton setTitle:NSLocalizedString(@"device_quality_median", @"均衡") forState:UIControlStateNormal]; [self.fullSceneToolView videoLevel:1]; } else { [weakSelf.qualityButton setTitle:NSLocalizedString(@"device_quality_low", @"流畅") forState:UIControlStateNormal]; [self.fullSceneToolView videoLevel:0]; } if (result) { @@ -1642,6 +1682,52 @@ } } #pragma mark - PrivateMethod (门锁全屏时的一系列操作) - (void)doorLockFullSceneOperation:(HDLEZVideoFullSceneOperation)operation { switch (operation) { case HDLEZVideoFullSceneOperationOfHangUp: { // 挂断 [self hiddenCallOutAlertView]; } break; case HDLEZVideoFullSceneOperationOfPlay: { // 播放 [self playButtonClicked:self.playButton]; } break; case HDLEZVideoFullSceneOperationOfPause: { // 暂停 [self playButtonClicked:self.playButton]; } break; case HDLEZVideoFullSceneOperationOfSound: { // 开启音量 [_player openSound]; NSLog(@"#######开启音量"); } break; case HDLEZVideoFullSceneOperationOfSoundOff: { // 静音 [_player closeSound]; NSLog(@"#######静音"); } break; case HDLEZVideoFullSceneOperationOfSmooth: { // 流畅 [self qualitySelectedClicked:self.lowButton]; } break; case HDLEZVideoFullSceneOperationOfBalance: { // 均衡 [self qualitySelectedClicked:self.middleButton]; } break; case HDLEZVideoFullSceneOperationOfHDFull: { // 高清 [self qualitySelectedClicked:self.highButton]; } break; case HDLEZVideoFullSceneOperationOfExitFull: { // 退出全屏 [self largeBack:self.largeButton]; } break; default: break; } } #pragma Setter - (void)setIsShowAlert:(BOOL)isShowAlert { _isShowAlert = isShowAlert; @@ -1654,6 +1740,15 @@ } } #pragma mark - Getter - (HDLEZVideoDoorToolView *)fullSceneToolView { if (!_fullSceneToolView) { _fullSceneToolView = [[HDLEZVideoDoorToolView alloc] initWithFrame:CGRectMake(0, HDLEZ_APP_SCREEN_HEIGHT - 280, HDLEZ_APP_SCREEN_WIDTH, 280)]; _fullSceneToolView.hidden = YES; } return _fullSceneToolView; } - (BOOL)prefersHomeIndicatorAutoHidden { return YES; } EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m
@@ -343,7 +343,12 @@ }]; __weak __typeof(self)weakSelf = self; UIAlertAction *sure=[UIAlertAction actionWithTitle:HDLEZLocallizedString(@"device_temp_sure") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { [UIView dd_showMessage:@"功能开发中..."]; [EZOPENSDK formatStorage:self.deviceInfo.deviceSerial storageIndex:0 completion:^(NSError *error) { NSLog(@"format command error = %@", error); [UIView dd_showMessage:error.description]; }]; }]; [alert addAction:cancle]; [alert addAction:sure];