AVPlayer video HLS not work on 16.4 simulator and device to

I had a black screen and background sound thats example code:

override func viewDidLoad() {
        super.viewDidLoad()
        playVideo()
    }
    
    func playVideo() {
        let videoURL = URL(string: "http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8")
        let player = AVPlayer(url: videoURL!)
        
        player.rate = 1
        player.appliesMediaSelectionCriteriaAutomatically = true
        
        var playerViewController = AVPlayerViewController()
        playerViewController.player = player
        playerViewController.allowsVideoFrameAnalysis = true

        DispatchQueue.main.async {
            self.present(playerViewController, animated: true) {
                playerViewController.player!.play()
            }
        }
    }

Any idea ??

This likely only is happening on a simulator. You can try using a device instead.

AVPlayer video HLS not work on 16.4 simulator and device to
 
 
Q