Commit 83818f13108a1f7a31b718a266ac6fcc744e7fdf
1 parent
6b96f32a
修复不能重复播放问题
Showing
1 changed file
with
5 additions
and
4 deletions
metaCode/Classes/Main/VideoPage/Controller/CNLiveShortVideoViewController.swift
| @@ -147,10 +147,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -147,10 +147,10 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 147 | player.allowOrentitaionRotation = false | 147 | player.allowOrentitaionRotation = false |
| 148 | player.isWWANAutoPlay = true | 148 | player.isWWANAutoPlay = true |
| 149 | player.playerDisapperaPercent = 1.0 | 149 | player.playerDisapperaPercent = 1.0 |
| 150 | - player.playerDidToEnd = { [weak self] asset in | ||
| 151 | - guard let self = self else { return } | ||
| 152 | - self.player.currentPlayerManager.replay() | ||
| 153 | - } | 150 | +// player.playerDidToEnd = { [weak self] asset in |
| 151 | +// guard let self = self else { return } | ||
| 152 | +// self.player.currentPlayerManager.replay() | ||
| 153 | +// } | ||
| 154 | player.playerReadyToPlay = {[weak self] asset, assetURL in | 154 | player.playerReadyToPlay = {[weak self] asset, assetURL in |
| 155 | guard let self = self else { return } | 155 | guard let self = self else { return } |
| 156 | self.controlView.videoPlayer((self.player)!, currentTime: self.player.currentTime, totalTime: self.player.totalTime) | 156 | self.controlView.videoPlayer((self.player)!, currentTime: self.player.currentTime, totalTime: self.player.totalTime) |
| @@ -186,6 +186,7 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | @@ -186,6 +186,7 @@ class CNLiveShortVideoViewController : CNLiveBaseViewController, UITableViewDele | ||
| 186 | player.playerDidToEnd = {[weak self] asset in | 186 | player.playerDidToEnd = {[weak self] asset in |
| 187 | guard let self = self else { return } | 187 | guard let self = self else { return } |
| 188 | self.controlView.videoPlayer((self.player)!) | 188 | self.controlView.videoPlayer((self.player)!) |
| 189 | + self.player.currentPlayerManager.replay() | ||
| 189 | } | 190 | } |
| 190 | 191 | ||
| 191 | NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil) | 192 | NotificationCenter.default.addObserver(self, selector: #selector(removePlayerAction), name: Notification.Name.PlayerManage.kPlayerDestroyNotification, object: nil) |