Questions tagged [mpmovieplayercontroller]

A movie player (of type MPMoviePlayerController) manages the playback of a movie from a file or a network stream. Playback occurs in a view owned by the movie player and takes place either fullscreen or inline. You can incorporate a movie player’s view into a view hierarchy owned by your app, or use an MPMoviePlayerViewController object to manage the presentation for you.

This class plays movie or audio file supported in iOS. This includes both streamed content and fixed-length files.

This class supports programmatic control of movie playback, and user-based control via buttons supplied by the movie player.

The MPMoviePlayerController class generates numerous notifications to keep your application informed about the state of movie playback.

The MPMoviePlayerController class is formally deprecated since iOS 9.

Supported format for MPMoviePlayerController class are below:

Apple documentation: Supported format for video/audio

2218 questions
25
votes
3 answers

NSURLConnection finished with error - code -1002

Friends i have simple audio player (MPMoviePlayerController) which can play audio stream. On iOS 11 i have very interessing trouble, thousand time i have error and my stream was stopped: NSURLConnection finished with error - code -1002 I paste this…
Genevios
  • 1,115
  • 1
  • 16
  • 29
23
votes
3 answers

Multiple MPMoviePlayerController instances

I'm trying to put two MPMoviePlayerController on a UIView like this for (int i = 0; i < 2; i++) { UIView* v = [[UIView alloc] initWithFrame: CGRectMake(0.0f, 300.0f * i, self.view.width, 300.0f)]; [self.view addSubview: v]; NSURL*…
Kostia Dombrovsky
  • 1,647
  • 2
  • 18
  • 29
23
votes
7 answers

Unable to play MP4 video file from mainBundle

So I'm trying to play a simple intro animation video file that I've dragged into my project in XCode and therefore should be able to play from my mainBundle, right? With this code: NSURL *urlString = [NSURL fileURLWithPath:[[NSBundle mainBundle]…
PinkFloydRocks
  • 808
  • 3
  • 14
  • 29
22
votes
1 answer

MPMoviePlayerController and AVAudioPlayer audio mixing glitch

I'm developing an interactive storybook type application for the iPhone and I've recently encountered a frustrating bug concerning audio mixing on the device. Firstly, I setup an audio session. I set the category to AVAudioSessionCategoryAmbient and…
22
votes
2 answers

Properly displaying and dismissing fullscreen MPMoviePlayerController in iOS 3.2 (iPad)

I'm having lots of trouble displaying a fullscreen movie in my iPad app and then allowing the user to dismiss it with either the Done button or the "un-fullscreen" button on the player controls. Initially I was using MPMoviePlayerViewController for…
jbrennan
  • 11,943
  • 14
  • 73
  • 115
21
votes
7 answers

MPMoviePlayerController's view does not recognize touch

This is my code: _mediaPlayer = [[MPMoviePlayerController alloc] init]; _mediaPlayer.controlStyle = MPMovieControlStyleNone; _mediaPlayer.shouldAutoplay = NO; [_mediaPlayer.view setFrame: CGRectMake(5, 5, 600,400)]; [playerHolder addSubview:…
beryllium
  • 29,669
  • 15
  • 106
  • 125
21
votes
5 answers

How to make MPMoviePlayerController ignore the mute switch

I want to play a video using MPMoviePlayerController but I want it to ignore the mute switch, similar to the behavior of Youtube's video player. Any ideas?
zohar
  • 2,298
  • 13
  • 45
  • 75
20
votes
3 answers

How to hide control before MPMoviePlayerController movie is played?

Assume iOS 3.2 or later. What is the proper sequence of command to play a move with the controls initially hidden. When the movie is playing, the user has the option to tag on screen and show controls. Thanks! My (control not hidden) code: -…
ohho
  • 50,879
  • 75
  • 256
  • 383
19
votes
2 answers

Pros and cons of MPMoviePlayerController versus launching UIWebView to stream movie

I have a client who has video content for the web in Flash format. My task is to help them show the videos in an iPhone app. I realize that step one is to get these videos into the appropriate Quicktime format for the iPhone. Then I'm going to have…
Nosredna
  • 83,000
  • 15
  • 95
  • 122
19
votes
4 answers

MPMoviePlayerViewController | Allow landscape mode

I'm trying to stream a video in my app. The method I've found is : NSURL *theMovieURL = [NSURL URLWithString:self.data.trailer]; if (theMovieURL) { self.movieController = [[MPMoviePlayerViewController alloc]…
Nicolas Roy
  • 3,773
  • 5
  • 27
  • 42
18
votes
3 answers

Simultaneously stream and save a video?

I'm writing an app, part of which allows the user stream/play videos. I want to restrict the functionality so that they can only stream videos if they have a WiFi connection. I will then save the video so that when they have a 3G only (or lesser)…
edoloughlin
  • 5,821
  • 4
  • 32
  • 61
17
votes
2 answers

Find MPMoviePlayerController is Playing Or not

I need to find the MPMovieplayerController is playing or not with condition. Check the Condition button click event....! Any one help with me us....! Thanks....!
Dinesh
  • 6,500
  • 10
  • 42
  • 77
17
votes
1 answer

How to know when the MPMoviePlayerController has been paused in iPhone?

I want to add an overlay view for my video when the video is paused by the user. Is there any way to get the pause notification from MPMoviePlayerController? According to Apple Doc, there should be ways to do this but I can't find which…
Chilly Zhong
  • 16,763
  • 23
  • 77
  • 103
17
votes
9 answers

iOS 6 streaming player com.apple.coremedia.networkbuffering bug

I'm having trouble on make my app(music and video stream player) running on iOS 6 simulator. When I start a music ou video it crashes showing an error on this thread: com.apple.coremedia.networkbuffering and this on log info: 2012-09-13 17:45:09.260…
jMelnik
  • 1,055
  • 2
  • 15
  • 26
16
votes
4 answers

How to play video stream with MPMoviePlayerController in iOS

I am trying to play a video stream from the internet on the iPhone by pressing a button. I used many code samples but nothing worked. With this code it opens a black view without any video stream or controls in it. (The stream itself works.) NSURL…
derFalke
  • 247
  • 1
  • 2
  • 12