How to stream video over secure connection on iOS

对着背影说爱祢 提交于 2019-12-08 06:01:41

问题


I can play a video from a local resource (on the device). I can stream a video from the unprotected internet. I can't stream from the company intranet (either from internal or externally)

Typical secure company network. Videos are stored in SharePoint 2007 lists (but I have url to the video file).

I've tried:

  • MPMoviePlayerController
  • MPMoviePlayerViewController
  • UIViewView (creating html on fly using the <video> tag and video url)

and I can't get anything to work. Heck, I can't even get it to work going directly to the link in Safari on the iPad. The only thing I haven't tried doing is downloading it as a file then playing locally. Due to a host of usability issue this would not be a preferred option.


回答1:


There were 2 problems.

  1. MPMoviePlayerController doesn't support all the challenge authentication which exists in NSURLConnection. The solution is to just do a "dummy" NSURLConnection somewhere inside your secure area, have it handle all the challenges and set it to store the information for the session. From here on out, MPMoviePlayerController or other connections which don't support the ins and outs of SSL requests will use the existing session.
  2. A valid intermediate certificate had to be installed on the server. Something I never would have figured out myself. It exists as a small item in one of the guides under Secure connections.


来源:https://stackoverflow.com/questions/12374841/how-to-stream-video-over-secure-connection-on-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!