What's the recommended way to programmatically play an audio stream using iPhone SDK? - iphone-sdk-3.0

I have an mp3 on a remote server. Want to play it as a stream, using my own UI,and my own ViewController.
How would you recommend doing that?

I used the code from this page to make a streamer, and it worked well, and was easy to implement.
http://cocoawithlove.com/2009/06/revisiting-old-post-streaming-and.html

Related

capture MediaStream from a local video file in react naitve

The purpose is to play a local video on the host side and stream it on the participants' side. The video should pause and seek for everyone when the host does it.
For this, I want to capture a stream (of MediaStream type) of a local video file while it is playing and pass it into WebRTC.
Just like on the web we have a captureStream() method to capture stream from video or canvas, do we have anything similar in react-native? Or any other way to achieve the same goal?
I could not find a relative solution with the RTCView of react-native-webrtc or the react-native-video. Any type of solution or suggestion would be helpful.
Thank you in advance.

Can I read a sound attachment (like .mp3) from Notes document without detaching it?

I tried to use a url (like http://www.example.com/dbname.nsf/notesunid/$File/filename.mp3) to play a sound attachment from Notes document on Domino server 9.0.2. I hope it can play directly by streaming but it always download the file. Any suggestion?
You should be able to use HTML5 Audio for this. Here's a simple example:
<audio src="/dbname.nsf/notesunid/$File/filename.mp3" controls></audio>

MPMoviePlayerController mp4 file streaming

I have few links to .mp4 video files like
file1.mp4
file2.mp4
file3.mp4
I need to play them all in player as one file. Actually not necessarily "as one" file, the player must act like it's one file. My best guess is to create custom controls and playback area for MPMoviePlayerController and divide the playback by time slices.
For instance
file1.mp4 file2.mp4 file3.mp4
-----------|------------|------------
Is this a good approach? Can this be done anyhow easier?
Also, the server, from which I'll get the videos is not customizable and I can't convert videos to MPEG-2 and stream them via .m3u8 files.
Thanks in advance
I guess you can use AVQueuePlayer. It supports multi-item playback. Haven't tried that myself (I used AVPlayer for single-item playback). I believe that AVQueuePlayer usage should reduce your overall efforts. ( You will still be responsible for drawing playback controls )
I sticked up to the scenario I described in the question and was able to create the player component.

Can I play flash video file on iPad?

I want to make simple project which play flash video file from online.
I've searched some articles and read carefully.
But I can't understand, how to play flash video files on iPad by Code.
So I need help from you.
Please.
Simply put, without being jailbroken, No you cannot.
The closest thing to being able to view flash in iOS is Frash, and I am not even sure if it is actively being developed or supported any more.
You can always check out the open source project for Frash. by Comex.
All IOS devices don´t support Flash player, but is be possible to use a Javascript or HTML5 player for video.
No, iWhatever's currently do not and to the best of my surfing knowledge, have no intention of supporting flash format due to some argument between apple and adobe.
At the end of the day, the Flash video format is a container for a movie that’s been compressed by some codec. If you can get to the source file, you know the format of the container, you know the codec that was used to encode the video, and you know how to write code to convert that into audio streams and video frames, then yes, you can play Flash videos on the iPad.
So, to recap:
Get the Flash video file.
Get to the encoded video data in the Flash file.
Decode the video and convert it, either into raw audio and video or to another format that the iPad can play.
Play the result of #3.
Needless to say, this is quite the endeavor. It’s better to download the movies to your desktop and convert them there before loading them into your application.
Yes you can! The question is whether or not you can play the video itself not whether or not ipads support flash player.
the answer is this.. new versions of "flash video" have a f4v file extension. These videos are basically a h.264 mp4 files. You "may" be able to play it in an ipad simply by renaming it to .mp4
If that doesn't work then use a utility like Miro to convert your "flash video" to a format that your ipad will accept. http://www.mirovideoconverter.com/

How to download an audio file from internet and play it using AvAudioplayer in Iphone sdk?

I need to download an audio file from the net and want to play it Using AVAudioPlayer.can any one give me suggestions how to do this.
you can use the NSURLConnection if you save the file in the server. the following is the link:
http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSURLConnection_Class/Reference/Reference.html#//apple_ref/occ/clm/NSURLConnection/sendSynchronousRequest:returningResponse:error:
This is the method name sendSynchronousRequest:returningResponse:error:
For the playlist, I am not used before, so cannot help you.
Good luck.