Commit 3d697fc53cc77e7f40e2bba46f3a8ce0b720f54b
1 parent
de8dd694
注释 ijk 播放器,注释stop 方法
Showing
2 changed files
with
12 additions
and
10 deletions
Podfile
| @@ -50,7 +50,7 @@ target 'metaCode' do | @@ -50,7 +50,7 @@ target 'metaCode' do | ||
| 50 | pod 'ZFPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git' | 50 | pod 'ZFPlayer', :git => 'https://gitee.com/mirrors/ZFPlayer.git' |
| 51 | pod 'ZFPlayer/ControlView', :git => 'https://gitee.com/mirrors/ZFPlayer.git' | 51 | pod 'ZFPlayer/ControlView', :git => 'https://gitee.com/mirrors/ZFPlayer.git' |
| 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 | #网家家输入组件 | 56 | #网家家输入组件 |
metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
| @@ -78,8 +78,8 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -78,8 +78,8 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 78 | var isSelectable: Bool! = false | 78 | var isSelectable: Bool! = false |
| 79 | var currentIndex: NSInteger! = 0 | 79 | var currentIndex: NSInteger! = 0 |
| 80 | var footerRefreshView: CNLiveFooterRefresh! | 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 | /// - Parameters: | 85 | /// - Parameters: |
| @@ -182,7 +182,9 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -182,7 +182,9 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 182 | player.playerDidToEnd = {[weak self] asset in | 182 | player.playerDidToEnd = {[weak self] asset in |
| 183 | guard let self = self else { return } | 183 | guard let self = self else { return } |
| 184 | self.controlView.videoPlayer((self.player)!) | 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 | NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil) | 190 | NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil) |
| @@ -211,10 +213,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -211,10 +213,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 211 | if player != nil { | 213 | if player != nil { |
| 212 | player.stopCurrentPlayingCell() | 214 | player.stopCurrentPlayingCell() |
| 213 | } | 215 | } |
| 214 | - if (playerManager.player != nil) { | ||
| 215 | - playerManager.player.stop() | 216 | +// if (playerManager.player != nil) { |
| 217 | +// playerManager.player.stop() | ||
| 216 | // playerManager.avPlayerLayer.removeFromSuperlayer() | 218 | // playerManager.avPlayerLayer.removeFromSuperlayer() |
| 217 | - } | 219 | +// } |
| 218 | } | 220 | } |
| 219 | 221 | ||
| 220 | override func viewWillLayoutSubviews() { | 222 | override func viewWillLayoutSubviews() { |
| @@ -321,10 +323,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -321,10 +323,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 321 | tableView.dataSource = nil | 323 | tableView.dataSource = nil |
| 322 | controlView.removeFromSuperview() | 324 | controlView.removeFromSuperview() |
| 323 | player.stopCurrentPlayingCell() | 325 | player.stopCurrentPlayingCell() |
| 324 | - if (playerManager.player != nil) { | ||
| 325 | - playerManager.player.stop() | 326 | +// if (playerManager.player != nil) { |
| 327 | +// playerManager.player.stop() | ||
| 326 | // playerManager.avPlayerLayer.removeFromSuperlayer() | 328 | // playerManager.avPlayerLayer.removeFromSuperlayer() |
| 327 | - } | 329 | +// } |
| 328 | print("销毁了") | 330 | print("销毁了") |
| 329 | } | 331 | } |
| 330 | } | 332 | } |