How to download audio/video files from internet and store in iPhone app?

Creating a Folder For every app you have a Documents Folder. Any files you use in your app are stored here. If you want to create more directories here, then you’d do something like this: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:@”MyNewFolder”]; … Read more

Android device as a receiver for A2DP profile

Since Android L the BlueDriod stack does support A2DP sink, but it is disabled by default. To enable it do the following: /* Enable bluetooth av sink. */ #define BTA_AV_SINK_INCLUDED TRUE in /external/bluetooth/bluedroid/include/bt_target.h. This enables sink support in the bluetooth stack. Also you have to do this change: <!– Enable sink support. –> <bool name=”profile_supported_a2dp_sink”>true</bool> … Read more

Why does it take so long for Android’s MediaPlayer to prepare some live streams for playback?

It does appear that it is buffering a fixed amount of data rather than a fixed amount of time. For anyone who doesn’t know the bitrates of various types of NPR streams off the top of their head, the data looks like: MPR news stream: 27 seconds (http://newsstream1.publicradio.org:80/), 64 kbps MPR classical music stream: 15 … Read more

Streaming Audio from A URL in Android using MediaPlayer?

simple Media Player with streaming example.For xml part you need one button with id button1 and two images in your drawable folder with name button_pause and button_play and please don’t forget to add the internet permission in your manifest. public class MainActivity extends Activity { private Button btn; /** * help to toggle between play … Read more

Streaming mp3 audio with AVPlayer

try this -(void)playselectedsong{ AVPlayer *player = [[AVPlayer alloc]initWithURL:[NSURL URLWithString:urlString]]; self.songPlayer = player; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerItemDidReachEnd:) name:AVPlayerItemDidPlayToEndTimeNotification object:[songPlayer currentItem]]; [self.songPlayer addObserver:self forKeyPath:@”status” options:0 context:nil]; [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(updateProgress:) userInfo:nil repeats:YES]; } – (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if (object == songPlayer && [keyPath isEqualToString:@”status”]) { if (songPlayer.status == AVPlayerStatusFailed) { NSLog(@”AVPlayer Failed”); … Read more

How to record webcam and audio using webRTC and a server-based Peer connection

You should definitely have a look at Kurento. It provides a WebRTC server infrastructure that allows you to record from a WebRTC feed and much more. You can also find some examples for the application you are planning here. It is really easy to add recording capabilities to that demo, and store the media file … Read more

Android 2.2 MediaPlayer is working fine with one SHOUTcast URL but not with the other one

Shoutcast mp3 streaming from Android 2.2 onwards is supported natively . Below 2.2 the Android OS cannot play shoutcast streams natively without using a proxy on the stream end or a stream proxy class on the device to capture the stream and pass it to the audioplayer just like NPR does. audio/aacp streaming is not … Read more