Hiding the Quick Time logo and controls when an audio file is played using MPMoviePlayerController - iphone

Hai all,
in my application i need to play a streaming audio, i used MPMoviePlayerController to play the audio, it works fine, but i don't want the Logo and controls appearing on the screen( like playing in the background).
is there any way to hide the logo and controls ?
thanks

There is no way to do this with the current Apple api. If you want to use undocumented api's, you can always access the private methods. Here is a good place to start looking:
Erica Sadun's Core Dumps 1
Erica Sadun's Core Dumps 2

Take a look at:
MPMusicPlayerController
or
AVAudioPlayer

Related

iOS: core animation to video

I'm making a photo gallery app. I use the photos as slides and shows them one by one with transactions made by core animation.
Now I need to turn this process in to a video so that I can share it on Youtube, but I don't know where to start or which reference should I read.
To make video in iphone you can AVAssetWriter.
Also have a look this post. You can capture your animation as images and make the video.
The AVAsset Apple APIs is used to do this sort of thing is. But be warned, it is not easy to use. If you would like to check out a working example Xcode project, see AVDecodeEncode. This example shows decoding from h.264 and then encoding the result back to h.264. You could write all you own code to do this, but just be aware that it is not for the faint of heart.

iOS 6 in app camera

Im building an app that allows the user to record a video (in app) by pressing a button on the main screen. I don't want the user to be taken to the photo app because the video will only be able to be viewed on the app (Max of 15 seconds) and I can't quite get it. Anyone have the code to do this? A good example of what i want the camera to do is the camera in the app Cinemagram. Thanks for any help.
If you plan on saving the movie to the user's photo library, then you can use UIImagePickerController. In particular, you should read the guide that accompanies the class.
However, if you only want the video to be temporary, then you will probably want to use AVFoundation. You would then need to configure an AVCaptureSession with an AVCaptureMovieFileOutput to write the video to disk. Then, when you are ready to play the video, create an AVURLAsset with the file url that you just wrote, use that to create an AVPlayer to play the video, and add an AVPlayerLayer to your view, with said player, to display the video.
Either way, I would recommend studying the examples that Apple provides.
AVCam and
AVPlayerDemo should be more than enough to get you started (especially the AVCam example project).

iPhone - Streaming audio with MPMoviePlayerViewController

I'm using MPMoviePlayerViewController to stream an audio from the URL "http://ios-audio.q-music.be/audio.m3u8".
Its playing well.
But when I click "Home" button, the app goes into background and stops streaming.
When I start the app again, it starts streaming again.
How can I make my app stream the audio using MPMoviePlayerController when the app goes to background.
Or do I've to use other frameworks?
Well I use https://github.com/mattgallagher/AudioStreamer for streaming audio, It will work in background.
http://digitaldj.net/2010/08/25/ios4-background-audio-revisited/ points to a fork of Matt Gallagher's original AudioStreamer code at http://github.com/DigitalDJ/AudioStreamer, which I can verify does support background audio. That said the original AudioStreamer has been updated this year so I'd imagine it also has implemented background support by now.
Certainly using MPMoviePlayerController to do background audio would be interesting since it presumably opens up the opportunity to support AirPlay directly in an audio streamer application.

iPhone. Is it possible to load a video file and select a specific frame?

Is it possible to load a short video file and - once loaded - select a specific frame and display that frame in a view? If there is no native support for this, how about an open source alternative?
Thanks in advance.
-Doug
I think that in iphone programming you're stuck with the fullscreen video solution proposed by apple. You could write your own controller to do it differently, but i think it could be difficult to achieve good performances and you're cut out of the app-store for sure.
edit:
looks like in iphone sdk 3.2 apple added something for you:
The MPMoviePlayerController class
defines an interface for managing the
playback of a movie. Playback occurs
either in full-screen mode or in a
custom view that is vended by the
movie player controller. You can
incorporate the view into your own
view hierarchies or use a
MPMoviePlayerViewController object to
manage the presentation for you.
and again
Behavior in iPhone OS 3.1 and Earlier
In iPhone OS 3.1 and earlier, this
class implemented a full-screen movie
player only. After creating the movie
player and initializing it with a
single movie file, you called the play
method to present the movie. (The
definition of the play method has
since moved out of this class and into
the MPMediaPlayback protocol.) The
movie player object itself handled the
actual presentation of the movie
content.
i haven't tested it yet but have a look at the official documentation under MPMoviePlayerController Class Reference, it may help.

Is it possible to play a movie file in a UIView layer?

If yes, what movie format has best performance? And how would a simple setup look like? I have some views, and I want to play a short movie inside a view (not fullscreen). The movie is about 5 seconds long.
Looks like the system frameworks only support playing video full screen with the MPMoviePlayerController. Supported formats are basically flavors of H.264 and MPEG-4; more in the documentation.
Theoretically, you might be able to roll your own decoding and playback code, but I doubt you'd get acceptable performance. (And most of the Open Source media player examples I can think of are GPL. Not that I imagine they'd fare much better.)
If it's only 5 seconds long, you can fake it by playing the audio file in the background, and an animated UIImageView at the same time. Lots of apps do this like the ~50 or so baby sign language ones.