I'm trying to play a video in TableView Cell.I'm using this code but when I run nothing will appear.
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let myCell:UITableViewCell = tableView.dequeueReusableCell(withIdentifier: "myCell")!
let videoURL = NSURL(string: "http://techslides.com/demos/sample-videos/small.mp4")
let player = AVPlayer(url: videoURL! as URL)
let playerLayer = AVPlayerLayer(player: player)
playerLayer.frame = myCell.bounds
myCell.layer.addSublayer(playerLayer)
player.play()
return myCell
}