mpmovieplayercontroller

iphone: rotation in mpmovieplayercontroller?

做~自己de王妃 提交于 2019-12-08 12:04:23
问题 I have a small view on top of an mpmovieplayercontroller. When it is not fullscreen, I am able to adjust the frame of the view to the orientation (when the device rotates). But when I enter fullscreen mode, alothough I manage to present the view, I'm no longer able to maintain the correct frame when the device rotates. It looks like in fullscreen mode, the system simply using CGAffineTransformRotate on the status bar and the moviePlayer. How can I apply this CGAffineTransformRotate to rotate

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

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 &

How do I construct a local movie URL properly?

孤者浪人 提交于 2019-12-08 07:56:40
问题 In my iPhone app, the user can click a table cell, and a movie will start playing. The movie is a local file in my project under "/Resources/myMovie.m4v". I can't figure out how to properly link to it though. I found this code, but it doesn't seem to work: NSString *rootPath = [[NSBundle mainBundle] resourcePath]; NSString *filePath = [rootPath stringByAppendingPathComponent:@"myMovie.m4v"]; NSURL *fileURL = [NSURL fileURLWithPath:filePath isDirectory:NO]; moviePlayer = [

want to hide progressbar which comes on top in navigation bar of MPMoviePlayerController

◇◆丶佛笑我妖孽 提交于 2019-12-08 07:41:06
问题 Is there any way to hide progress bar which comes on top in navigation bar of MPMoviePlayerController? I want to hide because I do not want user to forward/backward the video. However, User can exit it by clicking on DONE button. 回答1: Since the scrubber is available both in the Embedded and the FullScreen version of the MPMovieControlStyle the only solution I see is to use MPMovieControlStyleNone and overlay your own version of the Done button on top of the Movie playback view. 来源: https:/

MPMoviePlayerController plays only when called twice. Only occurs in iOS 4

試著忘記壹切 提交于 2019-12-08 06:36:13
问题 I have an app for iOS 4.0-5.1 that uses HTTP Live Streaming to play videos. I have a simple setup with a button in a view that starts playing the stream when it is tapped. This works fine in iOS 5 but the button needs to be tapped twice before the stream begins playing in iOS 4. Does anybody know why this is happening and how to make the video play on the first tap of the button? Here is what I'm doing: .h #import <UIKit/UIKit.h> #import <MediaPlayer/MediaPlayer.h> @interface ViewController :

How to check whether a video or audio file format is playable in iPhone programmatically?

China☆狼群 提交于 2019-12-08 06:28:07
问题 I have some audio and video files stored in a server. I need to play them, but I do not know the files stored in server supported by iphone to play, How can I check whether the file is supported by IPhone before start playing, I am using MPMoviePlayerController to play the files. 回答1: Before playing them, its not possible to identify. Movie player will throw error when incorrect format of file is passed to it. For that, first you have to observe for noticiation:

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

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 ?