I am working in an iOS
project. I want may application to download a video
from the internet programmatically
. Then I want to play it. I know how can I play a local video from the Resources
, but my question is how could I download it , and the find it to be played.
I am using MPMoviePlayerController
to run the video.
Thanking in advance
I found the answer
here I saved the video
and this code is for playing the video form its directory
If you have a valid url of the video, Apple provides an API to directly buffer videos with
NSURL
.You should hold a reference to the
MPMoviePlayerController
object from the controller so that ARC doesn't release the object.Make the URL
Init
MPMoviePlayerController
with that URLResize the controller, add it to your view, play it and enjoy the video.
For more detail you can visit this playing video from a url in ios7