Commit 3d697fc53cc77e7f40e2bba46f3a8ce0b720f54b

Authored by liushiyu
1 parent de8dd694

注释 ijk 播放器,注释stop 方法

... ... @@ -50,7 +50,7 @@ target 'metaCode' do
50 50 pod 'ZFPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
51 51 pod 'ZFPlayer/ControlView', :git => 'https://gitee.com/mirrors/ZFPlayer.git'
52 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 55 pod 'CNLiveShareToolKit'
56 56 #网家家输入组件
... ...
metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
... ... @@ -78,8 +78,8 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
78 78 var isSelectable: Bool! = false
79 79 var currentIndex: NSInteger! = 0
80 80 var footerRefreshView: CNLiveFooterRefresh!
81   - var playerManager = ZFIJKPlayerManager.init()
82   -// var playerManager = ZFAVPlayerManager.init()
  81 +// var playerManager = ZFIJKPlayerManager.init()
  82 + var playerManager = ZFAVPlayerManager.init()
83 83  
84 84 /// 初始化播放器
85 85 /// - Parameters:
... ... @@ -182,7 +182,9 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
182 182 player.playerDidToEnd = {[weak self] asset in
183 183 guard let self = self else { return }
184 184 self.controlView.videoPlayer((self.player)!)
185   - self.player.currentPlayerManager.replay()
  185 + self.player.currentPlayerManager.stop()
  186 + let indexPath = IndexPath(row: self.currentIndex, section: 0)
  187 + self.playVideo(at: indexPath as IndexPath)
186 188 }
187 189  
188 190 NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil)
... ... @@ -211,10 +213,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
211 213 if player != nil {
212 214 player.stopCurrentPlayingCell()
213 215 }
214   - if (playerManager.player != nil) {
215   - playerManager.player.stop()
  216 +// if (playerManager.player != nil) {
  217 +// playerManager.player.stop()
216 218 // playerManager.avPlayerLayer.removeFromSuperlayer()
217   - }
  219 +// }
218 220 }
219 221  
220 222 override func viewWillLayoutSubviews() {
... ... @@ -321,10 +323,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele
321 323 tableView.dataSource = nil
322 324 controlView.removeFromSuperview()
323 325 player.stopCurrentPlayingCell()
324   - if (playerManager.player != nil) {
325   - playerManager.player.stop()
  326 +// if (playerManager.player != nil) {
  327 +// playerManager.player.stop()
326 328 // playerManager.avPlayerLayer.removeFromSuperlayer()
327   - }
  329 +// }
328 330 print("销毁了")
329 331 }
330 332 }
... ...