Play video as background in iPad App - objective-c

I have an app and it has a static uimage as the background. To dress up the app, I have a video that would be great as the background but I cannot find any examples of how to play a video as a background view. I have looked at MPMoviePlayerController but I am not sure if it would do what I am expecting.
Anyone have any ideas, or an example of a video as a background to an app?
Thanks

I guess you could just use the MPMoviePlayerController, if you don't do it fullscreen (which is not possible on the iPhone, but it is so on the iPad).
Then you can just put buttons, labels whatever you want on top of that.
Should work fine :)

Related

play sound of youtube video when app is in background

I am using RMYouTubeExtractor to play youtube video inside my app in a MPMoviePlayerController.
I need to play the sound of the video (and show the thumbnail of the video on the lock screen) if the phone is locked or the app is in the background.
Is there any way to do that ?
Please help.
Thank you.

Playing a muted video without interrupting background music

My design calls for a video playing in the background of my login screen, exactly like 6snap has.
I would like to avoid the default behavior of stopping the user's music when the video starts to play. My video does not have sound.
I'm using:
<MediaElement Source="MyVideo.mp4" />
I tried setting IsMuted=true which didn't help. Does anyone have an idea how 6snap managed it?
Edit: currently trying the animated gif route. Using the ImageTools 3rd party library and having converted my MP4, it works fine. My 9 second 640x1136 3MB video became a 41MB GIF, so I have to reduce the quality drastically. Still trying to find a better way if possible.
You won't be able to do that with Background Audio and MediaElement, hence as MSDN says:
When a MediaElement control plays audio or video content, any background sounds or media already playing are halted. The app launches the playback experience when the user taps the control. Only one MediaElement control can operate at a time.
It's no matter you have no sound - when you start to play all background sounds/media are halted.
I'm not sure how the App you have mentioned achieved that, but maybe you can try with DirectX/XNA - thought I've not tried this and don't know if that would help.

MPMovieplayerController show blackscreen when app enter foreground from background

I have seen the same question but not have the right solution, so I decided to post my own problem.
I'm using an MPMoviePlayerController for playing video in iOS app. I can make it to play in background within my app or even when user tap on Home button (play in background).
The problem is when MPMoviePlayerController is playing, press home button on iPhone, make the app enter
background. Then tap the app's icon to make the app enter foreground, the MPMoviePlayerController's view will be black screen, audio still continue, only video screen cannot see anything.
This is NOT happen if in background, MPMoviePlayerController play the next video, when come foreground from background it works perfectly. And it also not happen in iOS6 or before.
So in inclusion the problem occurred when play the itself video in iOS7
How to make the MPMoviePlayerController's video shows immediately when app came to foreground?
Many thanks for any help!

MPMoviePlayerController swapping videos flicker

I'm using MPMoviePlayerController to play different videos.
However, when I change the video using setContentURL (I'm just targeting OS 3.2 and above), I notice a white flicker.
Is there anyway I can get rid of that flicker and make the transition between videos look smooth?
Thanks,
Tee
Unfortunately not, and I've had this problem too. You could use another instance of the controller, and use an animation to transition from one video to the other, to have a bit more control over the process.

How can I format a movie to play through MPMoviePlayerViewController on the iPad?

I've been struggling to make video on the iPad work. I'm using an MPMoviePlayerViewController and it plays fine in the simulator. I've tried several different converters, including ones dedicated to producing iPad-formatted video, but none of the videos play on the device. The MPMoviePlayerViewController loads and the controls appear.
For most of the videos, the spinning progress indicator never goes away. For a few, the video loads but when I press play the video immediately pauses. I know that the video is there because I can scan through and see various frames.
I know the code works because it plays a different movie file perfectly. I just have no idea what I'm doing wrong that's preventing my movie from playing. Does anyone know a good step-by-step process of getting an iPad-formatted video from any .mov or .mp4?
Thanks,
Luke
Also, just for future reference, import target video into iTunes, then highlight it and from the Advanced menu choose "Create iPod or iPhone Version" or "Create iPad or AppleTV Version" depending on your target device.
This guarantees that the right codecs are used and the right bitflags set on the video file.
Fixed - the one that loaded but couldn't play eventually worked. Why? Who knows.