问题
I have a json file which includes data and between this data I have a video field.
how can I embed a video object in a view controller, what shall I put in the interface builder?? I cannot find video object in the objects existed on the right side. see below:
Shall I add some libraries? I need to help me how can I play a video object on my application.
I need your help please.
回答1:
Just load the files into UIWebView, it can handle both videos and PDFs.
OR
https://developer.apple.com/library/ios/#qa/qa2010/qa1240.html
回答2:
There is really good class for it VideoPlayerKit. Using VideoPlayerKit is easy to use. All controls, progress bar, and airplay are already set up.
This is example's screen
来源:https://stackoverflow.com/questions/16482328/embed-video-in-a-view-controller-ios