Open YogeshPateliOS opened 4 years ago
For remove player add this code ASVideoPlayerController class. hope it's helpful for you.
func removePlayer(tableView: UITableView){
let visisbleCells = tableView.visibleCells
var maxHeight: CGFloat = 0.0
for cellView in visisbleCells {
guard let containerCell = cellView as? ASAutoPlayVideoLayerContainer,
let videoCellURL = containerCell.videoURL else {
continue
}
let height = containerCell.visibleVideoHeight()
if maxHeight < height {
maxHeight = height
}
pauseRemoveLayer(layer: containerCell.videoLayer, url: videoCellURL, layerHeight: height)
}
}
@YogeshPateliOS Can you give a solution for Video in the First cell is not playing when it appears the first time, we have to drag its bottom slightly to play the video.
Plz, help me with that. Thanks in advance.
For remove player add this code ASVideoPlayerController class. hope it's helpful for you.
func removePlayer(tableView: UITableView){ let visisbleCells = tableView.visibleCells var maxHeight: CGFloat = 0.0 for cellView in visisbleCells { guard let containerCell = cellView as? ASAutoPlayVideoLayerContainer, let videoCellURL = containerCell.videoURL else { continue } let height = containerCell.visibleVideoHeight() if maxHeight < height { maxHeight = height } pauseRemoveLayer(layer: containerCell.videoLayer, url: videoCellURL, layerHeight: height) } }
ty
Hello pausePlayeVideos method not working. I check with DisAppear Method as well.