AVPlayer produce the error.

I am using the

AVPlayer
for playing the video. But my problem i.e, the the player is occurring the error. while the same url is already to play in to the
Android
device and Safari web browser also. If this url replaced by the other url it's working fine.



This is the error.

player.error==========>>>>>>>>>>Optional(Error Domain=AVFoundationErrorDomain Code=-11848 "Cannot Open" UserInfo={NSUnderlyingError=0x156d78f30 {Error Domain=NSOSStatusErrorDomain Code=-12925 "(null)"}, NSLocalizedFailureReason=The media cannot be used on this device., NSLocalizedDescription=Cannot Open})


override func viewDidLoad() {
     super.viewDidLoad()
     let videoUrl = "http://telvuehls_t03007-i.akamaihd.net/hls/live/217085/T03007-calkins/playlist.m3u8"
     let playerItem = AVPlayerItem(URL: NSURL(string: videoUrl as String)!)
     let playerObj = AVPlayer(playerItem: playerItem)
     self.player = playerObj
     if playerItem.error == nil{ playerObj.play()
     }else{
          print("player.error==========>>>>>>>>>>\(playerItem.error)")
     } 
}

Do you found the answer?
I am also getting same error.

Do you found the answer? I am also getting same error.

I've encountered the same problem in tvOS 13, and found the following:
  1. If you change the size of the AVPlayerViewController's view, for some sizes it works, and for some sizes it doesn't.

  2. The video stream manifest had weird pixel resolutions for the streams that didn't work.

For example one stream had a resolution of 720/406, where if you want a ratio of 16/9 it should be 720/405.

Any answer on this? I'am facing the same.

AVPlayer produce the error.
 
 
Q