I'm wondering wether or not it's possible to stream from a HTTPS server using HLS, using the following code -
let url = NSURL(string:"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8")
let player = AVPlayer(URL: url!)
let playerController = AVPlayerViewController()
playerController.player = player
self.addChildViewController(playerController)
self.view.addSubview(playerController.view)
playerController.view.frame = self.view.frame
player.play()
I can stream from an HTTP server, but when I changed the URL to the URL of my company's server it doesn't work, the only difference is that the video of my company has HTTPS in it's URL and apple's sample video doesn't, I'm testing on the Emulator in XCode
Yes, you can stream HLS from an HTTPS server. HLS streams are transfered over HTTP and HTTPS is just HTTP over TLS and most of the time it is transparent to the client. The only thing you need is support for HTTPS in the player which all major ones already have.
https://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
is not working because thedevimages.apple.com
certificate is invalid. Just browse the url using your browser. It will warn you and give you additional information about what exactly is wrong.I guess the problem with your company server is the same - wrong or self-signed certificate.
Another quick way to validate an https server is to user curl. For example:
complains with: