mpmovieplayercontroller

MPMoviePlayerController fullscreen mode issue

人走茶凉 提交于 2019-12-04 14:14:44
问题 I have a problem with my code that plays a video file. Whenever I play the file in fullscreen mode the playback doesn't occupy all of my screen. Here is the relevant code: NSURL *url = [NSURL fileURLWithPath:@"Somefile.mov"]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [moviePlayer setControlStyle:MPMovieControlStyleFullscreen]; [moviePlayer setFullscreen:YES]; moviePlayer.view.frame = self.switchView.frame; [self.switchView addSubview:moviePlayer.view]; [

Multiple MPMoviePlayerControllers on iOS 3.2/4.0

家住魔仙堡 提交于 2019-12-04 14:07:48
The question is can I have two instances of MPMoviePlayerController simultaneously in one UIViewController? I'm trying to create a smooth transition between two movies in iPad app, but when I create the second MPMoviePlayerController the playback of first one is stopped and can't be resumed. I didn't found any restriction for having multiple MPMoviePlayerControllers in Apple documentation. Thanks in advance. P.S. Any other ideas about smooth transition between movies will be also appreciated. There is a restriction in the SDK doc. Note: Although you may create multiple MPMoviePlayerController

Is it possible to play 2 video file simultaneously in the same view?

爷,独闯天下 提交于 2019-12-04 13:12:10
Is it possible to play 2 video files simultaneously in the same view? I want to do have them both playing over half the screen, a little like this: _ _ _ _ _ _ _ _ _ _ | | | | | VIDEO | | | |_ _ _ _ _ _ _ _ _ _| | | | | | VIDEO | | | |_ _ _ _ _ _ _ _ _ _| How would I go about accomplishing this? Thanks :) apple's document said: Although you may create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time may play its movie. so,you know... Play 2 video's at a time is possible.. STEPS: 1.create 2 instance of MPMoviePlayer 2.set frame

Cocos2d: How to play a video in the background of a CCLayer

二次信任 提交于 2019-12-04 13:08:22
I want the video play in the background, and the text label in the front, run the following code, video is playing, but text label does not show! -(id) init { if(!(self=[super init])) { return nil; } CGSize size = [[CCDirector sharedDirector] winSize]; // MP4 NSURL *url = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"test" ofType:@"m4v"]]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; [moviePlayer respondsToSelector:@selector(setFullscreen:animated:)]; moviePlayer.controlStyle = MPMovieControlStyleNone; moviePlayer.shouldAutoplay = YES; moviePlayer

iOS4 MPMoviePlayerController Embedding

泪湿孤枕 提交于 2019-12-04 12:02:20
I am using MPMoviePlayerController currently to play a video inside IPhone and now I wish to play this video in a small area of the view (not the full screen). I think there is a frame way of doing it but I couldn't find the required tutorial somewhere. Have you been across any? That would be great. UPDATED I have reached to this point but still it doesn't show the player to play on screen. -(IBAction)startVideo { //start video here NSURL *path = [[NSURL alloc] initWithString:[self localVideoPath:NO]]; // Create custom movie player MPMoviePlayerController *moviePlayer = [[

play video from URL retrieved from ALAsset in iOS

眉间皱痕 提交于 2019-12-04 11:54:25
I'm still fairly new to Obj-C and the idea of blocks. I read this post about displaying images from url retrieved from ALAssets: display image from URL retrieved from ALAsset in iPhone Besides being able to view picture files in a UITableView using the ALAsset framework, I want to be able to play a video that is stored in the pictures folder as well. The video asset shows up just as a picture would, so I would like to be able to tap that video listing in the table and have it play. (In other words, I want to play a video using the Assets Library Framework) Can this be done with

How to display subtitles within MPMoviePlayerController

╄→гoц情女王★ 提交于 2019-12-04 11:09:31
问题 I built a custom video player, all buttons are working. I need to know what is the code that does the MPMoviePlayerController display subtitles when the video has that option. I did not find anywhere an example or someone who knew what code is behind this subtitle button. Where can I find this? 回答1: You will have to implement your own subtitle file parser. The .srt file format is quite simple, here is a discussion about how to parse it. The more challenging bit is to then synchronize the

MPMoviePlayerController: How can I make my video loop?

﹥>﹥吖頭↗ 提交于 2019-12-04 10:26:42
问题 Thank you in advance for any help, I am a newbie and would appreciate any help here.. I have this code to play a movie and it works great. Can somebody PLEASE tell me how to make this movie loop and replay from the beginning non stop ( any code would help). Also I would like to know how to play 2 movies, one after the other, preferably with a fade or smooth transition. Thank you for any help #import "MyAppViewController.h" @implementation MyAppViewController -(IBAction)button:(id)sender{

Add MPMoviePlayerController's view to a UIView

拜拜、爱过 提交于 2019-12-04 10:02:11
I want to add MPMoviePlayerController to a UIView . first, I put a view in xib file, named youTubeView. youtubePlayer is the MPMoviePlayerController . [youtubePlayer.view setFrame:youTubeView.frame]; [youTubeView addSubview:youtubePlayer.view]; [youtubePlayer play]; I want the view of youtubePlayer overlay on youTubeView. but the view of youtubePlayer goes wide, it just overlay a part of youTubeView. why ? Try this [youtubePlayer.view setFrame:youTubeView.bounds]; [youTubeView addSubview:youtubePlayer.view]; [youtubePlayer play]; Just assign the scaling mode for the movie like this

Got the message “WARNING: under normal conditions, _fillInQueueWithExtraSpace:..” and MPMoviePlayer rotation not work in iPad IOS 5.1

孤人 提交于 2019-12-04 09:50:35
It's my first post, and may be it may seem incorrect. So, I've to make rotation in cocos2d on iPad (5.1) I use 2 different videos to each orientation. And there I have 2 problems: The app starts in portrait mode, and plays video normally. I call (play) the video 5-10 times, when video finishs I rotate simulator. The view rotates, BUT when I call (play) video - it shows white screen and the next message: "WARNING: under normal conditions, _fillInQueueWithExtraSpace:ignoreExistingItems: should not be re-entered." Then If I rotate screen again (several times) - and play it in landscape mode - it