mpmovieplayer

How to play video using MPMoviePlayerController?

你说的曾经没有我的故事 提交于 2019-12-10 12:58:47
问题 I am using the following code to play the video using the MPMoviePlayerController , but the video is not played. Can anyone tell me why ? NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"/one.mp4"]; NSString *mediaPath = [[[NSBundle mainBundle]resourcePath] stringByAppendingPathComponent:filePath];

iOS - Video not rotating only in iOS7 over iPhone?

喜欢而已 提交于 2019-12-09 08:12:21
问题 What i have Done? I am playing videos in an extended class of MPMoviePlayerViewController and have implemented orientation functions as follows - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { if (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){ return FALSE; } else{ return TRUE; } } - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [self

Get notifications when a Dailymotion video is played into a UIWebView

别来无恙 提交于 2019-12-08 08:23:09
问题 I'm currently showing a dailymotion url directly into a UIWebview. When tapping on the thumbnail image, the video starts playing in fullscreen mode. The problem is: when the video stops playing or the user tapps the "done" button, the original thumbnail has disapeared from the UIWebview, making it impossible to launch the video again. I would like to control when the video has finished playing or the user has tapped the done button to reload the UIWebView. I've been looking around and playing

customize quicktime iphone

强颜欢笑 提交于 2019-12-08 08:03:40
问题 Did anyone tried to customize the window in which the quicktime is playing video? If so, can you give me a hint hoe to start implementing something like this. Thank you indeed. UPDATE: Some apps have implemented it. See it here. 回答1: The phone doesn't have Quicktime, at least not in the traditional sense. Video playback is handled by a dedicated decoder on the system SoC. You cannot customize the movie player in any significant way, since doing so might cause it to fall off the hardware

Best way to implement MPMoviePlayer timeout

别来无恙 提交于 2019-12-08 07:57:50
问题 I have MPMoviePlayer that load movie from stream. I implemented timeout on 15 seconds with timers. But is there maybe some other better way to implement timeout without timer? 回答1: Register for the MPMoviePlayerLoadStateDidChangeNotification . Within its handler, check the current loadstate and mask out the MPMovieLoadStateStalled . - (void)MPMoviePlayerLoadStateDidChange:(NSNotification *)notification { //is the player stalled, hence possibly starving? if ((movieController_.loadState &

MPMoviePlayerViewController won't play movie, start and closes immediately

偶尔善良 提交于 2019-12-08 04:30:02
问题 I'm trying to play a video with MPMoviePlayerViewController, I present the MPMoviePlayerViewController but after 1 second he is dismissing itself. This is my code: .h: #import <MediaPlayer/MediaPlayer.h> @property (strong, nonatomic) MPMoviePlayerViewController *moviePlayerViewController; .m: - (void)playmovie { NSString *databaseName = @"NO.mp4"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentDir = [documentPaths

Get notifications when a Dailymotion video is played into a UIWebView

蓝咒 提交于 2019-12-08 03:41:26
I'm currently showing a dailymotion url directly into a UIWebview. When tapping on the thumbnail image, the video starts playing in fullscreen mode. The problem is: when the video stops playing or the user tapps the "done" button, the original thumbnail has disapeared from the UIWebview, making it impossible to launch the video again. I would like to control when the video has finished playing or the user has tapped the done button to reload the UIWebView. I've been looking around and playing with the Notification center but I couldn't get any response, can you tell me what code I should use ?

Playing video from youtube link without UIWebView

僤鯓⒐⒋嵵緔 提交于 2019-12-08 02:01:48
问题 I want to play a video in my app from youtube link e.g: http://www.youtube.com/watch?v=Uner-3tTY1I . But i don't want to redirect the user to any web view in the app. Just want to play that video in the video player in the current view of my application. Is it possible to play the video without redirecting to UIWebView ? If possible, how can i do this? Thanks for the help in advance. 回答1: The only allowed way seems to be using UIWebview. Doing it other way will violate youtube copyrights.

Set ContentURL of MPMoviePlayerController twice

丶灬走出姿态 提交于 2019-12-07 17:04:09
问题 I create an embedded MPMoviePlayerController thusly inside my loadView method: self.moviePlayerController = [[[MPMoviePlayerController alloc] init] autorelease]; // add to view, setup moviePlayerController's view frame, etc And I can later load a movie the user chooses thusly: NSURL *fileUrl = ... self.moviePlayerController.contentURL = fileUrl; and everything works great. However, if I set the contentURL again: NSURL *fileUrl2 = ... self.moviePlayerController.contentURL = fileUrl2; This does

How to show “Loading Movie…” message with MPMoviePlayerController

老子叫甜甜 提交于 2019-12-07 08:45:52
问题 I'm working with the MPMoviePlayerController for the iOS platform and am not sure why the "Done" and "Loading Movie..." controls are not displaying automatically when loading a new video. My original implementation of this was to use the UIWebView control to stream the videos, and when the videos are accessed, the "Done" and "Loading Movie..." controls are displayed until the video is loaded and ready to play. I would like to reproduce the same user experience with the MPMoviePlayerController