mpmovieplayer

Stream video while downloading iOS

拈花ヽ惹草 提交于 2019-12-03 01:32:47
问题 I am using iOS 7 and I have a .mp4 video that I need to download in my app. The video is large (~ 1 GB) which is why it is not included as part of the app. I want the user to be able to start watching the video as soon as is starts downloading. I also want the video to be able to be cached on the iOS device so the user doesn't need to download it again later. Both the normal methods of playing videos (progressive download and live streaming) don't seem to let you cache the video, so I have

Play video from cache in iphone programmatically

二次信任 提交于 2019-12-02 23:06:10
I am developing an iPhone application in which I will store stream video from URL directly to cache in local, now I need to play video in movie-player while it was in downloading in cache. I followed this http://lists.apple.com/archives/cocoa-dev/2011/Jun/msg00844.html , but I couldn't do exact. I am able to download video in cache but I couldn't play video from cache. So how can I play while its downloading? Just change your web url to local path url... Try this code... NSBundle *bundle = [NSBundle mainBundle]; NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"]; NSURL

How to show buffered data on UISlider using MpMoviePlayerController in iOS?

荒凉一梦 提交于 2019-12-02 17:47:22
I am using MPMoviePlayerController to play audio and I want to show the buffered data on slider like this ... I want to show the buffer data like red section in slider. I have tried to google it. But I didn't get any solution for it. and How to make slider customize? Thanks in advance... Sourabh Sharma Yes We can Show stream data using MPMoviePlayerController by its playableDuration . I am explaining all these steps involved me to make this custom_slider for my customize player ... (You Can direct read step 4 if you only interested in programming part) These are the steps: Step 1 : (First

Stream video while downloading iOS

强颜欢笑 提交于 2019-12-02 14:58:24
I am using iOS 7 and I have a .mp4 video that I need to download in my app. The video is large (~ 1 GB) which is why it is not included as part of the app. I want the user to be able to start watching the video as soon as is starts downloading. I also want the video to be able to be cached on the iOS device so the user doesn't need to download it again later. Both the normal methods of playing videos (progressive download and live streaming) don't seem to let you cache the video, so I have made my own web service that chunks up my video file and streams the bytes down to the client. I start

repeatmode doesn't work in MPMoviePlayerViewController?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 08:08:18
How to display a recorded video as repeat as an'n' number of times like in Vine Application. Here I use the MPMoviePlayerViewController, and works great display the recorded video. But the problem is, it doesn't repeating. Here the currently using code is, NSURL *url = [NSURL fileURLWithPath:videoPath]; playerController = [[MPMoviePlayerViewController alloc] initWithContentURL:url]; [self presentMoviePlayerViewControllerAnimated:playerController]; [playerController.moviePlayer prepareToPlay]; playerController.view.frame = CGRectMake(200, 402, 300, 200); playerController.moviePlayer

How to present MPMoviePlayerViewController from a UITabBarController?

拈花ヽ惹草 提交于 2019-12-01 23:37:21
问题 I have a view controller that's been added to a UITabBarController . In this view controller I have a button that opens up a movie using MPMoviePlayerViewController . When I play the movie, the top navigation bar is still overlayed on top of the movie, effectively blocking out a portion of the screen. When this view controller isn't inside a UITabBarController , however, the movie plays fine. Anyone know what's going on? 回答1: Figured it out. I guess things get wonky because

How to present MPMoviePlayerViewController from a UITabBarController?

风格不统一 提交于 2019-12-01 21:17:08
I have a view controller that's been added to a UITabBarController . In this view controller I have a button that opens up a movie using MPMoviePlayerViewController . When I play the movie, the top navigation bar is still overlayed on top of the movie, effectively blocking out a portion of the screen. When this view controller isn't inside a UITabBarController , however, the movie plays fine. Anyone know what's going on? Figured it out. I guess things get wonky because MPMoviePlayerViewController has a method added as a category to UIViewController called

iOS: How to save a video in your directory and play it afterwards?

丶灬走出姿态 提交于 2019-11-30 22:33:11
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 NSString *stringURL = @"http://videoURL"; NSURL *url = [NSURL URLWithString:stringURL]; NSData *urlData = [NSData dataWithContentsOfURL:url]; NSString *documentsDirectory ; if ( urlData ) { NSArray *paths =

MPMoviePlayer in iOS 9

不羁的心 提交于 2019-11-29 13:05:23
i have made a function in iOS 8 to play a movie in the background and now when i want to use it in iOS 9 it gives me a warning and says that it best not to use MPMoviePlayer and instead use AVPlayer. but i don't know anything about AVPlayer. how can i convert this to a proper function without warning that uses AVPlayer instead of MPMoviePlayer? heres the func : func playVideo() ->Bool { let path = NSBundle.mainBundle().pathForResource("video", ofType:"mov") //take path of video let url = NSURL.fileURLWithPath(path!) moviePlayer = MPMoviePlayerController(contentURL: url) //asigning video to

Putting a video to pause state before playing

帅比萌擦擦* 提交于 2019-11-29 05:17:00
I am using MVMoviePlayer to play videos in the app. Right now, a black screen comes after taping the play button and the video starts playing. But, the black screen is casing some discofort from the user end point of view. So, i want to start the video from a paused state. In order to do this, i thought of putting the player to paused state before playing it.. Is there a way to do this??? You can hide your MPMoviePlayer until that annoying black flicker is gone. To ensure that the black flicker is gone, you can check if the MPMoviePlayer 's loadState is 3 ( which means MPMovieLoadStatePlayable