Commit c5150f3190a3d0161903662d7daf465fda615d9b

Authored by liushiyu
1 parent 155c085f

分享相关功能,续播相关功能

@@ -52,7 +52,7 @@ target 'metaCode' do @@ -52,7 +52,7 @@ target 'metaCode' do
52 pod 'ZFPlayer/AVPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git' 52 pod 'ZFPlayer/AVPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
53 pod 'ZFPlayer/ijkplayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git' 53 pod 'ZFPlayer/ijkplayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
54 #分享 54 #分享
55 -# pod 'CNLiveShareToolKit' 55 + pod 'CNLiveShareToolKit'
56 # pod 'CNLiveTencentopenapi' 56 # pod 'CNLiveTencentopenapi'
57 # pod 'WechatOpenSDK' 57 # pod 'WechatOpenSDK'
58 #网家家输入组件 58 #网家家输入组件
metaCode.xcodeproj/project.pbxproj
@@ -206,6 +206,7 @@ @@ -206,6 +206,7 @@
206 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A212C12B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift */; }; 206 79A212C22B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A212C12B0B5D0700BFA8E3 /* CNLiveShopBodyCouponManagerView.swift */; };
207 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */; }; 207 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */; };
208 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79B2E35F2AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift */; }; 208 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79B2E35F2AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift */; };
  209 + 79B6CCD72B58C2630041B445 /* CNLiveShareView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79B6CCD62B58C2630041B445 /* CNLiveShareView.swift */; };
209 79BA085D2AB18E8300D01875 /* CNLiveSaveAuthDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BA085C2AB18E8300D01875 /* CNLiveSaveAuthDB.swift */; }; 210 79BA085D2AB18E8300D01875 /* CNLiveSaveAuthDB.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BA085C2AB18E8300D01875 /* CNLiveSaveAuthDB.swift */; };
210 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BB1C132B05C51900C5720C /* CNLiveShopCouponViewController.swift */; }; 211 79BB1C142B05C51900C5720C /* CNLiveShopCouponViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BB1C132B05C51900C5720C /* CNLiveShopCouponViewController.swift */; };
211 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BB1C152B05C62900C5720C /* CNLiveShopBodyCouponView.swift */; }; 212 79BB1C162B05C62900C5720C /* CNLiveShopBodyCouponView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79BB1C152B05C62900C5720C /* CNLiveShopBodyCouponView.swift */; };
@@ -469,6 +470,8 @@ @@ -469,6 +470,8 @@
469 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCustomView.swift; sourceTree = "<group>"; }; 470 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCustomView.swift; sourceTree = "<group>"; };
470 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; }; 471 79A68C512A26F59C00DC3B43 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = metaCode/Info.plist; sourceTree = "<group>"; };
471 79B2E35F2AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveConfigModuleInline.swift"; sourceTree = "<group>"; }; 472 79B2E35F2AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSObject+CNLiveConfigModuleInline.swift"; sourceTree = "<group>"; };
  473 + 79B6CCD62B58C2630041B445 /* CNLiveShareView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShareView.swift; sourceTree = "<group>"; };
  474 + 79B6CCD82B58C5B50041B445 /* WechatOpenSDK-XCFramework.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = "WechatOpenSDK-XCFramework.xcframework"; path = "Pods/WechatOpenSDK-XCFramework/WechatOpenSDK-XCFramework.xcframework"; sourceTree = "<group>"; };
472 79BA085C2AB18E8300D01875 /* CNLiveSaveAuthDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSaveAuthDB.swift; sourceTree = "<group>"; }; 475 79BA085C2AB18E8300D01875 /* CNLiveSaveAuthDB.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveSaveAuthDB.swift; sourceTree = "<group>"; };
473 79BB1C132B05C51900C5720C /* CNLiveShopCouponViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponViewController.swift; sourceTree = "<group>"; }; 476 79BB1C132B05C51900C5720C /* CNLiveShopCouponViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopCouponViewController.swift; sourceTree = "<group>"; };
474 79BB1C152B05C62900C5720C /* CNLiveShopBodyCouponView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCouponView.swift; sourceTree = "<group>"; }; 477 79BB1C152B05C62900C5720C /* CNLiveShopBodyCouponView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyCouponView.swift; sourceTree = "<group>"; };
@@ -1121,6 +1124,7 @@ @@ -1121,6 +1124,7 @@
1121 794294A82B4D3018008AAFA0 /* Share */ = { 1124 794294A82B4D3018008AAFA0 /* Share */ = {
1122 isa = PBXGroup; 1125 isa = PBXGroup;
1123 children = ( 1126 children = (
  1127 + 79B6CCD62B58C2630041B445 /* CNLiveShareView.swift */,
1124 ); 1128 );
1125 path = Share; 1129 path = Share;
1126 sourceTree = "<group>"; 1130 sourceTree = "<group>";
@@ -1203,6 +1207,7 @@ @@ -1203,6 +1207,7 @@
1203 796398912A260C0100D045EB /* Common */ = { 1207 796398912A260C0100D045EB /* Common */ = {
1204 isa = PBXGroup; 1208 isa = PBXGroup;
1205 children = ( 1209 children = (
  1210 + 794294A82B4D3018008AAFA0 /* Share */,
1206 792E57D52A3AA28E005834DB /* Util */, 1211 792E57D52A3AA28E005834DB /* Util */,
1207 7963989B2A260E6200D045EB /* Base */, 1212 7963989B2A260E6200D045EB /* Base */,
1208 ); 1213 );
@@ -1212,7 +1217,6 @@ @@ -1212,7 +1217,6 @@
1212 796398922A260C0100D045EB /* Config */ = { 1217 796398922A260C0100D045EB /* Config */ = {
1213 isa = PBXGroup; 1218 isa = PBXGroup;
1214 children = ( 1219 children = (
1215 - 794294A82B4D3018008AAFA0 /* Share */,  
1216 79E496E42AB936E200127BF8 /* Tool */, 1220 79E496E42AB936E200127BF8 /* Tool */,
1217 79579CAA2AAAE905006E5B38 /* Database */, 1221 79579CAA2AAAE905006E5B38 /* Database */,
1218 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */, 1222 7CD675512A29C04B008354C1 /* CNLiveConfigstant.swift */,
@@ -1450,6 +1454,7 @@ @@ -1450,6 +1454,7 @@
1450 83CDF822130E4A93D9977EBC /* Frameworks */ = { 1454 83CDF822130E4A93D9977EBC /* Frameworks */ = {
1451 isa = PBXGroup; 1455 isa = PBXGroup;
1452 children = ( 1456 children = (
  1457 + 79B6CCD82B58C5B50041B445 /* WechatOpenSDK-XCFramework.xcframework */,
1453 7963DEF32B5508540086037D /* CNLiveShareToolKit.framework */, 1458 7963DEF32B5508540086037D /* CNLiveShareToolKit.framework */,
1454 7963DEF12B5507830086037D /* libsqlite3.tbd */, 1459 7963DEF12B5507830086037D /* libsqlite3.tbd */,
1455 7963DEEF2B5507780086037D /* libc++.tbd */, 1460 7963DEEF2B5507780086037D /* libc++.tbd */,
@@ -1783,6 +1788,7 @@ @@ -1783,6 +1788,7 @@
1783 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */, 1788 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */,
1784 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */, 1789 79A212C02B0B5C5400BFA8E3 /* CNLiveShopCouponManagerViewController.swift in Sources */,
1785 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */, 1790 7C2703362A3AFD3A0061EC50 /* CNLiveEnvironment.swift in Sources */,
  1791 + 79B6CCD72B58C2630041B445 /* CNLiveShareView.swift in Sources */,
1786 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */, 1792 798A44FD2A309EBA00815935 /* CNLiveTypeFeedBackViewController.swift in Sources */,
1787 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */, 1793 79656E382AAEBA8E00119A61 /* CNLiveMineInputViewController.swift in Sources */,
1788 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */, 1794 19CC4D522ADD129800308E2A /* CNUpSlideAnimationTransition.swift in Sources */,
@@ -2073,7 +2079,7 @@ @@ -2073,7 +2079,7 @@
2073 CODE_SIGN_STYLE = Automatic; 2079 CODE_SIGN_STYLE = Automatic;
2074 CURRENT_PROJECT_VERSION = 1.0.4.24.01.15.15; 2080 CURRENT_PROJECT_VERSION = 1.0.4.24.01.15.15;
2075 DEVELOPMENT_TEAM = 94X49GG3ZW; 2081 DEVELOPMENT_TEAM = 94X49GG3ZW;
2076 - ENABLE_BITCODE = YES; 2082 + ENABLE_BITCODE = NO;
2077 ENABLE_MODULE_VERIFIER = NO; 2083 ENABLE_MODULE_VERIFIER = NO;
2078 EXCLUDED_ARCHS = ""; 2084 EXCLUDED_ARCHS = "";
2079 FRAMEWORK_SEARCH_PATHS = ( 2085 FRAMEWORK_SEARCH_PATHS = (
@@ -2143,11 +2149,11 @@ @@ -2143,11 +2149,11 @@
2143 "$(inherited)", 2149 "$(inherited)",
2144 "@executable_path/Frameworks", 2150 "@executable_path/Frameworks",
2145 ); 2151 );
  2152 + MARKETING_VERSION = 1.0.4;
2146 OTHER_LDFLAGS = ( 2153 OTHER_LDFLAGS = (
2147 "$(inherited)", 2154 "$(inherited)",
2148 "-all_load", 2155 "-all_load",
2149 "-ObjC", 2156 "-ObjC",
2150 - "-l\"WeChatSDK\"",  
2151 "-l\"bz2\"", 2157 "-l\"bz2\"",
2152 "-l\"c++\"", 2158 "-l\"c++\"",
2153 "-l\"iconv\"", 2159 "-l\"iconv\"",
@@ -2180,8 +2186,6 @@ @@ -2180,8 +2186,6 @@
2180 "-framework", 2186 "-framework",
2181 "\"CNLiveBusinessTools\"", 2187 "\"CNLiveBusinessTools\"",
2182 "-framework", 2188 "-framework",
2183 - "\"CNLiveCommonCategory\"",  
2184 - "-framework",  
2185 "\"CNLiveCustomUI\"", 2189 "\"CNLiveCustomUI\"",
2186 "-framework", 2190 "-framework",
2187 "\"CNLiveEnvironment\"", 2191 "\"CNLiveEnvironment\"",
@@ -2190,8 +2194,6 @@ @@ -2190,8 +2194,6 @@
2190 "-framework", 2194 "-framework",
2191 "\"CNLiveRequestBastKit\"", 2195 "\"CNLiveRequestBastKit\"",
2192 "-framework", 2196 "-framework",
2193 - "\"CNLiveShareToolKit\"",  
2194 - "-framework",  
2195 "\"CNLiveUserManagement\"", 2197 "\"CNLiveUserManagement\"",
2196 "-framework", 2198 "-framework",
2197 "\"CoreAudio\"", 2199 "\"CoreAudio\"",
@@ -2262,8 +2264,6 @@ @@ -2262,8 +2264,6 @@
2262 "-framework", 2264 "-framework",
2263 "\"QuartzCore\"", 2265 "\"QuartzCore\"",
2264 "-framework", 2266 "-framework",
2265 - "\"SDWebImage\"",  
2266 - "-framework",  
2267 "\"SKPhotoBrowser\"", 2267 "\"SKPhotoBrowser\"",
2268 "-framework", 2268 "-framework",
2269 "\"Security\"", 2269 "\"Security\"",
@@ -2305,9 +2305,7 @@ @@ -2305,9 +2305,7 @@
2305 "\"Photos\"", 2305 "\"Photos\"",
2306 "-weak_framework", 2306 "-weak_framework",
2307 "\"SwiftUI\"", 2307 "\"SwiftUI\"",
2308 - "-ld64",  
2309 ); 2308 );
2310 - MARKETING_VERSION = 1.0.4;  
2311 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; 2309 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode;
2312 PRODUCT_NAME = "$(TARGET_NAME)"; 2310 PRODUCT_NAME = "$(TARGET_NAME)";
2313 SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 2311 SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@@ -2333,7 +2331,7 @@ @@ -2333,7 +2331,7 @@
2333 CODE_SIGN_STYLE = Automatic; 2331 CODE_SIGN_STYLE = Automatic;
2334 CURRENT_PROJECT_VERSION = 1.0.4.24.01.15.15; 2332 CURRENT_PROJECT_VERSION = 1.0.4.24.01.15.15;
2335 DEVELOPMENT_TEAM = 94X49GG3ZW; 2333 DEVELOPMENT_TEAM = 94X49GG3ZW;
2336 - ENABLE_BITCODE = YES; 2334 + ENABLE_BITCODE = NO;
2337 ENABLE_MODULE_VERIFIER = NO; 2335 ENABLE_MODULE_VERIFIER = NO;
2338 EXCLUDED_ARCHS = ""; 2336 EXCLUDED_ARCHS = "";
2339 FRAMEWORK_SEARCH_PATHS = ( 2337 FRAMEWORK_SEARCH_PATHS = (
@@ -2403,11 +2401,11 @@ @@ -2403,11 +2401,11 @@
2403 "$(inherited)", 2401 "$(inherited)",
2404 "@executable_path/Frameworks", 2402 "@executable_path/Frameworks",
2405 ); 2403 );
  2404 + MARKETING_VERSION = 1.0.4;
2406 OTHER_LDFLAGS = ( 2405 OTHER_LDFLAGS = (
2407 "$(inherited)", 2406 "$(inherited)",
2408 "-all_load", 2407 "-all_load",
2409 "-ObjC", 2408 "-ObjC",
2410 - "-l\"WeChatSDK\"",  
2411 "-l\"bz2\"", 2409 "-l\"bz2\"",
2412 "-l\"c++\"", 2410 "-l\"c++\"",
2413 "-l\"iconv\"", 2411 "-l\"iconv\"",
@@ -2440,8 +2438,6 @@ @@ -2440,8 +2438,6 @@
2440 "-framework", 2438 "-framework",
2441 "\"CNLiveBusinessTools\"", 2439 "\"CNLiveBusinessTools\"",
2442 "-framework", 2440 "-framework",
2443 - "\"CNLiveCommonCategory\"",  
2444 - "-framework",  
2445 "\"CNLiveCustomUI\"", 2441 "\"CNLiveCustomUI\"",
2446 "-framework", 2442 "-framework",
2447 "\"CNLiveEnvironment\"", 2443 "\"CNLiveEnvironment\"",
@@ -2450,8 +2446,6 @@ @@ -2450,8 +2446,6 @@
2450 "-framework", 2446 "-framework",
2451 "\"CNLiveRequestBastKit\"", 2447 "\"CNLiveRequestBastKit\"",
2452 "-framework", 2448 "-framework",
2453 - "\"CNLiveShareToolKit\"",  
2454 - "-framework",  
2455 "\"CNLiveUserManagement\"", 2449 "\"CNLiveUserManagement\"",
2456 "-framework", 2450 "-framework",
2457 "\"CoreAudio\"", 2451 "\"CoreAudio\"",
@@ -2522,8 +2516,6 @@ @@ -2522,8 +2516,6 @@
2522 "-framework", 2516 "-framework",
2523 "\"QuartzCore\"", 2517 "\"QuartzCore\"",
2524 "-framework", 2518 "-framework",
2525 - "\"SDWebImage\"",  
2526 - "-framework",  
2527 "\"SKPhotoBrowser\"", 2519 "\"SKPhotoBrowser\"",
2528 "-framework", 2520 "-framework",
2529 "\"Security\"", 2521 "\"Security\"",
@@ -2565,9 +2557,7 @@ @@ -2565,9 +2557,7 @@
2565 "\"Photos\"", 2557 "\"Photos\"",
2566 "-weak_framework", 2558 "-weak_framework",
2567 "\"SwiftUI\"", 2559 "\"SwiftUI\"",
2568 - "-ld64",  
2569 ); 2560 );
2570 - MARKETING_VERSION = 1.0.4;  
2571 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode; 2561 PRODUCT_BUNDLE_IDENTIFIER = com.cnlive.metaCode;
2572 PRODUCT_NAME = "$(TARGET_NAME)"; 2562 PRODUCT_NAME = "$(TARGET_NAME)";
2573 SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; 2563 SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
metaCode/Classes/Common/Share/CNLiveShareView.swift 0 → 100644
  1 +//
  2 +// CNLiveShareView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2024/1/18.
  6 +//
  7 +
  8 +import Foundation
  9 +import UIKit
  10 +
  11 +class CNLiveShareView: UIView {
  12 +
  13 +}
metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
@@ -11,7 +11,7 @@ import APButton @@ -11,7 +11,7 @@ import APButton
11 import EmptyDataSet_Swift 11 import EmptyDataSet_Swift
12 import MJRefresh 12 import MJRefresh
13 import CNLiveBusinessTools 13 import CNLiveBusinessTools
14 -//import CNLiveShareToolKit 14 +import CNLiveShareToolKit
15 15
16 class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, CNLiveShortVideoListTableViewCellDelegate, EmptyDataSetSource, EmptyDataSetDelegate { 16 class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, CNLiveShortVideoListTableViewCellDelegate, EmptyDataSetSource, EmptyDataSetDelegate {
17 17
@@ -104,6 +104,23 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele @@ -104,6 +104,23 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
104 super.init(nibName:nil, bundle:nil) 104 super.init(nibName:nil, bundle:nil)
105 } 105 }
106 106
  107 + override func viewWillAppear(_ animated: Bool) {
  108 + super.viewWillAppear(animated)
  109 + if self.dataArray.count == 0 {
  110 + self.playTheIndex(index: self.currentIndex)
  111 + }
  112 + }
  113 +
  114 + override func viewDidAppear(_ animated: Bool) {
  115 + super.viewDidAppear(animated)
  116 + self.player.currentPlayerManager.play()
  117 + }
  118 +
  119 + override func viewWillDisappear(_ animated: Bool) {
  120 + super.viewWillDisappear(animated)
  121 + self.player.currentPlayerManager.pause()
  122 + }
  123 +
107 required init?(coder: NSCoder) { 124 required init?(coder: NSCoder) {
108 fatalError("init(coder:) has not been implemented") 125 fatalError("init(coder:) has not been implemented")
109 } 126 }
@@ -114,7 +131,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele @@ -114,7 +131,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
114 view.addSubview(tableView) 131 view.addSubview(tableView)
115 view.addSubview(backBtn) 132 view.addSubview(backBtn)
116 133
117 - requestData {} 134 + if self.dataArray.count == 0 {
  135 + requestData {}
  136 + }
  137 +
118 addRefreshView() 138 addRefreshView()
119 139
120 player = ZFPlayerController(scrollView: tableView, playerManager: playerManager, containerViewTag: 100) 140 player = ZFPlayerController(scrollView: tableView, playerManager: playerManager, containerViewTag: 100)
@@ -154,6 +174,8 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele @@ -154,6 +174,8 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
154 } 174 }
155 self.playVideo(at: indexPath) 175 self.playVideo(at: indexPath)
156 } 176 }
  177 +
  178 + NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil)
157 } 179 }
158 180
159 func addRefreshView() { 181 func addRefreshView() {
@@ -173,6 +195,16 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele @@ -173,6 +195,16 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
173 self.requestData {} 195 self.requestData {}
174 } 196 }
175 197
  198 + @objc func removePlayerAction() {
  199 + controlView.removeFromSuperview()
  200 + if player != nil {
  201 + player.stopCurrentPlayingCell()
  202 + }
  203 + if (playerManager.player != nil) {
  204 + playerManager.player.stop()
  205 + }
  206 + }
  207 +
176 override func viewWillLayoutSubviews() { 208 override func viewWillLayoutSubviews() {
177 super.viewWillLayoutSubviews() 209 super.viewWillLayoutSubviews()
178 self.backBtn.frame = CGRectMake(15, CGRectGetMaxY(UIApplication.shared.statusBarFrame), 45, 45) 210 self.backBtn.frame = CGRectMake(15, CGRectGetMaxY(UIApplication.shared.statusBarFrame), 45, 45)
@@ -268,6 +300,7 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele @@ -268,6 +300,7 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
268 } 300 }
269 301
270 deinit { 302 deinit {
  303 + NotificationCenter.default.removeObserver(self)
271 tableView.delegate = nil 304 tableView.delegate = nil
272 tableView.dataSource = nil 305 tableView.dataSource = nil
273 controlView.removeFromSuperview() 306 controlView.removeFromSuperview()
@@ -300,10 +333,10 @@ extension CNLiveShortVideoViewController { @@ -300,10 +333,10 @@ extension CNLiveShortVideoViewController {
300 }) 333 })
301 } 334 }
302 func shareActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) { 335 func shareActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
303 -// CNLiveShareManager.showShareViewWithParam(forShareTitle: viewcell.homeModel.title, shareUrl: viewcell.homeModel.shareUrl, shareDesc: viewcell.homeModel.subTitle, shareImage: viewcell.homeModel.poster, screenFull: false, hiddenWjj: true, hiddenQQ: false, hiddenWB: true, hiddenLifeCircle: true, hiddenWechatCircle: false, hiddenWechat: false, hiddenSafari: true, formVC: self, topImage: [], topTitles: [], platformType: .all) { title in} completerBlock: {[weak self] resultType, platformType, typeString in  
304 -// guard let self = self else { return }  
305 -//  
306 -// } 336 + CNLiveShareManager.showShareViewWithParam(forShareTitle: viewcell.homeModel.title, shareUrl: viewcell.homeModel.shareUrl, shareDesc: viewcell.homeModel.subTitle, shareImage: viewcell.homeModel.poster, screenFull: false, hiddenWjj: true, hiddenQQ: false, hiddenWB: true, hiddenLifeCircle: true, hiddenWechatCircle: false, hiddenWechat: false, hiddenSafari: true, formVC: self, topImage: [], topTitles: [], platformType: .all) { title in} completerBlock: {[weak self] resultType, platformType, typeString in
  337 + guard let self = self else { return }
  338 +
  339 + }
307 } 340 }
308 func iconActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) { 341 func iconActionMethod(viewcell: CNLiveShortVideoListTableViewCell, button: UIButton) {
309 self.navigationController?.pushViewController(CNLivePlayletHomePageController(aid: aid), animated: true) 342 self.navigationController?.pushViewController(CNLivePlayletHomePageController(aid: aid), animated: true)
metaCode/Classes/Other/AppDelegate.swift
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 import UIKit 8 import UIKit
9 import CNLiveRequestBastKit 9 import CNLiveRequestBastKit
10 import IQKeyboardManagerSwift 10 import IQKeyboardManagerSwift
11 -//import CNLiveShareToolKit 11 +import CNLiveShareToolKit
12 12
13 @main 13 @main
14 class AppDelegate: UIResponder, UIApplicationDelegate { 14 class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -19,7 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { @@ -19,7 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
19 19
20 // Override point for customization after application launch. 20 // Override point for customization after application launch.
21 //tencentAppId wxAppId 21 //tencentAppId wxAppId
22 -// CNLiveShareManager.registeredShareView(whenDidFinishLaunch: universalLinkURL, appId: APPId, tencentAppId: "", wxAppId: "", wxSecret: "", weiBoAppId: "") 22 + CNLiveShareManager.registeredShareView(whenDidFinishLaunch: universalLinkURL, appId: APPId, tencentAppId: tencentAppId, wxAppId: wxAppId, wxSecret: "", weiBoAppId: "")
23 23
24 CNLiveNetworking.networkStatus { status in 24 CNLiveNetworking.networkStatus { status in
25 25
@@ -83,14 +83,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate { @@ -83,14 +83,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
83 CNLiveNetworking.setupBaseURL(APPLoginHost) 83 CNLiveNetworking.setupBaseURL(APPLoginHost)
84 } 84 }
85 85
86 -// func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {  
87 -// CNLiveShareManager.handleOpenUniversalLink(userActivity)  
88 -// return true  
89 -// }  
90 -//  
91 -// func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {  
92 -// CNLiveShareManager.handleOpen(url)  
93 -// return true  
94 -// } 86 + func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
  87 + CNLiveShareManager.handleOpenUniversalLink(userActivity)
  88 + return true
  89 + }
  90 +
  91 + func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
  92 + CNLiveShareManager.handleOpen(url)
  93 + return true
  94 + }
95 } 95 }
96 96
metaCode/Info.plist
@@ -40,25 +40,22 @@ @@ -40,25 +40,22 @@
40 <string>QQ424ce8ca</string> 40 <string>QQ424ce8ca</string>
41 </array> 41 </array>
42 </dict> 42 </dict>
  43 + <dict>
  44 + <key>CFBundleTypeRole</key>
  45 + <string>Editor</string>
  46 + <key>CFBundleURLName</key>
  47 + <string>元码</string>
  48 + <key>CFBundleURLSchemes</key>
  49 + <array>
  50 + <string>CNLiveMateCodeSchems</string>
  51 + </array>
  52 + </dict>
43 </array> 53 </array>
44 - <key>NSAppTransportSecurity</key>  
45 - <dict>  
46 - <key>NSAllowsArbitraryLoads</key>  
47 - <true/>  
48 - </dict>  
49 - <key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key>  
50 - <true/>  
51 - <key>UIApplicationSceneManifest</key>  
52 - <dict>  
53 - <key>UIApplicationSupportsMultipleScenes</key>  
54 - <false/>  
55 - </dict>  
56 <key>LSApplicationQueriesSchemes</key> 54 <key>LSApplicationQueriesSchemes</key>
57 <array> 55 <array>
58 <string>wechat</string> 56 <string>wechat</string>
59 <string>weixin</string> 57 <string>weixin</string>
60 <string>weixinULAPI</string> 58 <string>weixinULAPI</string>
61 -  
62 <string>mqqOpensdkSSoLogin</string> 59 <string>mqqOpensdkSSoLogin</string>
63 <string>mqqopensdkapiV2</string> 60 <string>mqqopensdkapiV2</string>
64 <string>mqqopensdkapiV3</string> 61 <string>mqqopensdkapiV3</string>
@@ -69,15 +66,29 @@ @@ -69,15 +66,29 @@
69 <string>mqqopensdkminiapp</string> 66 <string>mqqopensdkminiapp</string>
70 <string>mqqopensdknopasteboard</string> 67 <string>mqqopensdknopasteboard</string>
71 <string>mqqopensdkapiV4</string> 68 <string>mqqopensdkapiV4</string>
  69 + <string>mqzoneopensdk</string>
  70 + <string>mqzoneopensdkapi</string>
  71 + <string>mqzoneopensdkapi19</string>
  72 + <string>mqzoneopensdkapiV2</string>
  73 + <string>mqqOpensdkSSoLogin</string>
  74 + <string>mqqwpa</string>
  75 + <string>mqzone</string>
  76 + <string>mqqopensdkminiapp</string>
72 77
73 - <string>mqzoneopensdk</string>  
74 - <string>mqzoneopensdkapi</string>  
75 - <string>mqzoneopensdkapi19</string>  
76 - <string>mqzoneopensdkapiV2</string>  
77 - <string>mqqOpensdkSSoLogin</string>  
78 - <string>mqqwpa</string>  
79 - <string>mqzone</string>  
80 - <string>mqqopensdkminiapp</string> 78 +<!-- <string>sinaweibo</string>-->
  79 +<!-- <string>sinaweibohd</string>-->
81 </array> 80 </array>
  81 + <key>NSAppTransportSecurity</key>
  82 + <dict>
  83 + <key>NSAllowsArbitraryLoads</key>
  84 + <true/>
  85 + </dict>
  86 + <key>PHPhotoLibraryPreventAutomaticLimitedAccessAlert</key>
  87 + <true/>
  88 + <key>UIApplicationSceneManifest</key>
  89 + <dict>
  90 + <key>UIApplicationSupportsMultipleScenes</key>
  91 + <false/>
  92 + </dict>
82 </dict> 93 </dict>
83 </plist> 94 </plist>
metaCode/Supporting Files/Assets.xcassets/AccentColor.colorset/Contents.json deleted 100644 → 0
1 -{  
2 - "colors" : [  
3 - {  
4 - "idiom" : "universal"  
5 - }  
6 - ],  
7 - "info" : {  
8 - "author" : "xcode",  
9 - "version" : 1  
10 - }  
11 -}  
metaCode/Supporting Files/Assets.xcassets/Shop/DS_coupon_edit_se.imageset/选中@2x.png deleted 100644 → 0

1.26 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_coupon_edit_se.imageset/选中@3x.png deleted 100644 → 0

1.96 KB