Hi seen many tutorial but couldn't find the right workable answer. I need to play audio and video file from my webservice, for this I want to download the file and play it in the app, seen tutorial for avPlayer nothing workable. Please provide link or guide how to do this.
Use MPMoviePlayer, as this can open network streams and despite the name works with audio. The only thing is this pops up the modal player with controls.
First Download the network file using NSURLConnection and store it locally, then use AVAudioPlayer to play the local file.
Related
I am new to iPhone Development. I need to capture video. While I'm capturing video it display on server too. Something like live streaming.
Anyone have idea from where I should have to start for this functionality?
Thanks in Advance.
Your question seems similar to this
Xcode ios: Streaming of video file while recording and removed redundant personal statements
First Half Solution
Using AVFoundation you can get video Buffer/frames while recording.
Second Half
But for uploading i didn't find any solution
There is Input Stream option there in iOS APIs but it need some file path. but as video is not recorded we didn't have any path.
Edit 1
Here is Best Example for AVFoundation provided by Apple, you can start with
I recommend you to use wowza wowza.com/https://www.wowza.com, it has all the features, from live stream, video on demand and etc.
I am using the AFNetworking suite in my app. In the app you can record a message, which uploads to a server. I need to be able to play that audio file either by streaming it or chaching it, an ideas on how to do either?
Cheers
Honestly, I would just use AVPlayer and load the remote URL. Per Apple's documentation:
AVPlayer works equally well with local and remote media files, providing you with appropriate information about readiness to play or about the need to await additional data before continuing.
It's certainly possible to use AFNetworking to do this, but I trust that Apple's built-in AVPlayer will be more than suitable to your needs, and certainly worth a shot before rolling your own.
If you want to play a mp3 that is located on the server you can use Matt Galagher's Audiostreamer (http://cocoawithlove.com/2009/06/revisiting-old-post-streaming-and.html).
If you want to play a locally saved file you can use AVAudioPlayer (http://developer.apple.com/library/IOS/#documentation/AVFoundation/Reference/AVAudioPlayerClassReference/Reference/Reference.html).
If that is not what you want please give us some more datails.
I implemented local notification in my app but I am just wondering is there a way to play a sound that is not part of the NSMainbundle.Basically in my app, I want user to record a sound that gets played when the local notification is generated instead of playing a pre-recorded sound. I have read out the Apple Documentation but i have also seen 2 -3 Apps on app store which is doing it like the this App link of the App i am wondering how the are playing custom sounds (sounds which are not the part of NSMainBundel)
Anyone has any idea how I can do it ?
Thank you in Advance
What you can do is to utilize the AVAudioRecorder and save its recordings to the documents directory of the iPhone.
After the recording is done, you can play the very same files using an AVAudioPlayer via the path of the recorded files.
HTH
I have used Local Notification in my app an successfully generated an alert at correct time..
But when i tried following code for playing sound it does not play....
localNot.soundName =#"Ghulam Ali-Chamkte Chaad Ko.mp3";
Can anyone tell me the reason....Does the playing length of sound file affects
According to the Apple Developer Documentation, you need to use "aiff", "caf" or "wav" files.
The link provided shows some ways of converting audio to these formats on your mac.
I'm making my own internet radio app with a custom interface. So i'm wondering what is the best tool to implement the audio playback with a custom interface? I tried to use MPMoviePlayerController, but i couldn't find out how to customize it's interface. I also tried AVPlayer, but somehow it didn't play the .m3u files, though it worked perfectly well with .m3u8 playlists from apple test http live stream examples.
Use audiostreamer its also having a good example https://github.com/mattgallagher/AudioStreamer
cheers endo