Commit 466297be1f555b887c38b130353068dc1e1a003b
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
Showing
22 changed files
with
1486 additions
and
51 deletions
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
| ... | ... | @@ -22,8 +22,6 @@ |
| 22 | 22 | 810B650A1E77B39D00133E15 /* LVCFullScreenPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */; }; |
| 23 | 23 | 8112D4311E7927A5002E00F6 /* LVCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */; }; |
| 24 | 24 | 812E50531E7699DC004F5FCD /* CNLivePlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */; }; |
| 25 | - 812E50551E7699E9004F5FCD /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */; }; | |
| 26 | - 812E50561E7699E9004F5FCD /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 27 | 25 | 812E50581E7699E9004F5FCD /* CNLivePlayerSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
| 28 | 26 | 81FB5B3C1E7A6FFC00F98E1D /* SevenSwitch.m in Sources */ = {isa = PBXBuildFile; fileRef = 81FB5B3B1E7A6FFC00F98E1D /* SevenSwitch.m */; }; |
| 29 | 27 | D2029B861E6EAAA50027CD92 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D2029B851E6EAAA50027CD92 /* main.m */; }; |
| ... | ... | @@ -153,6 +151,19 @@ |
| 153 | 151 | D25BF87A1E7B8A82007FB138 /* FilterFunctionView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8771E7B8A82007FB138 /* FilterFunctionView.m */; }; |
| 154 | 152 | D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8791E7B8A82007FB138 /* SliderView.m */; }; |
| 155 | 153 | D25BF87D1E7B8C78007FB138 /* KSYGPUResource.bundle in Resources */ = {isa = PBXBuildFile; fileRef = D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */; }; |
| 154 | + D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */; }; | |
| 155 | + D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */; }; | |
| 156 | + D25BF8901E7F7F8F007FB138 /* UGCLoading.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */; }; | |
| 157 | + D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */; }; | |
| 158 | + D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; }; | |
| 159 | + D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; }; | |
| 160 | + D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; }; | |
| 161 | + D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 162 | + D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; }; | |
| 163 | + D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | |
| 164 | + D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */ = {isa = PBXBuildFile; fileRef = D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */; }; | |
| 165 | + D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D25BF8A21E80C4FC007FB138 /* Accelerate.framework */; }; | |
| 166 | + D25BF8A51E80EC76007FB138 /* 头像.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D25BF8A41E80EC76007FB138 /* 头像.jpg */; }; | |
| 156 | 167 | D2888D941E6EB8B4003A77C8 /* LVCTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */; }; |
| 157 | 168 | D2888D9E1E6EBF1B003A77C8 /* LVCLiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888D9B1E6EBF1B003A77C8 /* LVCLiveViewController.m */; }; |
| 158 | 169 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; }; |
| ... | ... | @@ -185,8 +196,9 @@ |
| 185 | 196 | dstPath = ""; |
| 186 | 197 | dstSubfolderSpec = 10; |
| 187 | 198 | files = ( |
| 188 | - 812E50561E7699E9004F5FCD /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 189 | 199 | 812E50581E7699E9004F5FCD /* CNLivePlayerSDK.framework in Embed Frameworks */, |
| 200 | + D25BF89B1E7FE046007FB138 /* CNLiveChatManager.framework in Embed Frameworks */, | |
| 201 | + D25BF89D1E7FE049007FB138 /* CNLiveMsgTools.framework in Embed Frameworks */, | |
| 190 | 202 | ); |
| 191 | 203 | name = "Embed Frameworks"; |
| 192 | 204 | runOnlyForDeploymentPostprocessing = 0; |
| ... | ... | @@ -227,7 +239,6 @@ |
| 227 | 239 | 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCFullScreenPlayerController.m; sourceTree = "<group>"; }; |
| 228 | 240 | 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCPlayerLoadingView.h; sourceTree = "<group>"; }; |
| 229 | 241 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCPlayerLoadingView.m; sourceTree = "<group>"; }; |
| 230 | - 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 231 | 242 | 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLivePlayerSDK.framework; sourceTree = "<group>"; }; |
| 232 | 243 | 81FB5B3A1E7A6FFC00F98E1D /* SevenSwitch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SevenSwitch.h; sourceTree = "<group>"; }; |
| 233 | 244 | 81FB5B3B1E7A6FFC00F98E1D /* SevenSwitch.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SevenSwitch.m; sourceTree = "<group>"; }; |
| ... | ... | @@ -499,6 +510,19 @@ |
| 499 | 510 | D25BF8781E7B8A82007FB138 /* SliderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SliderView.h; sourceTree = "<group>"; }; |
| 500 | 511 | D25BF8791E7B8A82007FB138 /* SliderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SliderView.m; sourceTree = "<group>"; }; |
| 501 | 512 | D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = KSYGPUResource.bundle; sourceTree = "<group>"; }; |
| 513 | + D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePlayerController.h; sourceTree = "<group>"; }; | |
| 514 | + D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePlayerController.m; sourceTree = "<group>"; }; | |
| 515 | + D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCPlayerLoadingView.h; sourceTree = "<group>"; }; | |
| 516 | + D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCPlayerLoadingView.m; sourceTree = "<group>"; }; | |
| 517 | + D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = UGCLoading.jpeg; sourceTree = "<group>"; }; | |
| 518 | + D25BF8911E7FBAEA007FB138 /* LVCUGCBackgroundView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCBackgroundView.h; sourceTree = "<group>"; }; | |
| 519 | + D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCBackgroundView.m; sourceTree = "<group>"; }; | |
| 520 | + D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; | |
| 521 | + D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; | |
| 522 | + D25BF89E1E80C4BD007FB138 /* UIImage+LVCVagueImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+LVCVagueImage.h"; sourceTree = "<group>"; }; | |
| 523 | + D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+LVCVagueImage.m"; sourceTree = "<group>"; }; | |
| 524 | + D25BF8A21E80C4FC007FB138 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; | |
| 525 | + D25BF8A41E80EC76007FB138 /* 头像.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "头像.jpg"; sourceTree = "<group>"; }; | |
| 502 | 526 | D2888D921E6EB8B4003A77C8 /* LVCTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCTabBar.h; sourceTree = "<group>"; }; |
| 503 | 527 | D2888D931E6EB8B4003A77C8 /* LVCTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCTabBar.m; sourceTree = "<group>"; }; |
| 504 | 528 | D2888D9A1E6EBF1B003A77C8 /* LVCLiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCLiveViewController.h; sourceTree = "<group>"; }; |
| ... | ... | @@ -518,9 +542,13 @@ |
| 518 | 542 | isa = PBXFrameworksBuildPhase; |
| 519 | 543 | buildActionMask = 2147483647; |
| 520 | 544 | files = ( |
| 545 | + D25BF8A31E80C4FC007FB138 /* Accelerate.framework in Frameworks */, | |
| 521 | 546 | D2575C7D1E76A4F300E3A8FC /* NHGiftAnimtionSDK.a in Frameworks */, |
| 522 | 547 | 812E50531E7699DC004F5FCD /* CNLivePlayerSDK.framework in Frameworks */, |
| 523 | - 812E50551E7699E9004F5FCD /* CNLiveMsgTools.framework in Frameworks */, | |
| 548 | + D25BF89A1E7FE046007FB138 /* CNLiveChatManager.framework in Frameworks */, | |
| 549 | + D25BF8971E7FE01B007FB138 /* CNLiveMsgTools.framework in Frameworks */, | |
| 550 | + D25BF8991E7FE033007FB138 /* CNLiveChatManager.framework in Frameworks */, | |
| 551 | + D25BF89C1E7FE049007FB138 /* CNLiveMsgTools.framework in Frameworks */, | |
| 524 | 552 | ); |
| 525 | 553 | runOnlyForDeploymentPostprocessing = 0; |
| 526 | 554 | }; |
| ... | ... | @@ -584,8 +612,9 @@ |
| 584 | 612 | 812E504E1E7699B9004F5FCD /* CNLiveSDK */ = { |
| 585 | 613 | isa = PBXGroup; |
| 586 | 614 | children = ( |
| 615 | + D25BF8981E7FE033007FB138 /* CNLiveChatManager.framework */, | |
| 616 | + D25BF8961E7FE01B007FB138 /* CNLiveMsgTools.framework */, | |
| 587 | 617 | D25BF87C1E7B8C78007FB138 /* KSYGPUResource.bundle */, |
| 588 | - 812E504F1E7699DC004F5FCD /* CNLiveMsgTools.framework */, | |
| 589 | 618 | 812E50501E7699DC004F5FCD /* CNLivePlayerSDK.framework */, |
| 590 | 619 | ); |
| 591 | 620 | path = CNLiveSDK; |
| ... | ... | @@ -607,6 +636,7 @@ |
| 607 | 636 | D2029B9D1E6EAAA50027CD92 /* LiveVideoCloudTests */, |
| 608 | 637 | D2029BA81E6EAAA50027CD92 /* LiveVideoCloudUITests */, |
| 609 | 638 | D2029B821E6EAAA50027CD92 /* Products */, |
| 639 | + D25BF8A11E80C4FC007FB138 /* Frameworks */, | |
| 610 | 640 | ); |
| 611 | 641 | sourceTree = "<group>"; |
| 612 | 642 | }; |
| ... | ... | @@ -628,7 +658,7 @@ |
| 628 | 658 | D2029CDC1E6EAE2E0027CD92 /* UtilKits */, |
| 629 | 659 | D2029BD01E6EADE10027CD92 /* Classes */, |
| 630 | 660 | D2029CD11E6EADE70027CD92 /* HttpService */, |
| 631 | - D2029CD71E6EAE140027CD92 /* Resource */, | |
| 661 | + D25BF88A1E7F7F77007FB138 /* Resource */, | |
| 632 | 662 | D2029B901E6EAAA50027CD92 /* animation.xcassets */, |
| 633 | 663 | D2029CD61E6EADFB0027CD92 /* PrefixHeader.pch */, |
| 634 | 664 | D2029B841E6EAAA50027CD92 /* Supporting Files */, |
| ... | ... | @@ -1082,45 +1112,6 @@ |
| 1082 | 1112 | path = HttpService; |
| 1083 | 1113 | sourceTree = "<group>"; |
| 1084 | 1114 | }; |
| 1085 | - D2029CD71E6EAE140027CD92 /* Resource */ = { | |
| 1086 | - isa = PBXGroup; | |
| 1087 | - children = ( | |
| 1088 | - D2029CD81E6EAE140027CD92 /* Fonts */, | |
| 1089 | - D2029CD91E6EAE140027CD92 /* Images */, | |
| 1090 | - D2029CDA1E6EAE140027CD92 /* Sound */, | |
| 1091 | - D2029CDB1E6EAE140027CD92 /* Videos */, | |
| 1092 | - ); | |
| 1093 | - path = Resource; | |
| 1094 | - sourceTree = "<group>"; | |
| 1095 | - }; | |
| 1096 | - D2029CD81E6EAE140027CD92 /* Fonts */ = { | |
| 1097 | - isa = PBXGroup; | |
| 1098 | - children = ( | |
| 1099 | - ); | |
| 1100 | - path = Fonts; | |
| 1101 | - sourceTree = "<group>"; | |
| 1102 | - }; | |
| 1103 | - D2029CD91E6EAE140027CD92 /* Images */ = { | |
| 1104 | - isa = PBXGroup; | |
| 1105 | - children = ( | |
| 1106 | - ); | |
| 1107 | - path = Images; | |
| 1108 | - sourceTree = "<group>"; | |
| 1109 | - }; | |
| 1110 | - D2029CDA1E6EAE140027CD92 /* Sound */ = { | |
| 1111 | - isa = PBXGroup; | |
| 1112 | - children = ( | |
| 1113 | - ); | |
| 1114 | - path = Sound; | |
| 1115 | - sourceTree = "<group>"; | |
| 1116 | - }; | |
| 1117 | - D2029CDB1E6EAE140027CD92 /* Videos */ = { | |
| 1118 | - isa = PBXGroup; | |
| 1119 | - children = ( | |
| 1120 | - ); | |
| 1121 | - path = Videos; | |
| 1122 | - sourceTree = "<group>"; | |
| 1123 | - }; | |
| 1124 | 1115 | D2029CDC1E6EAE2E0027CD92 /* UtilKits */ = { |
| 1125 | 1116 | isa = PBXGroup; |
| 1126 | 1117 | children = ( |
| ... | ... | @@ -1152,6 +1143,8 @@ |
| 1152 | 1143 | D2029CE91E6EAE2E0027CD92 /* UILabel+labelFitSize.m */, |
| 1153 | 1144 | D2029CEA1E6EAE2E0027CD92 /* UIView+Extension.h */, |
| 1154 | 1145 | D2029CEB1E6EAE2E0027CD92 /* UIView+Extension.m */, |
| 1146 | + D25BF89E1E80C4BD007FB138 /* UIImage+LVCVagueImage.h */, | |
| 1147 | + D25BF89F1E80C4BD007FB138 /* UIImage+LVCVagueImage.m */, | |
| 1155 | 1148 | ); |
| 1156 | 1149 | path = Category; |
| 1157 | 1150 | sourceTree = "<group>"; |
| ... | ... | @@ -1389,6 +1382,55 @@ |
| 1389 | 1382 | path = View; |
| 1390 | 1383 | sourceTree = "<group>"; |
| 1391 | 1384 | }; |
| 1385 | + D25BF88A1E7F7F77007FB138 /* Resource */ = { | |
| 1386 | + isa = PBXGroup; | |
| 1387 | + children = ( | |
| 1388 | + D25BF88C1E7F7F77007FB138 /* Images */, | |
| 1389 | + D25BF88B1E7F7F77007FB138 /* Fonts */, | |
| 1390 | + D25BF88D1E7F7F77007FB138 /* Sound */, | |
| 1391 | + D25BF88E1E7F7F77007FB138 /* Videos */, | |
| 1392 | + ); | |
| 1393 | + path = Resource; | |
| 1394 | + sourceTree = "<group>"; | |
| 1395 | + }; | |
| 1396 | + D25BF88B1E7F7F77007FB138 /* Fonts */ = { | |
| 1397 | + isa = PBXGroup; | |
| 1398 | + children = ( | |
| 1399 | + ); | |
| 1400 | + path = Fonts; | |
| 1401 | + sourceTree = "<group>"; | |
| 1402 | + }; | |
| 1403 | + D25BF88C1E7F7F77007FB138 /* Images */ = { | |
| 1404 | + isa = PBXGroup; | |
| 1405 | + children = ( | |
| 1406 | + D25BF88F1E7F7F8F007FB138 /* UGCLoading.jpeg */, | |
| 1407 | + D25BF8A41E80EC76007FB138 /* 头像.jpg */, | |
| 1408 | + ); | |
| 1409 | + path = Images; | |
| 1410 | + sourceTree = "<group>"; | |
| 1411 | + }; | |
| 1412 | + D25BF88D1E7F7F77007FB138 /* Sound */ = { | |
| 1413 | + isa = PBXGroup; | |
| 1414 | + children = ( | |
| 1415 | + ); | |
| 1416 | + path = Sound; | |
| 1417 | + sourceTree = "<group>"; | |
| 1418 | + }; | |
| 1419 | + D25BF88E1E7F7F77007FB138 /* Videos */ = { | |
| 1420 | + isa = PBXGroup; | |
| 1421 | + children = ( | |
| 1422 | + ); | |
| 1423 | + path = Videos; | |
| 1424 | + sourceTree = "<group>"; | |
| 1425 | + }; | |
| 1426 | + D25BF8A11E80C4FC007FB138 /* Frameworks */ = { | |
| 1427 | + isa = PBXGroup; | |
| 1428 | + children = ( | |
| 1429 | + D25BF8A21E80C4FC007FB138 /* Accelerate.framework */, | |
| 1430 | + ); | |
| 1431 | + name = Frameworks; | |
| 1432 | + sourceTree = "<group>"; | |
| 1433 | + }; | |
| 1392 | 1434 | D2888D911E6EB897003A77C8 /* View */ = { |
| 1393 | 1435 | isa = PBXGroup; |
| 1394 | 1436 | children = ( |
| ... | ... | @@ -1436,6 +1478,8 @@ |
| 1436 | 1478 | 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */, |
| 1437 | 1479 | 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */, |
| 1438 | 1480 | 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */, |
| 1481 | + D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */, | |
| 1482 | + D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */, | |
| 1439 | 1483 | ); |
| 1440 | 1484 | path = Controller; |
| 1441 | 1485 | sourceTree = "<group>"; |
| ... | ... | @@ -1454,6 +1498,10 @@ |
| 1454 | 1498 | 810B64DF1E779AE900133E15 /* LVCPlayer.m */, |
| 1455 | 1499 | 8112D42F1E7927A5002E00F6 /* LVCPlayerLoadingView.h */, |
| 1456 | 1500 | 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */, |
| 1501 | + D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */, | |
| 1502 | + D25BF8821E7F775F007FB138 /* LVCUGCPlayerLoadingView.m */, | |
| 1503 | + D25BF8911E7FBAEA007FB138 /* LVCUGCBackgroundView.h */, | |
| 1504 | + D25BF8921E7FBAEA007FB138 /* LVCUGCBackgroundView.m */, | |
| 1457 | 1505 | ); |
| 1458 | 1506 | path = View; |
| 1459 | 1507 | sourceTree = "<group>"; |
| ... | ... | @@ -1603,6 +1651,8 @@ |
| 1603 | 1651 | D2029C971E6EADE10027CD92 /* Info.plist in Resources */, |
| 1604 | 1652 | D2575C7F1E76A4F300E3A8FC /* NHPlaneViews.xib in Resources */, |
| 1605 | 1653 | D2575C7B1E76A4F300E3A8FC /* NHCarViews.xib in Resources */, |
| 1654 | + D25BF8901E7F7F8F007FB138 /* UGCLoading.jpeg in Resources */, | |
| 1655 | + D25BF8A51E80EC76007FB138 /* 头像.jpg in Resources */, | |
| 1606 | 1656 | D2029CC91E6EADE10027CD92 /* SVProgressHUD.bundle in Resources */, |
| 1607 | 1657 | D2575C801E76A4F300E3A8FC /* resource.bundle in Resources */, |
| 1608 | 1658 | D2029B941E6EAAA50027CD92 /* LaunchScreen.storyboard in Resources */, |
| ... | ... | @@ -1637,6 +1687,7 @@ |
| 1637 | 1687 | D2029CC31E6EADE10027CD92 /* UIImageView+HighlightedWebCache.m in Sources */, |
| 1638 | 1688 | D22830FF1E77C69E00627701 /* GiftListView.m in Sources */, |
| 1639 | 1689 | D2029CC01E6EADE10027CD92 /* UIImage+GIF.m in Sources */, |
| 1690 | + D25BF8831E7F775F007FB138 /* LVCUGCPlayerLoadingView.m in Sources */, | |
| 1640 | 1691 | D2029BCF1E6EADD70027CD92 /* ZXTabBarController.m in Sources */, |
| 1641 | 1692 | D2029D071E6EAE2E0027CD92 /* ZXConst.m in Sources */, |
| 1642 | 1693 | D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */, |
| ... | ... | @@ -1644,6 +1695,7 @@ |
| 1644 | 1695 | D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */, |
| 1645 | 1696 | D2029CC11E6EADE10027CD92 /* UIImage+MultiFormat.m in Sources */, |
| 1646 | 1697 | D2029C861E6EADE10027CD92 /* Tools.m in Sources */, |
| 1698 | + D25BF8931E7FBAEA007FB138 /* LVCUGCBackgroundView.m in Sources */, | |
| 1647 | 1699 | D2029CA01E6EADE10027CD92 /* NSObject+MJProperty.m in Sources */, |
| 1648 | 1700 | D2029CB51E6EADE10027CD92 /* SDiOSVersion.m in Sources */, |
| 1649 | 1701 | D2029C9C1E6EADE10027CD92 /* MJPropertyType.m in Sources */, |
| ... | ... | @@ -1719,6 +1771,7 @@ |
| 1719 | 1771 | D2029B861E6EAAA50027CD92 /* main.m in Sources */, |
| 1720 | 1772 | D2029C8C1E6EADE10027CD92 /* AFURLSessionManager.m in Sources */, |
| 1721 | 1773 | D2029C9F1E6EADE10027CD92 /* NSObject+MJKeyValue.m in Sources */, |
| 1774 | + D25BF8A01E80C4BD007FB138 /* UIImage+LVCVagueImage.m in Sources */, | |
| 1722 | 1775 | D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */, |
| 1723 | 1776 | 810B65021E779B1F00133E15 /* MASViewAttribute.m in Sources */, |
| 1724 | 1777 | D2029CAC1E6EADE10027CD92 /* MJRefreshBackStateFooter.m in Sources */, |
| ... | ... | @@ -1732,6 +1785,7 @@ |
| 1732 | 1785 | D2029BCA1E6EADD70027CD92 /* BaseModel.m in Sources */, |
| 1733 | 1786 | D25BF87B1E7B8A82007FB138 /* SliderView.m in Sources */, |
| 1734 | 1787 | 810B65041E779B1F00133E15 /* NSArray+MASAdditions.m in Sources */, |
| 1788 | + D25BF8801E7BD266007FB138 /* LVCUGCLivePlayerController.m in Sources */, | |
| 1735 | 1789 | D2029D031E6EAE2E0027CD92 /* UIImage+ZXExtension.m in Sources */, |
| 1736 | 1790 | D2029D0A1E6EAE2E0027CD92 /* ZXServerUrl.m in Sources */, |
| 1737 | 1791 | D2029CCA1E6EADE10027CD92 /* SVProgressHUD.m in Sources */, |
| ... | ... | @@ -1956,6 +2010,7 @@ |
| 1956 | 2010 | buildSettings = { |
| 1957 | 2011 | BUNDLE_LOADER = "$(TEST_HOST)"; |
| 1958 | 2012 | INFOPLIST_FILE = LiveVideoCloudTests/Info.plist; |
| 2013 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |
| 1959 | 2014 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; |
| 1960 | 2015 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudTests; |
| 1961 | 2016 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| ... | ... | @@ -1968,6 +2023,7 @@ |
| 1968 | 2023 | buildSettings = { |
| 1969 | 2024 | BUNDLE_LOADER = "$(TEST_HOST)"; |
| 1970 | 2025 | INFOPLIST_FILE = LiveVideoCloudTests/Info.plist; |
| 2026 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |
| 1971 | 2027 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; |
| 1972 | 2028 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudTests; |
| 1973 | 2029 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| ... | ... | @@ -1979,6 +2035,7 @@ |
| 1979 | 2035 | isa = XCBuildConfiguration; |
| 1980 | 2036 | buildSettings = { |
| 1981 | 2037 | INFOPLIST_FILE = LiveVideoCloudUITests/Info.plist; |
| 2038 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |
| 1982 | 2039 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; |
| 1983 | 2040 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudUITests; |
| 1984 | 2041 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| ... | ... | @@ -1990,6 +2047,7 @@ |
| 1990 | 2047 | isa = XCBuildConfiguration; |
| 1991 | 2048 | buildSettings = { |
| 1992 | 2049 | INFOPLIST_FILE = LiveVideoCloudUITests/Info.plist; |
| 2050 | + IPHONEOS_DEPLOYMENT_TARGET = 8.0; | |
| 1993 | 2051 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; |
| 1994 | 2052 | PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.zhangxu.LiveVideoCloudUITests; |
| 1995 | 2053 | PRODUCT_NAME = "$(TARGET_NAME)"; | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/CNLiveChatManager
0 → 100755
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatManager.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveChatManager.h | |
| 3 | +// CNLiveChatManager | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/2/27. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import "CNLiveChatUserInfo.h" | |
| 11 | +#import "CNLiveChatStatusDefine.h" | |
| 12 | +#import "CNLiveChatMessage.h" | |
| 13 | + | |
| 14 | +@protocol CNLiveChatManagerDelegate <NSObject> | |
| 15 | + | |
| 16 | +@optional | |
| 17 | +/** | |
| 18 | + 连接状态的的监听器 | |
| 19 | + | |
| 20 | + @param status 网络连接状态码 | |
| 21 | + */ | |
| 22 | +- (void)onConnectionStatusChanged:(CNLiveConnectionStatus)status; | |
| 23 | + | |
| 24 | + | |
| 25 | +/** | |
| 26 | + 加入聊天室成功的监听 | |
| 27 | + @param chatroomId 聊天室ID | |
| 28 | + */ | |
| 29 | +- (void)onChatRoomJoined:(NSString *)chatroomId; | |
| 30 | + | |
| 31 | + | |
| 32 | +/*! | |
| 33 | + 加入聊天室失败的监听 | |
| 34 | + | |
| 35 | + @param chatroomId 聊天室ID | |
| 36 | + @param errorCode 加入失败的错误码 | |
| 37 | + | |
| 38 | + @discussion 如果错误码是CNLive_KICKED_FROM_CHATROOM或CNLive_CHATROOM_NOT_EXIST,则不会自动重新加入聊天室,App需要按照自己的逻辑处理。 | |
| 39 | + */ | |
| 40 | +- (void)onChatRoomJoinFailed:(NSString *)chatroomId | |
| 41 | + errorCode:(CNLiveChatErrorCode)errorCode; | |
| 42 | + | |
| 43 | +/** | |
| 44 | + 接收消息监听 | |
| 45 | + | |
| 46 | + @param message 消息实体类型对象(包括消息内容,消息ID,会话类型,目标ID,发送者的用户信息) | |
| 47 | + */ | |
| 48 | +- (void)onReceived:(CNLiveChatMessage *)message; | |
| 49 | + | |
| 50 | + | |
| 51 | +/** | |
| 52 | + 当前用户在其他设备上登录,此设备被踢下线。 | |
| 53 | + */ | |
| 54 | +- (void)kickedByAnotherDevice; | |
| 55 | + | |
| 56 | +@end | |
| 57 | + | |
| 58 | +@interface CNLiveChatManager : NSObject | |
| 59 | + | |
| 60 | +/** | |
| 61 | + 聊天SDK代理,设置代理后,实现代理方法。 | |
| 62 | + */ | |
| 63 | +@property (nonatomic, weak) id<CNLiveChatManagerDelegate> delegate; | |
| 64 | + | |
| 65 | +/** | |
| 66 | + 当前登录用户的用户信息 | |
| 67 | + | |
| 68 | + @discussion 用于与融云服务器建立连接之后,获取&设置当前用户的用户信息。 | |
| 69 | + 用户ID不允许重新设置,只能设置昵称&头像。 | |
| 70 | + */ | |
| 71 | +@property(nonatomic, strong) CNLiveChatUserInfo *currentUserInfo; | |
| 72 | + | |
| 73 | +/** | |
| 74 | + 获取SDK版本号 | |
| 75 | + | |
| 76 | + @return SDK版本号 | |
| 77 | + */ | |
| 78 | ++ (NSString *)getVersion; | |
| 79 | + | |
| 80 | + | |
| 81 | +/** | |
| 82 | + 获取视讯聊天核心类单例 | |
| 83 | + | |
| 84 | + @return 视讯聊天核心类单例 | |
| 85 | + | |
| 86 | + @discussion 您可以通过此方法,获取视讯聊天的单例,访问对象中的属性和方法。 | |
| 87 | + */ | |
| 88 | ++ (instancetype)sharedCNLiveChatManager; | |
| 89 | + | |
| 90 | + | |
| 91 | +/** | |
| 92 | + 初始化SDK方法 | |
| 93 | + | |
| 94 | + @param appKey 从视讯云平台获取到的appKey | |
| 95 | + @param appId 从视讯云平台获取到的appId | |
| 96 | + @warning 必传参数 | |
| 97 | + @discussion 您在使用聊天SDK所有功能之前,您必须先调用此方法初始化SDK。 | |
| 98 | + 在App整个生命周期中,您只需要执行一次初始化。 | |
| 99 | + */ | |
| 100 | +- (void)initWithAppKey:(NSString *)appKey appId:(NSString *)appId; | |
| 101 | + | |
| 102 | + | |
| 103 | +/** | |
| 104 | + 连接到视讯云服务器 | |
| 105 | + | |
| 106 | + @param successBlock 连接建立成功的回调。 | |
| 107 | + @param errorBlock 连接建立成功的回调,返回错误码。 | |
| 108 | + 注:连接服务器成功后才能使用聊天功能(如:单聊、加入聊天室、聊天室内 聊天); | |
| 109 | + */ | |
| 110 | +- (void)connectServerSuccess:(void (^)())successBlock | |
| 111 | + error:(void (^)(CNLiveChatConnectErrorCode errors))errorBlock; | |
| 112 | + | |
| 113 | +/** | |
| 114 | + 以用户信息登陆到视讯云服务器 | |
| 115 | + | |
| 116 | + @param userInfo 用户信息 | |
| 117 | + @param successBlock 登陆成功的回调,返回登陆成功的用户ID。 | |
| 118 | + @param errorBlock 登陆失败的回调,返回错误码。 | |
| 119 | + 注:连接服务器成功后才能使用聊天功能(如:单聊、加入聊天室、聊天室内 聊天); | |
| 120 | + */ | |
| 121 | +- (void)loginServer:(CNLiveChatUserInfo *)userInfo | |
| 122 | + success:(void (^)(NSString *userId))successBlock | |
| 123 | + error:(void (^)(CNLiveChatConnectErrorCode errors))errorBlock; | |
| 124 | + | |
| 125 | + | |
| 126 | +/** | |
| 127 | + 当前用户登出服务器 | |
| 128 | + */ | |
| 129 | +- (void)logoutServer; | |
| 130 | + | |
| 131 | + | |
| 132 | +/** | |
| 133 | + 断开与服务器的连接 | |
| 134 | + | |
| 135 | + @param isReceivePush 与服务器断开后,是否还接收远程推送 | |
| 136 | + */ | |
| 137 | +- (void)disconnectServer:(BOOL)isReceivePush; | |
| 138 | + | |
| 139 | + | |
| 140 | +/** | |
| 141 | + 加入已经存在的聊天室(如果不存在或超限会返回聊天室不存在错误23410 或 人数超限23411) | |
| 142 | + | |
| 143 | + @param targetId 要加入的聊天室ID | |
| 144 | + @param messageCount 进入聊天室时获取历史消息的数量,-1<=messageCount<=50 | |
| 145 | + -1表示不获取任何历史消息,0表示不特殊设置而使用SDK默认的设置(默认为获取10条),0<messageCount<=50为具体获取的消息数量,最大值为50。 | |
| 146 | + @param successBlock 加入聊天室成功的回调,返回成功加入的聊天室ID。 | |
| 147 | + @param errorBlock 加入聊天室失败的回调,返回错误码以及加入失败的聊天室ID。 | |
| 148 | + */ | |
| 149 | +- (void)joinExistChatRoom:(NSString *)targetId | |
| 150 | + messageCount:(int)messageCount | |
| 151 | + success:(void (^)(NSString *targetId))successBlock | |
| 152 | + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock; | |
| 153 | + | |
| 154 | + | |
| 155 | +/** | |
| 156 | + 加入聊天室,若不存在自动创建聊天室 | |
| 157 | + | |
| 158 | + @param targetId 要加入的聊天室ID | |
| 159 | + @param messageCount 进入聊天室时获取历史消息的数量,-1<=messageCount<=50 | |
| 160 | + -1表示不获取任何历史消息,0表示不特殊设置而使用SDK默认的设置(默认为获取10条),0<messageCount<=50为具体获取的消息数量,最大值为50。 | |
| 161 | + @param successBlock 加入聊天室成功的回调,返回成功加入的聊天室ID | |
| 162 | + @param errorBlock 加入聊天室失败的回调,返回错误码以及加入失败的聊天室ID | |
| 163 | + */ | |
| 164 | +- (void)joinChatRoom:(NSString *)targetId | |
| 165 | + messageCount:(int)messageCount | |
| 166 | + success:(void (^)(NSString *targetId))successBlock | |
| 167 | + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock; | |
| 168 | + | |
| 169 | + | |
| 170 | +/** | |
| 171 | + 退出聊天室 | |
| 172 | + | |
| 173 | + @param targetId 要退出的聊天室ID | |
| 174 | + @param successBlock 退出聊天室成功的回调,返回成功退出的聊天室ID | |
| 175 | + @param errorBlock 退出聊天室失败的回调,返回失败的错误码以及退出失败的聊天室的ID | |
| 176 | + */ | |
| 177 | +- (void)quitChatRoom:(NSString *)targetId | |
| 178 | + success:(void (^)(NSString *targetId))successBlock | |
| 179 | + error:(void (^)(CNLiveChatErrorCode errors, NSString *targetId))errorBlock; | |
| 180 | + | |
| 181 | + | |
| 182 | +/** | |
| 183 | + 发送消息 | |
| 184 | + | |
| 185 | + @param message 消息内容 | |
| 186 | + @param type 会话类型(私聊 / 聊天室) | |
| 187 | + @param targetId 会话目标ID(私聊:用户ID / 聊天室:聊天室ID) | |
| 188 | + @param successBlock 发送消息成功的回调,消息实体类型对象(包括消息内容,消息ID,会话类型,目标ID,发送者的用户信息) | |
| 189 | + @param errorBlock 发送消息失败的回调,返回错误码,消息ID,目标ID | |
| 190 | + */ | |
| 191 | +- (void)sendMessage:(NSString *)message | |
| 192 | + type:(CNLiveConversationType)type | |
| 193 | + targetId:(NSString *)targetId | |
| 194 | + success:(void (^)(CNLiveChatMessage *message))successBlock | |
| 195 | + error:(void (^)(CNLiveChatErrorCode errors, NSString *messageId, NSString *targetId))errorBlock; | |
| 196 | + | |
| 197 | + | |
| 198 | +/** | |
| 199 | + 获取当前SDK的连接状态 | |
| 200 | + | |
| 201 | + @return 当前SDK的连接状态 | |
| 202 | + */ | |
| 203 | +- (CNLiveConnectionStatus)getConnectionStatus; | |
| 204 | + | |
| 205 | + | |
| 206 | +/** | |
| 207 | + 获取某个会话中指定数量的最新消息 | |
| 208 | + | |
| 209 | + @param conversationType 会话类型(私聊 / 聊天室) | |
| 210 | + @param targetId 会话目标ID(私聊:用户ID / 聊天室:聊天室ID) | |
| 211 | + @param count 所要获取的消息数量 | |
| 212 | + | |
| 213 | + @return 消息数组(CNLiveChatMessage类型) | |
| 214 | + @discussion | |
| 215 | + 此方法会获取该会话中指定数量的最新消息实体,返回的消息实体按照时间从新到旧排列。 | |
| 216 | + 如果会话中的消息数量小于参数count的值,会将该会话中的所有消息返回。 | |
| 217 | + */ | |
| 218 | +- (NSArray *)getLatestMessages:(CNLiveConversationType)conversationType | |
| 219 | + targetId:(NSString *)targetId | |
| 220 | + count:(int)count; | |
| 221 | + | |
| 222 | + | |
| 223 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatMessage.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveChatMessage.h | |
| 3 | +// CNLiveChatManager | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/3. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import "CNLiveChatStatusDefine.h" | |
| 11 | +#import "CNLiveChatUserInfo.h" | |
| 12 | + | |
| 13 | +@interface CNLiveChatMessage : NSObject | |
| 14 | + | |
| 15 | +/** | |
| 16 | + 会话类型(私聊 / 聊天室) | |
| 17 | + */ | |
| 18 | +@property (nonatomic, assign) CNLiveConversationType conversationType; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + 目标ID(消息来自聊天室的ID / 接收者ID) | |
| 22 | + */ | |
| 23 | +@property (nonatomic, assign) NSString *targetId; | |
| 24 | + | |
| 25 | +/** | |
| 26 | + 消息ID(本地存储的消息的唯一值(数据库索引唯一值)) | |
| 27 | + */ | |
| 28 | +@property (nonatomic, assign) NSString *messageId; | |
| 29 | + | |
| 30 | +/** | |
| 31 | + 消息内容 | |
| 32 | + */ | |
| 33 | +@property (nonatomic, strong) NSString *messageContent; | |
| 34 | + | |
| 35 | +/** | |
| 36 | + 发送者的用户信息(userId, name, portraitUri) | |
| 37 | + */ | |
| 38 | +@property (nonatomic, strong) CNLiveChatUserInfo *userInfo; | |
| 39 | + | |
| 40 | +/** | |
| 41 | + 消息的接收时间(Unix时间戳、毫秒) | |
| 42 | + */ | |
| 43 | +@property(nonatomic, assign) long long receivedTime; | |
| 44 | + | |
| 45 | +/** | |
| 46 | + 消息的发送时间(Unix时间戳、毫秒) | |
| 47 | + */ | |
| 48 | +@property(nonatomic, assign) long long sentTime; | |
| 49 | + | |
| 50 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatStatusDefine.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveChatStatusDefine.h | |
| 3 | +// CNLiveChatManager | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/1. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +#pragma mark - 错误码相关 | |
| 12 | + | |
| 13 | +#pragma mark CNLiveChatConnectErrorCode - 建立连接返回的错误码 | |
| 14 | +/*! | |
| 15 | + 建立连接返回的错误码 | |
| 16 | + | |
| 17 | + @discussion | |
| 18 | + 开发者仅需要关注以下几种连接错误码,其余错误码SDK均会进行自动重连,开发者无须处理。 | |
| 19 | + CNLive_CONN_ID_REJECT, CNLive_CONN_TOKEN_INCORRECT, CNLive_CONN_NOT_AUTHRORIZED, | |
| 20 | + CNLive_CONN_PACKAGE_NAME_INVALID, CNLive_CONN_APP_BLOCKED_OR_DELETED, | |
| 21 | + CNLive_CONN_USER_BLOCKED, CNLive_DISCONN_KICK, CNLive_CLIENT_NOT_INIT, CNLive_INVALID_PARAMETER, CNLive_INVALID_ARGUMENT | |
| 22 | + */ | |
| 23 | +typedef NS_ENUM(NSInteger, CNLiveChatConnectErrorCode) { | |
| 24 | + | |
| 25 | + /*! | |
| 26 | + 连接已被释放 | |
| 27 | + | |
| 28 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 29 | + */ | |
| 30 | + CNLive_NET_CHANNEL_INVALID = 30001, | |
| 31 | + | |
| 32 | + /*! | |
| 33 | + 连接不可用 | |
| 34 | + | |
| 35 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 36 | + */ | |
| 37 | + CNLive_NET_UNAVAILABLE = 30002, | |
| 38 | + | |
| 39 | + /*! | |
| 40 | + 导航HTTP发送失败 | |
| 41 | + | |
| 42 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 43 | + */ | |
| 44 | + CNLive_NAVI_REQUEST_FAIL = 30004, | |
| 45 | + | |
| 46 | + /*! | |
| 47 | + 导航HTTP请求失败 | |
| 48 | + | |
| 49 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 50 | + */ | |
| 51 | + CNLive_NAVI_RESPONSE_ERROR = 30007, | |
| 52 | + | |
| 53 | + /*! | |
| 54 | + 导航HTTP返回数据格式错误 | |
| 55 | + | |
| 56 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 57 | + */ | |
| 58 | + CNLive_NODE_NOT_FOUND = 30008, | |
| 59 | + | |
| 60 | + /*! | |
| 61 | + 创建Socket连接失败 | |
| 62 | + | |
| 63 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 64 | + */ | |
| 65 | + CNLive_SOCKET_NOT_CONNECTED = 30010, | |
| 66 | + | |
| 67 | + /*! | |
| 68 | + Socket断开 | |
| 69 | + | |
| 70 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 71 | + */ | |
| 72 | + CNLive_SOCKET_DISCONNECTED = 30011, | |
| 73 | + | |
| 74 | + /*! | |
| 75 | + PING失败 | |
| 76 | + | |
| 77 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 78 | + */ | |
| 79 | + CNLive_PING_SEND_FAIL = 30012, | |
| 80 | + | |
| 81 | + /*! | |
| 82 | + PING超时 | |
| 83 | + | |
| 84 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 85 | + */ | |
| 86 | + CNLive_PONG_RECV_FAIL = 30013, | |
| 87 | + | |
| 88 | + /*! | |
| 89 | + 信令发送失败 | |
| 90 | + | |
| 91 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 92 | + */ | |
| 93 | + CNLive_MSG_SEND_FAIL = 30014, | |
| 94 | + | |
| 95 | + /*! | |
| 96 | + 连接过于频繁 | |
| 97 | + | |
| 98 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 99 | + */ | |
| 100 | + CNLive_CONN_OVERFREQUENCY = 30015, | |
| 101 | + | |
| 102 | + /*! | |
| 103 | + 连接ACK超时 | |
| 104 | + | |
| 105 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 106 | + */ | |
| 107 | + CNLive_CONN_ACK_TIMEOUT = 31000, | |
| 108 | + | |
| 109 | + /*! | |
| 110 | + 信令版本错误 | |
| 111 | + | |
| 112 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 113 | + */ | |
| 114 | + CNLive_CONN_PROTO_VERSION_ERROR = 31001, | |
| 115 | + | |
| 116 | + /*! | |
| 117 | + AppKey错误 | |
| 118 | + | |
| 119 | + @discussion 请检查您使用的AppKey是否正确。(*自行处理) | |
| 120 | + */ | |
| 121 | + CNLive_CONN_ID_REJECT = 31002, | |
| 122 | + | |
| 123 | + /*! | |
| 124 | + 服务器当前不可用(预留) | |
| 125 | + | |
| 126 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 127 | + */ | |
| 128 | + CNLive_CONN_SERVER_UNAVAILABLE = 31003, | |
| 129 | + | |
| 130 | + /*! | |
| 131 | + Token无效 | |
| 132 | + | |
| 133 | + @discussion Token无效一般有以下两种原因。(*自行处理) | |
| 134 | + 一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致; | |
| 135 | + 二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。 | |
| 136 | + */ | |
| 137 | + CNLive_CONN_TOKEN_INCORRECT = 31004, | |
| 138 | + | |
| 139 | + /*! | |
| 140 | + AppKey与Token不匹配 | |
| 141 | + | |
| 142 | + @discussion | |
| 143 | + 请检查您使用的AppKey与Token是否正确,是否匹配。一般有以下两种原因。(*自行处理) | |
| 144 | + 一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致; | |
| 145 | + 二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。 | |
| 146 | + */ | |
| 147 | + CNLive_CONN_NOT_AUTHRORIZED = 31005, | |
| 148 | + | |
| 149 | + /*! | |
| 150 | + 连接重定向 | |
| 151 | + | |
| 152 | + @discussion 建立连接的临时错误码,SDK会做好自动重连,开发者无须处理。 | |
| 153 | + */ | |
| 154 | + CNLive_CONN_REDIRECTED = 31006, | |
| 155 | + | |
| 156 | + /*! | |
| 157 | + BundleID不正确 | |
| 158 | + | |
| 159 | + @discussion 请检查您App的BundleID是否正确。(*自行处理) | |
| 160 | + */ | |
| 161 | + CNLive_CONN_PACKAGE_NAME_INVALID = 31007, | |
| 162 | + | |
| 163 | + /*! | |
| 164 | + AppKey被封禁或已删除 | |
| 165 | + | |
| 166 | + @discussion 请检查您使用的AppKey是否正确。(*自行处理) | |
| 167 | + */ | |
| 168 | + CNLive_CONN_APP_BLOCKED_OR_DELETED = 31008, | |
| 169 | + | |
| 170 | + /*! | |
| 171 | + 用户被封禁 | |
| 172 | + | |
| 173 | + @discussion 请检查您使用的Token是否正确,以及对应的UserId是否被封禁。(*自行处理) | |
| 174 | + */ | |
| 175 | + CNLive_CONN_USER_BLOCKED = 31009, | |
| 176 | + | |
| 177 | + /*! | |
| 178 | + Token请求失败 | |
| 179 | + | |
| 180 | + @discussion 请检查连接服务器方法的参数是否正确,特别是用户信息中的用户ID。也可能是无网络。(*自行处理) | |
| 181 | + */ | |
| 182 | + CNLive_CONN_TOKEN_NULL = 31012, | |
| 183 | + | |
| 184 | + /*! | |
| 185 | + 当前用户在其他设备上登陆,此设备被踢下线。(*自行处理) | |
| 186 | + */ | |
| 187 | + CNLive_DISCONN_KICK = 31010, | |
| 188 | + | |
| 189 | + /*! | |
| 190 | + SDK没有初始化 | |
| 191 | + | |
| 192 | + @discussion 在使用SDK任何功能之前,必须先Init。(*自行处理) | |
| 193 | + */ | |
| 194 | + CNLive_CONN_CLIENT_NOT_INIT = 33001, | |
| 195 | + | |
| 196 | + /*! | |
| 197 | + 开发者接口调用时传入的参数错误 | |
| 198 | + | |
| 199 | + @discussion 请检查接口调用时传入的参数类型和值。(*自行处理) | |
| 200 | + */ | |
| 201 | + CNLive_CONN_INVALID_PARAMETER = 33003, | |
| 202 | + | |
| 203 | + /*! | |
| 204 | + Connection已经存在 | |
| 205 | + | |
| 206 | + @discussion | |
| 207 | + 调用过connect之后,建议在token错误或者被踢下线或者用户logout的情况下才需要再次调用connect。SDK会自动重连,不需要应用多次调用connect来保证连接性。(*自行处理) | |
| 208 | + */ | |
| 209 | + CNLive_CONNECTION_EXIST = 34001, | |
| 210 | + | |
| 211 | + /*! | |
| 212 | + Connection正在连接 | |
| 213 | + | |
| 214 | + @discussion | |
| 215 | + Connection正在连接,此时不能再次做connect操作,稍后再做操作(*自行处理) | |
| 216 | + */ | |
| 217 | + CNLive_CONNECTION_CONNING = 34002, | |
| 218 | + | |
| 219 | + /*! | |
| 220 | + 开发者接口调用时传入的参数错误 | |
| 221 | + | |
| 222 | + @discussion 请检查接口调用时传入的参数类型和值。(*自行处理) | |
| 223 | + */ | |
| 224 | + CNLive_INVALID_ARGUMENT = -1000 | |
| 225 | +}; | |
| 226 | + | |
| 227 | +#pragma mark CNLiveChatErrorCode - 具体业务错误码 | |
| 228 | +/*! | |
| 229 | + 具体业务错误码 | |
| 230 | + */ | |
| 231 | +typedef NS_ENUM(NSInteger, CNLiveChatErrorCode) { | |
| 232 | + /*! | |
| 233 | + 未知错误(预留) | |
| 234 | + */ | |
| 235 | + CNLive_ERRORCODE_UNKNOWN = -1, | |
| 236 | + | |
| 237 | + /*! | |
| 238 | + token错误 | |
| 239 | + */ | |
| 240 | + CNLive_ERRORCODE_BY_TOKENERROR = 302, | |
| 241 | + | |
| 242 | + /*! | |
| 243 | + 鉴权失败 此AppId无权加入此targetId的聊天室 | |
| 244 | + */ | |
| 245 | + CNLive_ERRORCODE_BY_AUTHENTICATIONERROR = 303, | |
| 246 | + | |
| 247 | + /*! | |
| 248 | + 不合法的 targetId | |
| 249 | + */ | |
| 250 | + CNLive_ERRORCODE_BY_TARGETIDERROR = 304, | |
| 251 | + | |
| 252 | + /*! | |
| 253 | + 不合法的 会话类型 type | |
| 254 | + */ | |
| 255 | + CNLive_ERRORCODE_BY_CONVERSATIONTYPEERROR = 305, | |
| 256 | + | |
| 257 | + /*! | |
| 258 | + 已被对方加入黑名单 | |
| 259 | + */ | |
| 260 | + CNLive_REJECTED_BY_BLACKLIST = 405, | |
| 261 | + | |
| 262 | + /*! | |
| 263 | + 超时 | |
| 264 | + */ | |
| 265 | + CNLive_ERRORCODE_TIMEOUT = 5004, | |
| 266 | + | |
| 267 | + /*! | |
| 268 | + 发送消息频率过高,1秒钟最多只允许发送5条消息 | |
| 269 | + */ | |
| 270 | + CNLive_SEND_MSG_FREQUENCY_OVERRUN = 20604, | |
| 271 | + | |
| 272 | + /*! | |
| 273 | + 不在该聊天室中 | |
| 274 | + */ | |
| 275 | + CNLive_NOT_IN_CHATROOM = 23406, | |
| 276 | + | |
| 277 | + /*! | |
| 278 | + 在该聊天室中已被禁言 | |
| 279 | + */ | |
| 280 | + CNLive_FORBIDDEN_IN_CHATROOM = 23408, | |
| 281 | + | |
| 282 | + /*! | |
| 283 | + 已被踢出聊天室 | |
| 284 | + */ | |
| 285 | + CNLive_KICKED_FROM_CHATROOM = 23409, | |
| 286 | + | |
| 287 | + /*! | |
| 288 | + 聊天室不存在 | |
| 289 | + */ | |
| 290 | + CNLive_CHATROOM_NOT_EXIST = 23410, | |
| 291 | + | |
| 292 | + /*! | |
| 293 | + 聊天室成员超限 | |
| 294 | + */ | |
| 295 | + CNLive_CHATROOM_IS_FULL = 23411, | |
| 296 | + | |
| 297 | + /*! | |
| 298 | + 聊天室接口参数无效 | |
| 299 | + */ | |
| 300 | + CNLive_PARAMETER_INVALID_CHATROOM = 23412, | |
| 301 | + | |
| 302 | + /*! | |
| 303 | + 聊天室云存储业务未开通 | |
| 304 | + */ | |
| 305 | + CNLive_ROAMING_SERVICE_UNAVAILABLE_CHATROOM = 23414, | |
| 306 | + | |
| 307 | + /*! | |
| 308 | + 当前连接不可用(连接已经被释放) | |
| 309 | + */ | |
| 310 | + CNLive_CHANNEL_INVALID = 30001, | |
| 311 | + | |
| 312 | + /*! | |
| 313 | + 当前连接不可用 | |
| 314 | + */ | |
| 315 | + CNLive_NETWORK_UNAVAILABLE = 30002, | |
| 316 | + | |
| 317 | + /*! | |
| 318 | + 消息响应超时 | |
| 319 | + */ | |
| 320 | + CNLive_MSG_RESPONSE_TIMEOUT = 30003, | |
| 321 | + | |
| 322 | + /*! | |
| 323 | + SDK没有初始化 | |
| 324 | + | |
| 325 | + @discussion 在使用SDK任何功能之前,必须先Init。 | |
| 326 | + */ | |
| 327 | + CNLive_CLIENT_NOT_INIT = 33001, | |
| 328 | + | |
| 329 | + /*! | |
| 330 | + 数据库错误 | |
| 331 | + | |
| 332 | + @discussion 请检查您使用的Token和userId是否正确。 | |
| 333 | + */ | |
| 334 | + CNLive_DATABASE_ERROR = 33002, | |
| 335 | + | |
| 336 | + /*! | |
| 337 | + 开发者接口调用时传入的参数错误 | |
| 338 | + | |
| 339 | + @discussion 请检查接口调用时传入的参数类型和值。 | |
| 340 | + */ | |
| 341 | + CNLive_INVALID_PARAMETER = 33003, | |
| 342 | + | |
| 343 | + /*! | |
| 344 | + 历史消息云存储业务未开通 | |
| 345 | + */ | |
| 346 | + CNLive_MSG_ROAMING_SERVICE_UNAVAILABLE = 33007, | |
| 347 | + | |
| 348 | + /*! | |
| 349 | + 消息大小超限,消息体(序列化成json格式之后的内容)最大128k bytes。 | |
| 350 | + */ | |
| 351 | + CNLive_MSG_SIZE_OUT_OF_LIMIT = 30016 | |
| 352 | +}; | |
| 353 | + | |
| 354 | +#pragma mark - 会话相关 | |
| 355 | + | |
| 356 | +#pragma mark CNLiveConversationType - 会话类型 | |
| 357 | +/*! | |
| 358 | + 会话类型 | |
| 359 | + */ | |
| 360 | +typedef NS_ENUM(NSUInteger, CNLiveConversationType) { | |
| 361 | + /*! | |
| 362 | + 私聊 | |
| 363 | + */ | |
| 364 | + CNLive_ConversationType_PRIVATE = 1, | |
| 365 | + | |
| 366 | + /*! | |
| 367 | + 聊天室 | |
| 368 | + */ | |
| 369 | + CNLive_ConversationType_CHATROOM = 4, | |
| 370 | +}; | |
| 371 | + | |
| 372 | +#pragma mark - 线上状态 | |
| 373 | + | |
| 374 | +#pragma mark CNLiveConnectionStatus - 网络连接状态码 | |
| 375 | +/*! | |
| 376 | + 网络连接状态码 | |
| 377 | + | |
| 378 | + @discussion 开发者仅需要关注以下几种连接状态,其余状态SDK均会进行自动重连。 | |
| 379 | + CNLive_ConnectionStatus_Connected, CNLive_ConnectionStatus_Connecting, | |
| 380 | + CNLive_ConnectionStatus_Unconnected, | |
| 381 | + CNLive_ConnectionStatus_SignUp, CNLive_ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT, | |
| 382 | + CNLive_ConnectionStatus_TOKEN_INCORRECT | |
| 383 | + */ | |
| 384 | +typedef NS_ENUM(NSInteger, CNLiveConnectionStatus) { | |
| 385 | + /*! | |
| 386 | + 未知状态 | |
| 387 | + | |
| 388 | + @discussion 建立连接中出现异常的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 389 | + */ | |
| 390 | + CNLive_ConnectionStatus_UNKNOWN = -1, | |
| 391 | + | |
| 392 | + /*! | |
| 393 | + 连接成功 | |
| 394 | + */ | |
| 395 | + CNLive_ConnectionStatus_Connected = 0, | |
| 396 | + | |
| 397 | + /*! | |
| 398 | + 当前设备网络不可用 | |
| 399 | + | |
| 400 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 401 | + */ | |
| 402 | + CNLive_ConnectionStatus_NETWORK_UNAVAILABLE = 1, | |
| 403 | + | |
| 404 | + /*! | |
| 405 | + 当前设备切换到飞行模式 | |
| 406 | + | |
| 407 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 408 | + */ | |
| 409 | + CNLive_ConnectionStatus_AIRPLANE_MODE = 2, | |
| 410 | + | |
| 411 | + /*! | |
| 412 | + 当前设备切换到 2G(GPRS、EDGE)低速网络 | |
| 413 | + | |
| 414 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 415 | + */ | |
| 416 | + CNLive_ConnectionStatus_Cellular_2G = 3, | |
| 417 | + | |
| 418 | + /*! | |
| 419 | + 当前设备切换到 3G 或 4G 高速网络 | |
| 420 | + | |
| 421 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 422 | + */ | |
| 423 | + CNLive_ConnectionStatus_Cellular_3G_4G = 4, | |
| 424 | + | |
| 425 | + /*! | |
| 426 | + 当前设备切换到 WIFI 网络 | |
| 427 | + | |
| 428 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 429 | + */ | |
| 430 | + CNLive_ConnectionStatus_WIFI = 5, | |
| 431 | + | |
| 432 | + /*! | |
| 433 | + 当前用户在其他设备上登录,此设备被踢下线 | |
| 434 | + */ | |
| 435 | + CNLive_ConnectionStatus_KICKED_OFFLINE_BY_OTHER_CLIENT = 6, | |
| 436 | + | |
| 437 | + /*! | |
| 438 | + 当前用户在 Web 端登录 | |
| 439 | + | |
| 440 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 441 | + */ | |
| 442 | + CNLive_ConnectionStatus_LOGIN_ON_WEB = 7, | |
| 443 | + | |
| 444 | + /*! | |
| 445 | + 服务器异常 | |
| 446 | + | |
| 447 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 448 | + */ | |
| 449 | + CNLive_ConnectionStatus_SERVER_INVALID = 8, | |
| 450 | + | |
| 451 | + /*! | |
| 452 | + 连接验证异常 | |
| 453 | + | |
| 454 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 455 | + */ | |
| 456 | + CNLive_ConnectionStatus_VALIDATE_INVALID = 9, | |
| 457 | + | |
| 458 | + /*! | |
| 459 | + 连接中 | |
| 460 | + */ | |
| 461 | + CNLive_ConnectionStatus_Connecting = 10, | |
| 462 | + | |
| 463 | + /*! | |
| 464 | + 连接失败或未连接 | |
| 465 | + */ | |
| 466 | + CNLive_ConnectionStatus_Unconnected = 11, | |
| 467 | + | |
| 468 | + /*! | |
| 469 | + 已注销 | |
| 470 | + */ | |
| 471 | + CNLive_ConnectionStatus_SignUp = 12, | |
| 472 | + | |
| 473 | + /*! | |
| 474 | + Token无效 | |
| 475 | + | |
| 476 | + @discussion | |
| 477 | + Token无效一般有两种原因。一是token错误,请您检查客户端初始化使用的AppKey和您服务器获取token使用的AppKey是否一致;二是token过期,是因为您在开发者后台设置了token过期时间,您需要请求您的服务器重新获取token并再次用新的token建立连接。 | |
| 478 | + */ | |
| 479 | + CNLive_ConnectionStatus_TOKEN_INCORRECT = 31004, | |
| 480 | + | |
| 481 | + /*! | |
| 482 | + 与服务器的连接已断开 | |
| 483 | + | |
| 484 | + @discussion 建立连接的临时状态,SDK会做好自动重连,开发者无须处理。 | |
| 485 | + */ | |
| 486 | + CNLive_ConnectionStatus_DISCONN_EXCEPTION = 31011, | |
| 487 | + | |
| 488 | + /*! | |
| 489 | + 与服务器的连接已断开 | |
| 490 | + | |
| 491 | + @discussion 无法自动重连,需手动重新连接服务器connectServerSuccess:error:。 | |
| 492 | + */ | |
| 493 | + CNLive_ConnectionStatus_DISCONN_MANUALCONN = 32011 | |
| 494 | +}; | |
| 495 | + | |
| 496 | + | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Headers/CNLiveChatUserInfo.h
0 → 100644
| 1 | +// | |
| 2 | +// CNLiveChatUserInfo.h | |
| 3 | +// CNLiveChatManager | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/1. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface CNLiveChatUserInfo : NSObject | |
| 12 | + | |
| 13 | +/*! | |
| 14 | + 用户ID(一旦以一个用户ID连接到服务器,就不能再修改用户ID了,如果修改也会被忽略) | |
| 15 | + */ | |
| 16 | +@property(nonatomic, strong, readonly) NSString *userId; | |
| 17 | + | |
| 18 | +/*! | |
| 19 | + 用户名称 | |
| 20 | + */ | |
| 21 | +@property(nonatomic, strong) NSString *name; | |
| 22 | + | |
| 23 | +/*! | |
| 24 | + 用户头像的URL | |
| 25 | + */ | |
| 26 | +@property(nonatomic, strong) NSString *portraitUri; | |
| 27 | + | |
| 28 | +/*! | |
| 29 | + 用户信息的初始化方法, | |
| 30 | + | |
| 31 | + @param userId 用户ID | |
| 32 | + @param username 用户名称 | |
| 33 | + @param portrait 用户头像的URL | |
| 34 | + @return 用户信息对象 | |
| 35 | + */ | |
| 36 | +- (instancetype)initWithUserId:(NSString *)userId | |
| 37 | + name:(NSString *)username | |
| 38 | + portrait:(NSString *)portrait; | |
| 39 | + | |
| 40 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Info.plist
0 → 100644
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveChatManager.framework/Modules/module.modulemap
0 → 100644
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/CNLiveMsgTools
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/Headers/CNLiveMsgManager.h
| ... | ... | @@ -17,9 +17,8 @@ |
| 17 | 17 | + (instancetype)sharedCNLiveMsgManager; |
| 18 | 18 | |
| 19 | 19 | |
| 20 | -- (void)setToolsInfoWithInfoId:(NSString *)infoId | |
| 21 | - infoName:(NSString *)infoName | |
| 22 | - infoUrl:(NSString *)infoUrl; | |
| 20 | +- (void)setToolsInfoWithInfoName:(NSString *)infoName | |
| 21 | + infoUrl:(NSString *)infoUrl; | |
| 23 | 22 | |
| 24 | 23 | |
| 25 | 24 | - (NSDictionary *)getToolsInfo; |
| ... | ... | @@ -72,8 +71,8 @@ |
| 72 | 71 | - (void)sendCarrier:(NSString *)carrier |
| 73 | 72 | type:(NSInteger)type |
| 74 | 73 | targetId:(NSString *)targetId |
| 75 | - success:(void (^)(NSString *carrier, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl))successBlock | |
| 76 | - error:(void (^)(NSInteger errors, NSString *targetId, NSInteger type))errorBlock; | |
| 74 | + success:(void (^)(NSString *carrier, NSString *messageId, NSString *targetId, NSInteger type, NSString *infoId, NSString *infoName, NSString *infoUrl, long long goTime, long long comeTime))successBlock | |
| 75 | + error:(void (^)(NSInteger errors, NSString *messageId, NSString *targetId))errorBlock; | |
| 77 | 76 | |
| 78 | 77 | |
| 79 | 78 | - (NSInteger)getOnLineStatus; | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/CNLiveSDK/CNLiveMsgTools.framework/Info.plist
No preview for this file type
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | #import "LVCLivePlayerController.h" |
| 11 | 11 | #import "LVCInteractionController.h" |
| 12 | 12 | #import "LVCLivePlayerController.h" |
| 13 | +#import "LVCUGCLivePlayerController.h" | |
| 13 | 14 | |
| 14 | 15 | @interface HomeViewController () |
| 15 | 16 | |
| ... | ... | @@ -43,6 +44,12 @@ |
| 43 | 44 | [liveBtn addTarget:self action:@selector(liveAction) forControlEvents:UIControlEventTouchUpInside]; |
| 44 | 45 | [self.view addSubview:liveBtn]; |
| 45 | 46 | |
| 47 | + UIButton *UGCLiveBtn = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 48 | + UGCLiveBtn.frame = CGRectMake(0, 200, self.view.width, 40); | |
| 49 | + [UGCLiveBtn setTitle:@"UGC直播" forState:UIControlStateNormal]; | |
| 50 | + [UGCLiveBtn addTarget:self action:@selector(UGCLiveAction) forControlEvents:UIControlEventTouchUpInside]; | |
| 51 | + [self.view addSubview:UGCLiveBtn]; | |
| 52 | + | |
| 46 | 53 | [[UIApplication sharedApplication].keyWindow addSubview:self.interactionBtn]; |
| 47 | 54 | } |
| 48 | 55 | |
| ... | ... | @@ -53,6 +60,12 @@ |
| 53 | 60 | [self.navigationController pushViewController:liveVC animated:YES]; |
| 54 | 61 | } |
| 55 | 62 | |
| 63 | +- (void)UGCLiveAction | |
| 64 | +{ | |
| 65 | + LVCUGCLivePlayerController *UGCLiveVC = [[LVCUGCLivePlayerController alloc] init]; | |
| 66 | + [self.navigationController pushViewController:UGCLiveVC animated:YES]; | |
| 67 | +} | |
| 68 | + | |
| 56 | 69 | - (void)interactionAction |
| 57 | 70 | { |
| 58 | 71 | LVCInteractionController *intVC = [[LVCInteractionController alloc] init]; | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.h
0 → 100644
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCLivePlayerController.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/17. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCUGCLivePlayerController.h" | |
| 10 | +#import <CNLivePlayerSDK/CNLiveWebcastManager.h> | |
| 11 | +#import "LVCUGCPlayerLoadingView.h" | |
| 12 | +#import "LVCUGCBackgroundView.h" | |
| 13 | + | |
| 14 | +#define KAppId @"60_irn9edco29" | |
| 15 | +#define KAppKey @"69fe70bda67e059286ad509d9f5377f815955645b52f94" | |
| 16 | + | |
| 17 | +@interface LVCUGCLivePlayerController () | |
| 18 | + | |
| 19 | +@property (nonatomic, strong) CNLiveMoviePlayerController *player;// 播放器 | |
| 20 | + | |
| 21 | +@property (nonatomic, strong) LVCUGCBackgroundView *bgView; // 背景视图 | |
| 22 | + | |
| 23 | +@property (nonatomic, strong) LVCUGCPlayerLoadingView *loadingView; // 加载视图 | |
| 24 | + | |
| 25 | +@end | |
| 26 | + | |
| 27 | +@implementation LVCUGCLivePlayerController | |
| 28 | + | |
| 29 | +- (void)viewWillAppear:(BOOL)animated { | |
| 30 | + | |
| 31 | + [super viewWillAppear:animated]; | |
| 32 | + | |
| 33 | + self.navigationController.navigationBar.hidden = YES; | |
| 34 | +} | |
| 35 | + | |
| 36 | +- (void)viewWillDisappear:(BOOL)animated { | |
| 37 | + | |
| 38 | + [super viewWillDisappear:animated]; | |
| 39 | + | |
| 40 | + self.navigationController.navigationBar.hidden = NO; | |
| 41 | +} | |
| 42 | + | |
| 43 | +- (void)viewDidLoad { | |
| 44 | + [super viewDidLoad]; | |
| 45 | + | |
| 46 | + self.view.backgroundColor = [UIColor whiteColor]; | |
| 47 | + | |
| 48 | + [self.view addSubview:self.loadingView]; | |
| 49 | + [self.view addSubview:self.bgView]; | |
| 50 | + | |
| 51 | + //添加播放器通知 | |
| 52 | + [self installMovieNotificationObservers]; | |
| 53 | + | |
| 54 | + [[CNLiveWebcastManager manager] initWithAppId:KAppId appKey:KAppKey]; | |
| 55 | + | |
| 56 | + //直播播放 | |
| 57 | + _player = [[CNLiveMoviePlayerController alloc] initLivePlayWithChannelId:@"iOStest" | |
| 58 | + authSuccess:^{ | |
| 59 | + | |
| 60 | + _player.videoDecoderMode = CNLiveMovieVideoDecoderMode_AUTO; | |
| 61 | + _player.view.frame = self.view.bounds; | |
| 62 | + _player.shouldAutoplay = YES; | |
| 63 | + [_player prepareToPlay]; | |
| 64 | + [self.view addSubview:_player.view]; | |
| 65 | + [self.view sendSubviewToBack:_player.view]; | |
| 66 | + | |
| 67 | + } authFailed:^(NSDictionary *errorInfo) { | |
| 68 | + NSLog(@"初始化直播播放器失败:%@", errorInfo); | |
| 69 | + | |
| 70 | + | |
| 71 | + } getAnchorStatusResult:^(BOOL result) { | |
| 72 | + | |
| 73 | + NSLog(@"-------------获取主播状态%d", result ? YES : NO); | |
| 74 | + | |
| 75 | + }]; | |
| 76 | +} | |
| 77 | + | |
| 78 | +#pragma mark - 添加通知监听 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 79 | +-(void)installMovieNotificationObservers //添加视频播放通知 | |
| 80 | +{ | |
| 81 | + //视频加载状态改变 | |
| 82 | + [[NSNotificationCenter defaultCenter] addObserver:self | |
| 83 | + selector:@selector(loadStateDidChange:) | |
| 84 | + name:MPMoviePlayerLoadStateDidChangeNotification | |
| 85 | + object:nil]; | |
| 86 | + | |
| 87 | + //视频播放错误及结束原因 | |
| 88 | + [[NSNotificationCenter defaultCenter] addObserver:self | |
| 89 | + selector:@selector(moviePlayBackDidFinish:) | |
| 90 | + name:MPMoviePlayerPlaybackDidFinishNotification | |
| 91 | + object:nil]; | |
| 92 | + | |
| 93 | + //视频缓冲至可播放状态 | |
| 94 | + [[NSNotificationCenter defaultCenter] addObserver:self | |
| 95 | + selector:@selector(mediaIsPreparedToPlayDidChange:) | |
| 96 | + name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification | |
| 97 | + object:nil]; | |
| 98 | + | |
| 99 | + //视频播放状态改变 | |
| 100 | + [[NSNotificationCenter defaultCenter] addObserver:self | |
| 101 | + selector:@selector(moviePlayBackStateDidChange:) | |
| 102 | + name:MPMoviePlayerPlaybackStateDidChangeNotification | |
| 103 | + object:nil]; | |
| 104 | + | |
| 105 | + | |
| 106 | + //获取主播状态通知(点播和普通播放不需要注册该通知) | |
| 107 | + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(anchorStatusChanged:) | |
| 108 | + name:CNLiveAnchorStatusChangedNotification | |
| 109 | + object:nil]; | |
| 110 | + | |
| 111 | +} | |
| 112 | + | |
| 113 | +#pragma mark - 移除通知 | |
| 114 | +- (void)removeMovieNotificationObservers | |
| 115 | +{ | |
| 116 | + [[NSNotificationCenter defaultCenter]removeObserver:self | |
| 117 | + name:MPMoviePlayerLoadStateDidChangeNotification | |
| 118 | + object:nil]; | |
| 119 | + [[NSNotificationCenter defaultCenter]removeObserver:self | |
| 120 | + name:MPMoviePlayerPlaybackDidFinishNotification | |
| 121 | + object:nil]; | |
| 122 | + [[NSNotificationCenter defaultCenter]removeObserver:self | |
| 123 | + name:MPMediaPlaybackIsPreparedToPlayDidChangeNotification | |
| 124 | + object:nil]; | |
| 125 | + [[NSNotificationCenter defaultCenter]removeObserver:self | |
| 126 | + name:MPMoviePlayerPlaybackStateDidChangeNotification | |
| 127 | + object:nil]; | |
| 128 | + | |
| 129 | + [[NSNotificationCenter defaultCenter]removeObserver:self | |
| 130 | + name:CNLiveAnchorStatusChangedNotification | |
| 131 | + object:nil]; | |
| 132 | +} | |
| 133 | + | |
| 134 | +#pragma mark - 通知 Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 135 | +//视频加载状态改变 | |
| 136 | +- (void)loadStateDidChange:(NSNotification *)notification | |
| 137 | +{ | |
| 138 | + if (_player) { | |
| 139 | + MPMovieLoadState loadState = _player.loadState; | |
| 140 | + if ((loadState & MPMovieLoadStatePlaythroughOK) != 0) { | |
| 141 | + | |
| 142 | + NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState); | |
| 143 | + | |
| 144 | + } else if ((loadState & MPMovieLoadStateStalled) != 0) { | |
| 145 | + NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState); | |
| 146 | + | |
| 147 | + } else { | |
| 148 | + NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState); | |
| 149 | + } | |
| 150 | + } | |
| 151 | +} | |
| 152 | + | |
| 153 | +//视频播放错误及结束原因 | |
| 154 | +- (void)moviePlayBackDidFinish:(NSNotification *)notification | |
| 155 | +{ | |
| 156 | + if (_player) { | |
| 157 | + int reason = [[[notification userInfo] valueForKey:MPMoviePlayerPlaybackDidFinishReasonUserInfoKey] intValue]; | |
| 158 | + if (MPMovieFinishReasonPlaybackError == reason) { | |
| 159 | + | |
| 160 | + | |
| 161 | + } else { | |
| 162 | + | |
| 163 | + } | |
| 164 | + | |
| 165 | + switch (reason) | |
| 166 | + { | |
| 167 | + case MPMovieFinishReasonPlaybackEnded: | |
| 168 | + NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackEnded: %d\n", reason); | |
| 169 | + break; | |
| 170 | + | |
| 171 | + case MPMovieFinishReasonUserExited: | |
| 172 | + NSLog(@"playbackStateDidChange: MPMovieFinishReasonUserExited: %d\n", reason); | |
| 173 | + break; | |
| 174 | + | |
| 175 | + case MPMovieFinishReasonPlaybackError: | |
| 176 | + NSLog(@"playbackStateDidChange: MPMovieFinishReasonPlaybackError: %d\n", reason); | |
| 177 | + break; | |
| 178 | + | |
| 179 | + default: | |
| 180 | + NSLog(@"playbackPlayBackDidFinish: ???: %d\n", reason); | |
| 181 | + break; | |
| 182 | + } | |
| 183 | + } | |
| 184 | +} | |
| 185 | + | |
| 186 | +//视频缓冲至可播放状态 | |
| 187 | +- (void)mediaIsPreparedToPlayDidChange:(NSNotification *)notification | |
| 188 | +{ | |
| 189 | + if (_player) { | |
| 190 | + NSLog(@"isPreparedToPlay"); | |
| 191 | + if (_loadingView) { | |
| 192 | + [_loadingView removeFromSuperview]; | |
| 193 | + } | |
| 194 | + } | |
| 195 | +} | |
| 196 | + | |
| 197 | +//视频播放状态改变 | |
| 198 | +- (void)moviePlayBackStateDidChange:(NSNotification *)notification | |
| 199 | +{ | |
| 200 | + if (_player) { | |
| 201 | + | |
| 202 | + switch (_player.playbackState) { | |
| 203 | + case MPMoviePlaybackStateStopped: { | |
| 204 | + | |
| 205 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateStopped"); | |
| 206 | + break; | |
| 207 | + } | |
| 208 | + case MPMoviePlaybackStatePlaying: { | |
| 209 | + | |
| 210 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePlaying"); | |
| 211 | + break; | |
| 212 | + } | |
| 213 | + case MPMoviePlaybackStatePaused: | |
| 214 | + | |
| 215 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStatePaused"); | |
| 216 | + break; | |
| 217 | + case MPMoviePlaybackStateInterrupted: | |
| 218 | + | |
| 219 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateInterrupted"); | |
| 220 | + break; | |
| 221 | + case MPMoviePlaybackStateSeekingForward: | |
| 222 | + | |
| 223 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingForward"); | |
| 224 | + break; | |
| 225 | + case MPMoviePlaybackStateSeekingBackward: | |
| 226 | + | |
| 227 | + NSLog(@"moviePlayBackStateDidChange : MPMoviePlaybackStateSeekingBackward"); | |
| 228 | + break; | |
| 229 | + default: | |
| 230 | + | |
| 231 | + NSLog(@"moviePlayBackStateDidChange : %ld", (long)_player.playbackState); | |
| 232 | + break; | |
| 233 | + } | |
| 234 | + } | |
| 235 | +} | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | +// 获取主播状态通知 | |
| 240 | +- (void)anchorStatusChanged:(NSNotification *)notification | |
| 241 | +{ | |
| 242 | + if (_player.anchorStatus == 2) { // 已结束 | |
| 243 | + | |
| 244 | + } | |
| 245 | + _bgView.anchorStatus = _player.anchorStatus; | |
| 246 | +} | |
| 247 | + | |
| 248 | +//重新连接获取主播状态 | |
| 249 | +- (void)anchorStatusConnectFailed | |
| 250 | +{ | |
| 251 | + | |
| 252 | +} | |
| 253 | + | |
| 254 | +#pragma mark - getter | |
| 255 | +- (LVCUGCPlayerLoadingView *)loadingView { | |
| 256 | + | |
| 257 | + if (!_loadingView) { | |
| 258 | + _loadingView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds bgImageURLStr:@""]; | |
| 259 | + } | |
| 260 | + return _loadingView; | |
| 261 | +} | |
| 262 | + | |
| 263 | +- (LVCUGCBackgroundView *)bgView { | |
| 264 | + | |
| 265 | + if (!_bgView) { | |
| 266 | + _bgView = [[LVCUGCBackgroundView alloc] init]; | |
| 267 | + _bgView.backgroundColor = [UIColor whiteColor]; | |
| 268 | + _bgView.hidden = YES; | |
| 269 | + } | |
| 270 | + return _bgView; | |
| 271 | +} | |
| 272 | + | |
| 273 | +#pragma mark - 内存警告 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 274 | +- (void)didReceiveMemoryWarning { | |
| 275 | + [super didReceiveMemoryWarning]; | |
| 276 | + // Dispose of any resources that can be recreated. | |
| 277 | +} | |
| 278 | + | |
| 279 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCBackgroundView.h
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCBackgroundView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/20. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface LVCUGCBackgroundView : UIView | |
| 12 | + | |
| 13 | +@property (nonatomic, assign) int anchorStatus; //设置主播状态 | |
| 14 | + | |
| 15 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCBackgroundView.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCBackgroundView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/20. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCUGCBackgroundView.h" | |
| 10 | + | |
| 11 | +@interface LVCUGCBackgroundView() | |
| 12 | + | |
| 13 | +@property (nonatomic, strong) UIImageView *iconView; | |
| 14 | + | |
| 15 | +@property (nonatomic, strong) UILabel *nicknameLabel; | |
| 16 | + | |
| 17 | +@property (nonatomic, strong) UILabel *playInfoLabel; | |
| 18 | + | |
| 19 | +@property (nonatomic, strong) UIButton *backButton; | |
| 20 | + | |
| 21 | +@end | |
| 22 | + | |
| 23 | +@implementation LVCUGCBackgroundView | |
| 24 | + | |
| 25 | + | |
| 26 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 27 | +{ | |
| 28 | + self = [super initWithFrame:frame]; | |
| 29 | + if (self) { | |
| 30 | + [self addSubview:self.iconView]; | |
| 31 | + [self addSubview:self.nicknameLabel]; | |
| 32 | + [self addSubview:self.playInfoLabel]; | |
| 33 | + [self addSubview:self.backButton]; | |
| 34 | + } | |
| 35 | + return self; | |
| 36 | +} | |
| 37 | + | |
| 38 | +#pragma mark - setter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 39 | +- (void)setAnchorStatus:(int)anchorStatus | |
| 40 | +{ | |
| 41 | + switch (anchorStatus) { | |
| 42 | + case 0: | |
| 43 | + self.hidden = YES; | |
| 44 | + break; | |
| 45 | + | |
| 46 | + case 1: | |
| 47 | + _playInfoLabel.text = @"主播已离开,马上回来~"; | |
| 48 | + self.hidden = NO; | |
| 49 | + break; | |
| 50 | + | |
| 51 | + case 2: | |
| 52 | + _playInfoLabel.text = @"直播已结束"; | |
| 53 | + self.hidden = NO; | |
| 54 | + break; | |
| 55 | + | |
| 56 | + default: | |
| 57 | + break; | |
| 58 | + } | |
| 59 | +} | |
| 60 | + | |
| 61 | +#pragma mark - getter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | |
| 62 | + | |
| 63 | +- (UIImageView *)iconView { | |
| 64 | + | |
| 65 | + if (!_iconView) { | |
| 66 | + NSString *path = [[NSBundle mainBundle] pathForResource:@"头像" ofType:@"jpg"]; | |
| 67 | + UIImage *image = [UIImage imageWithContentsOfFile:path]; | |
| 68 | + _iconView = [[UIImageView alloc] initWithImage:image]; | |
| 69 | + _iconView.frame = CGRectMake((SCREEN_WIDTH - 100) * 0.5, 200, 100, 100); | |
| 70 | + _iconView.layer.cornerRadius = 50; | |
| 71 | + _iconView.layer.masksToBounds = YES; | |
| 72 | + } | |
| 73 | + return _iconView; | |
| 74 | +} | |
| 75 | + | |
| 76 | +- (UILabel *)nicknameLabel { | |
| 77 | + | |
| 78 | + if (!_nicknameLabel) { | |
| 79 | + _nicknameLabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - 100) * 0.5, 310, 100, 30)]; | |
| 80 | + _nicknameLabel.textAlignment = NSTextAlignmentCenter; | |
| 81 | + _nicknameLabel.text = @"奥斯卡大家发你看"; | |
| 82 | + } | |
| 83 | + return _nicknameLabel; | |
| 84 | +} | |
| 85 | + | |
| 86 | +- (UILabel *)playInfoLabel { | |
| 87 | + | |
| 88 | + if (!_playInfoLabel) { | |
| 89 | + _playInfoLabel = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_WIDTH - 100) * 0.5, 350, 100, 50)]; | |
| 90 | + _playInfoLabel.textAlignment = NSTextAlignmentCenter; | |
| 91 | + _playInfoLabel.font = [UIFont systemFontOfSize:18]; | |
| 92 | + } | |
| 93 | + return _playInfoLabel; | |
| 94 | +} | |
| 95 | + | |
| 96 | +- (UIButton *)backButton { | |
| 97 | + | |
| 98 | + if (!_backButton) { | |
| 99 | + _backButton = [UIButton buttonWithType:UIButtonTypeCustom]; | |
| 100 | + _backButton.frame = CGRectMake((SCREEN_WIDTH - 200) * 0.5, 410, 200, 40); | |
| 101 | + _backButton.layer.cornerRadius = 20; | |
| 102 | + _backButton.layer.masksToBounds = YES; | |
| 103 | + _backButton.titleLabel.text = @"返回列表"; | |
| 104 | + _backButton.titleLabel.textAlignment = NSTextAlignmentCenter; | |
| 105 | + _backButton.titleLabel.font = [UIFont systemFontOfSize:18]; | |
| 106 | + } | |
| 107 | + return _backButton; | |
| 108 | +} | |
| 109 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCPlayerLoadingView.h
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCPlayerLoadingView.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/20. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface LVCUGCPlayerLoadingView : UIView | |
| 12 | + | |
| 13 | +- (instancetype)initWithFrame:(CGRect)frame bgImageURLStr:(NSString *)bgImageURLStr; | |
| 14 | + | |
| 15 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCPlayerLoadingView.m
0 → 100644
| 1 | +// | |
| 2 | +// LVCUGCPlayerLoadingView.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/20. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "LVCUGCPlayerLoadingView.h" | |
| 10 | +#import "UIImage+LVCVagueImage.h" | |
| 11 | + | |
| 12 | +@interface LVCUGCPlayerLoadingView() { | |
| 13 | + | |
| 14 | + NSString *_bgImageURLStr; | |
| 15 | +} | |
| 16 | + | |
| 17 | +@property (nonatomic, strong) UIImageView *bgImageView; | |
| 18 | + | |
| 19 | +@end | |
| 20 | + | |
| 21 | +@implementation LVCUGCPlayerLoadingView | |
| 22 | + | |
| 23 | +- (instancetype)initWithFrame:(CGRect)frame bgImageURLStr:(NSString *)bgImageURLStr | |
| 24 | +{ | |
| 25 | + self = [super initWithFrame:frame]; | |
| 26 | + if (self) { | |
| 27 | + _bgImageURLStr = bgImageURLStr; | |
| 28 | + [self addSubview:self.bgImageView]; | |
| 29 | + } | |
| 30 | + return self; | |
| 31 | +} | |
| 32 | + | |
| 33 | +- (UIImageView *)bgImageView { | |
| 34 | + if (!_bgImageView) { | |
| 35 | + | |
| 36 | + NSString *path = [[NSBundle mainBundle] pathForResource:@"UGCLoading" ofType:@"jpeg"]; | |
| 37 | + UIImage *image = [UIImage imageWithContentsOfFile:path]; | |
| 38 | + UIImage *blurImage = [UIImage boxblurImage:image withBlurNumber:0.6]; | |
| 39 | + _bgImageView = [[UIImageView alloc] initWithImage:blurImage]; | |
| 40 | + _bgImageView.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); | |
| 41 | + _bgImageView.contentMode = UIViewContentModeScaleAspectFill; | |
| 42 | + _bgImageView.clipsToBounds = YES; | |
| 43 | + } | |
| 44 | + return _bgImageView; | |
| 45 | +} | |
| 46 | + | |
| 47 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/Resource/Images/UGCLoading.jpeg
0 → 100644
876 KB
LiveVideoCloud/LiveVideoCloud/Resource/Images/头像.jpg
0 → 100644
4.88 KB
LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImage+LVCVagueImage.h
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+LVCVagueImage.h | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/21. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@interface UIImage (LVCVagueImage) | |
| 12 | + | |
| 13 | ++ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur; | |
| 14 | + | |
| 15 | +@end | ... | ... |
LiveVideoCloud/LiveVideoCloud/UtilKits/Category/UIImage+LVCVagueImage.m
0 → 100644
| 1 | +// | |
| 2 | +// UIImage+LVCVagueImage.m | |
| 3 | +// LiveVideoCloud | |
| 4 | +// | |
| 5 | +// Created by cnliveJunBo on 17/3/21. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "UIImage+LVCVagueImage.h" | |
| 10 | +#import <Accelerate/Accelerate.h> | |
| 11 | + | |
| 12 | +@implementation UIImage (LVCVagueImage) | |
| 13 | + | |
| 14 | ++ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur | |
| 15 | +{ | |
| 16 | + if (blur < 0.f || blur > 1.f) { | |
| 17 | + blur = 0.5f; | |
| 18 | + } | |
| 19 | + int boxSize = (int)(blur * 40); | |
| 20 | + boxSize = boxSize - (boxSize % 2) + 1; | |
| 21 | + CGImageRef img = image.CGImage; | |
| 22 | + vImage_Buffer inBuffer, outBuffer; | |
| 23 | + vImage_Error error; | |
| 24 | + void *pixelBuffer; | |
| 25 | + //从CGImage中获取数据 | |
| 26 | + CGDataProviderRef inProvider = CGImageGetDataProvider(img); | |
| 27 | + CFDataRef inBitmapData = CGDataProviderCopyData(inProvider); | |
| 28 | + //设置从CGImage获取对象的属性 | |
| 29 | + inBuffer.width = CGImageGetWidth(img); | |
| 30 | + inBuffer.height = CGImageGetHeight(img); | |
| 31 | + inBuffer.rowBytes = CGImageGetBytesPerRow(img); | |
| 32 | + inBuffer.data = (void*)CFDataGetBytePtr(inBitmapData); | |
| 33 | + pixelBuffer = malloc(CGImageGetBytesPerRow(img) * CGImageGetHeight(img)); | |
| 34 | + if(pixelBuffer == NULL) | |
| 35 | + NSLog(@"No pixelbuffer"); | |
| 36 | + outBuffer.data = pixelBuffer; | |
| 37 | + outBuffer.width = CGImageGetWidth(img); | |
| 38 | + outBuffer.height = CGImageGetHeight(img); | |
| 39 | + outBuffer.rowBytes = CGImageGetBytesPerRow(img); | |
| 40 | + error = vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, NULL, 0, 0, boxSize, boxSize, NULL, kvImageEdgeExtend); | |
| 41 | + if (error) { | |
| 42 | + NSLog(@"error from convolution %ld", error); | |
| 43 | + } | |
| 44 | + CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); | |
| 45 | + CGContextRef ctx = CGBitmapContextCreate( outBuffer.data, outBuffer.width, outBuffer.height, 8, outBuffer.rowBytes, colorSpace, kCGImageAlphaNoneSkipLast); | |
| 46 | + CGImageRef imageRef = CGBitmapContextCreateImage (ctx); | |
| 47 | + UIImage *returnImage = [UIImage imageWithCGImage:imageRef]; | |
| 48 | + //clean up CGContextRelease(ctx); | |
| 49 | + CGColorSpaceRelease(colorSpace); | |
| 50 | + free(pixelBuffer); | |
| 51 | + CFRelease(inBitmapData); | |
| 52 | + CGColorSpaceRelease(colorSpace); | |
| 53 | + CGImageRelease(imageRef); | |
| 54 | + return returnImage; | |
| 55 | +} | |
| 56 | + | |
| 57 | +@end | ... | ... |