0

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 ?

1 Answers1

0

I have used Vitamio SDK for playing all types of Video files. Please check on following link https://www.vitamio.org/en/ or use developers.ustream.tv/player-sdk/ios.html link. It might helpful.

Yogesh Raut
  • 180
  • 11