I am using AVPlayer
for playing video in my application. When I try to play the video in iPhone , only the audio keeps playing and the video display is just blank screen, even though it plays audio with video display in the simulator . But if I run the app in iPad, video along with the audio plays.
Below is the video url is of this format :
http:// xxx.mp4/master.m3u8?hdcore=2.8.0&g=NKRNXVQKWKGS
This is the code which I have included:
let videoURL = URL(string: urlStr)
let player = AVPlayer(url: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.present(playerViewController, animated: true) {
playerViewController.player!.play()
}
What should I do to get the video also playing in iphone ?